Results 1 to 2 of 2
  1. #1
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Old: Need some help with a bit of coding logic.

    Having trouble figuring out how to program a few things.

    1: For the start engine selection switch, I want to use a On/Off/On switch. I linked Position On 1 to "Engine 1" and Position On 2 to "Engine 2" no problems there, but how do I make the middle position Off be slection "Both"?

    2: Similar situation for start engine switch with GND, AUTO, OFF using a rotary switch but only want to use two inputs for GND and AUTO, how do I make it off if no switch is On?

    3: A bit more tricky, for the Left/Right pack switch instead of a rotary switch with Off,Auto,N,C,W I just want to use a momentary push button to toggle between Off/Auto. Not sure how to do this. If I link a position the pushbutton how do i link the off state since it's not a toggle type variable?

  2. #2
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Old: Need some help with a bit of coding logic.

    1:
    Vars 106, 107 and 108 that support the engine igniter switch and are all of type RL, so they are terminals of a three position rotary switch.
    You should not use on On/Off/On switch but a 3-position rotary switch. Just connect every terminal one-to-one with a SIOC variable.

    2:
    The start engine switchs are 5 position rotary switches...
    One way out is to use a 3 pos rotary switch and to define fixed zeroes in SIOC for the other two (non wired) entries:

    Code:
    Var 94 Link IOCARD_SW Input 23 Type I 
    Var 95 Link IOCARD_SW Input 24 Type I 
    Var 96 Link IOCARD_SW Input 25 Type I 
    var 97 value 0 
    var 98 value 0
    If you want to control GND, AUTO and OFF with a rotary switch with just two inputs, that is not possible I'm afraid, because always one of the two positions will be on ...

    3:
    You can program this in SIOC like this for the left pack:

    Code:
    Var 1100 Link IOCARD_SW Input 23 Type P 
    { 
      v222 = CHANGEBITN 0 v222 
      v223 = CHANGEBITN 0 v223 
    } 
    
    Var 222 value 1 
    Var 223 value 0 
    var 224 value 0 
    var 225 value 0 
    var 226 value 0

Similar Threads

  1. SixPack Logic
    By Potrohkocsonya in forum PMSystems
    Replies: 2
    Last Post: 04-18-2009, 01:41 PM
  2. Coding the mastercard to work with FSUIPC
    By jmig in forum OpenCockpits General Discussion
    Replies: 2
    Last Post: 04-10-2008, 11:47 PM
  3. 777 logic file?
    By sbecker777 in forum PMSystems
    Replies: 6
    Last Post: 02-05-2008, 02:23 AM
  4. [elements] Coding
    By null null in forum PM General Q & A
    Replies: 2
    Last Post: 12-02-2004, 12:59 PM
  5. [LOGIC] Center logic 0 Three position toggle switch
    By null null in forum PM General Q & A
    Replies: 2
    Last Post: 11-24-2004, 04:42 PM