Page 4 of 4 FirstFirst 1234
Results 31 to 37 of 37

Thread: OC assignments

  1. #31
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC assignments

    Glenn

    You say you are using an "encoder" so not a switch?

    A switch is easy to programme for your example, but an encoder, which increments or decrements is not easy at all. To be honest you should use a rotary switch.

    David

  2. #32
    75+ Posting Member



    Join Date
    Mar 2011
    Location
    Oklahoma
    Posts
    86
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC assignments

    you know, I have a hard time with the definitions of the different encoders. To Me, a rotory switch, with one common terminal, with multiple out puts that are switch individually, is a rotary switch. that is what I have. Term one is common, then the next 4 are turned on individually. So can I use this switch or do I need a different one?

  3. #33
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC assignments

    The component you describe is a rotary switch which is precisely what you need - not an encoder.
    Now define each switch position as a variable and if it is "on" then send the corresponding value to the fsuips offset. I am assuming that you have wired up the switch contacts to your "input" board
    Nico`s site has examples

    David

  4. #34
    75+ Posting Member



    Join Date
    Mar 2011
    Location
    Oklahoma
    Posts
    86
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC assignments

    How do I write the script to reflect the specific value (0,1,2,3,4)? You wrote to "send the corresponding value to the fsuips offset" and I can't figure out how to define the value in the script. I have looked all over nico's site and the help files but can't seem to find anything on that. Yes, I have wiried it up in sequential terminals on my master boards input.

  5. #35
    500+ This must be a daytime job kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    698
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC assignments

    Quote Originally Posted by gspannelljr View Post
    How do I write the script to reflect the specific value (0,1,2,3,4)?
    It goes like this:
    Code:
    Var 1 Link IOCARD_SW Input 23 Type I  // off position of rotary switch
    {
      IF v1 = 1 
      {
        &Starter = 0 
      }
    }
    Var 2 Link IOCARD_SW Input 24 Type I  // left position of rotary switch
    {
      IF v2 = 1 
      {
        &Starter = 1 
      }
    }
    // and so on  ...
    Var 10 name Starter Link FSUIPC_OUT Offset $0892 Length 1 // Starter offset
    Nico

  6. #36
    75+ Posting Member



    Join Date
    Mar 2011
    Location
    Oklahoma
    Posts
    86
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC assignments

    outstanding! Thanks, I got it, so using "name starter link" ties all those variables together that are named "starter". That I did not know. a very useful command. Thanks so much Nico. Now my GA sim starts, the throttle, mixture, and axis are all working. I can actually fly, sort of...... I am now working on my gauges too. I am using air coil, steam type gauges. I thnk I will use the dc motors card, put a resistor in to drop the voltage, and use that to drive my gauges. What do you think? Glenn

  7. #37
    500+ This must be a daytime job kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    698
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC assignments

    Congratulations with the steps you made.

    About your new question: please start a new thread while you're drifting off topic.

    Nico
    Last edited by kiek; 03-13-2014 at 11:43 AM.

Page 4 of 4 FirstFirst 1234