Results 1 to 6 of 6
-
11-10-2011, 08:56 AM #1
Sending FSUIPC offset from SIOC problem, needs help
Hi,
I need some help to solve a SIOC issue.
In my SIOC script I send the 69990 control to FSUIPC with 2 consequtive values in order to switch the VOR1/ADF1 in PMDG NGX EFIS panel. In order to cahnge the PMDG switch I need to send 2 consequtive values not only 1.
The SIOC code is:
Var 0074, Link IOCARD_SW, Input 65, Type I
{
IF V0074 = 1
{
&FS_PAR = -2147483648
&FS_CONTROL = 69990
&FS_CONTROL = DELAY 0 ,15
&FS_PAR = 524288
&FS_CONTROL = 69990
&FS_CONTROL = DELAY 0 ,15
}
ELSE
{
&FS_PAR = 536870912
&FS_CONTROL = 69990
&FS_CONTROL = DELAY 0 ,15
&FS_PAR = 131072
&FS_CONTROL = 69990
&FS_CONTROL = DELAY 0 ,15
}
}
This doesn't work as the second sending of the 69990 control under both the IF and ELSE statement is the only thing that is executed. I can see that both in FSUIPC and IOCP Console.
My question is way doesn't SIOC send the first 69990 control with the para -2147483648 and 536870912.
I have tried everything , but can't get it work. I probably do a silly fault, but can't see it myself.
Anyone see what is wrong here or a suggestion on how to do this in another way.
rgs
Roar KRoar Kristensen rksoftware www.flightsim4fun.com
Flightsimmer since 1982 (Sinclair Spectrum Sinclair QL, Amiga, PC --16Mhz >>4.4GHz)
-
11-10-2011, 09:48 AM #2
- Join Date
- Apr 2009
- Location
- Toronto
- Posts
- 125
Re: Sending FSUIPC offset from SIOC problem, needs help
Roar,
the DELAYs are not synchronous; i.e. the script won't pause while they expire; so, you're overwriting the first values before they can be acted on.
Change it to set the second set of values after the delay expires...mind you don't get into a loop there.
Jim.
-
11-10-2011, 10:52 AM #3
Re: Sending FSUIPC offset from SIOC problem, needs help
Thanks for replying, but what should the coding be for that? Im lost here.
Roar KRoar Kristensen rksoftware www.flightsim4fun.com
Flightsimmer since 1982 (Sinclair Spectrum Sinclair QL, Amiga, PC --16Mhz >>4.4GHz)
-
11-10-2011, 05:20 PM #4
- Join Date
- Apr 2009
- Location
- Toronto
- Posts
- 125
Re: Sending FSUIPC offset from SIOC problem, needs help
Here's one way:
Code:Var 0074, Link IOCARD_SW, Input 65, Type I { IF V0074 = 1 { &FS_PAR = -2147483648 V0123 = DELAY 524288, 15 } ELSE { &FS_PAR = 536870912 V0123 = DELAY 131072, 15 } &FS_CONTROL = 69990 &FS_CONTROL = DELAY 0, 10 } Var 0123 { &FS_PAR = V0123 &FS_CONTROL = 69990 &FS_CONTROL = DELAY 0, 10 }
-
11-10-2011, 05:21 PM #5
Re: Sending FSUIPC offset from SIOC problem, needs help
Try this:
Code:Var 74, Link IOCARD_SW, Input 65, Type I { IF V74 = 1 { &FS_PAR = -2147483648 &FS_CONTROL = 69990 &FS_CONTROL = DELAY 0, 15 v75 = DELAY 0, 20 } ELSE { &FS_PAR = 536870912 &FS_CONTROL = 69990 &FS_CONTROL = DELAY 0, 15 v76 = DELAY 0, 20 } } Var 75 Link SUBRUTINE { &FS_PAR = 524288 &FS_CONTROL = 69990 &FS_CONTROL = DELAY 0, 15 } Var 76 Link SUBRUTINE { &FS_PAR = 131072 &FS_CONTROL = 69990 &FS_CONTROL = DELAY 0, 15 }
Nico Kaan
Howto program in SIOC
-
11-20-2011, 02:48 AM #6
Re: Sending FSUIPC offset from SIOC problem, needs help
Thanks for the inputs . It Solved my problems.
rgsRoar Kristensen rksoftware www.flightsim4fun.com
Flightsimmer since 1982 (Sinclair Spectrum Sinclair QL, Amiga, PC --16Mhz >>4.4GHz)