Results 1 to 5 of 5
  1. #1
    10+ Posting Member
    Join Date
    Feb 2011
    Location
    UK
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    SIOC Help Needed

    I am trying to program my landing gear lever in sioc using the following but it doesn't seem to be working

    Code:
    Var 1, name gear_control, Link FSUIPC_OUT, Offset $0BE8, Length 4
    
    Var 2, Link IOCARD_SW, Device 3, Input 20, Type P
    	{
    	&gear_control = 0
    	}
    
    Var 3, Link IOCARD_SW, Device 3, Input 21, Type P
    	{
    	&gear_control = 16383
    	}
    the script compiles without errors but doesn't operate the landing gear.

    Can any sioc experts help?

  2. #2
    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: SIOC Help Needed

    Hi,

    In your script each time the push button changes value (0->1 and 1-> 0) the "gear_control = .. " statement is executed.
    However, that should only happen when the button is pushed.

    Try this:
    Code:
    Var 1, name gear_control, Link FSUIPC_OUT, Offset $0BE8, Length 4
    
    Var 2, Link IOCARD_SW, Device 3, Input 20, Type P
    {
      IF v2 = 1
      {
        &gear_control = 0
      }
    }
    
    Var 3, Link IOCARD_SW, Device 3, Input 21, Type P
    {
      IF v3 = 1
      {
        &gear_control = 16383
      }
    }
    regards,
    Nico Kaan

  3. Thanks PaulD thanked for this post
  4. #3
    10+ Posting Member
    Join Date
    Feb 2011
    Location
    UK
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC Help Needed

    Hi Nico,

    Thanks for the reply, I have tried your suggestion but unfortunately it still isn't working. A bit of experimentation has shown that If I change the Var 1 statement to make it light an led instead of writing to the FSUIPC offset it works so the code is executing - there is obviously something going wrong in the process of writing to FSUIPC, just not sure what!

    Paul

  5. #4
    10+ Posting Member
    Join Date
    Feb 2011
    Location
    UK
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC Help Needed

    Further update: I have tried changing the code to write to a different offset (used the one to pause/un-pause the sim) and this worked so it seems that my code is working OK but the offset I am writing to is not working as expected. I am writing to offset 0BE8 which is listed as Gear control 0=Up, 16383=Down - I would have expected this to raise / lower the gear but it doesn't seem to be doing anything. (I am using the default 737-800 for testing).

  6. #5
    10+ Posting Member
    Join Date
    Feb 2011
    Location
    UK
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC Help Needed

    Problem solved!! I have used offset 3110 (send controls) instead of 0BE8, using this to send the values 66080 (gear down) and 66079 (gear up) has everything working as expected!