PDA

View Full Version : SIOC Help Needed



PaulD
05-02-2011, 05:15 PM
I am trying to program my landing gear lever in sioc using the following but it doesn't seem to be working


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?

kiek
05-03-2011, 02:01 AM
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:


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

PaulD
05-03-2011, 12:30 PM
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

PaulD
05-03-2011, 02:29 PM
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).

PaulD
05-03-2011, 02:58 PM
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!