Results 31 to 40 of 90
Thread: SIOC "IF" Question
-
08-15-2010, 10:58 AM #31
- Join Date
- Jul 2013
- Posts
- 917
Re: SIOC "IF" Question
Jack
I wrongly assumed that you had done the basic syntax checking
David
-
08-15-2010, 12:37 PM #32
Re: SIOC "IF" Question
Hi guys,
I know you think I didn't do the basic checks, but I did. The script I posted here was the wrong one, you are correct, but I can guarentee that I tried to compile WITHOUT those brackets (I made two versions of that script, I posted the earlier one here by mistake). PLEASE do not assume I don't do basic checks, I do.
And Nico, Thanks very much. That script does compile fine.
The previous problem was very strange... It wouldn't compile because windows has injected random segments of TIME in to notepad!!! The script looks okay... but check first ELSE statement:
Code:Var 7675, name REF, Link IOCARD_OUT, Output 4 // REF LED Var 7002, name OP, Link IOCARD_OUT, Output 5 // OP LED Var 9991, name OPSW, Link IOCARD_SW, Input 29, Type I // OP SW Var 8881, name REFSW, Link IOCARD_SW, Input 28, Type I // REF SW Var 9090, name Chain5, Link IOCARD_SW, Input 20 // Chain 5 Selector Var 7890, name Chain4, Link IOCARD_SW, Input 26 // Chain 4 Selector Var 7665, name Chain3, Link IOCARD_SW, Input 25 // Chain 3 Selector Var 7605, name Chain2, Link IOCARD_SW, Input 24 // Chain 2 Selector Var 7645, name Chain1, Link IOCARD_SW, Input 23 // Chain 1 Selector Var 9998, Link FSUIPC_IN, Offset $C28D, Length 1 // Cloud Precipitation Rate (1) { L0 = V9998 // FSUIPC L0 = v9998 IF L0 < 3 // First sector { &REF = 1 } } ELSE {15:34 15/08/2010 &REF = 0 } Var 9881, Link FSUIPC_IN, Offset $C28D, Length 1 { L0 = V9881 IF L0 >= 3 { &REF = 0 OR 1 &BlinkLed = 500000 &BlinkLed = TIMER 0 -1 40 } } Var 9077, name BlinkLed { L0 = MOD &BlinkLed 2 IF L0 = 0 { &REFE = 0 } ELSE { &REFE = 0 OR 1 } } Var 9889, Link FSUIPC_IN, Offset $C29D, Length 1 // Cloud Precipitation Rate (2) { L0 = V9889 // FSUIPC L0 = v9889 IF L0 < 3 // First sector { &REF = 1 } } ELSE { &REF = 0 } Var 9881, Link FSUIPC_IN, Offset $C28D, Length 1 { L0 = V9881 IF L0 >= 3 { &REF = 0 OR 1 &BlinkLed = 500000 &BlinkLed = TIMER 0 -1 40 } }
I know everyone thinks I'm the SIOC Dunce, but I'm more thoughtful than you think.
-
08-15-2010, 12:49 PM #33
- Join Date
- Jul 2013
- Posts
- 917
Re: SIOC "IF" Question
Jack
We can only call on what we see!!!!
If you press key F5 in Notepad, it automatically inserts a time and date stamp into your text, it obviously missed your qa check
David
-
08-15-2010, 12:58 PM #34
Re: SIOC "IF" Question
-
08-15-2010, 01:50 PM #35
-
08-15-2010, 03:28 PM #36
- Join Date
- Apr 2009
- Location
- Toronto
- Posts
- 125
Re: SIOC "IF" Question
_____________________________
Last edited by deering; 08-15-2010 at 03:34 PM. Reason: Clarification
-
08-16-2010, 05:21 AM #37
Re: SIOC "IF" Question
Hiya everyone,
Now I have a working SIOC Script, I tested in IOCPConsole. Now, whilst elements of it do work (ie above level three turbulence the LED Does flash), parts of it don't.
However, I did say in the script to light the LED (NOT flash) if below level three turbulence. This didn't happen. Also, the LED never stopped flashing, even though my "stop" was the ELSE command if the turbulence dropped below three.
I wil ltry and sort myself, but, can anyone see any obvious problems? It should work if <3, then LED Lights, of =>3, then LED FLashes. If turbulence is 0, then LED is not lit.
Script:
Code:ar 7675, name REF, Link IOCARD_OUT, Output 4 Var 7002, name OP, Link IOCARD_OUT, Output 5 Var 9888, Link FSUIPC_IN, Offset $C28D, Length 1 { L0 = V9888 // FSUIPC L0 = v9888 IF L0 < 3 // First sector { IF L0 > 0 { &REF = 1 } ELSE { &REF = 0 } } } Var 9881, Link FSUIPC_IN, Offset $C28D, Length 1 { L0 = V9888 IF L0 >= 3 { &REF = 0 OR 1 &BlinkLed = 500000 &BlinkLed = TIMER 0 -1 40 } } Var 9077, name BlinkLed { L0 = MOD &BlinkLed 2 IF L0 = 0 { &REF = 0 } ELSE { &REF = 0 OR 1 } }
-
08-16-2010, 02:06 PM #38
- Join Date
- Apr 2009
- Location
- Toronto
- Posts
- 125
Re: SIOC "IF" Question
___________________________
-
08-19-2010, 01:52 PM #39
Re: SIOC "IF" Question
- what does
Code:&REF = 0 OR 1
Jim[/QUOTE]
I implemented that small snippe of code for one reason: If the Turbulence drops below three, the LED could either be On OR Off, depending on certain conditions (if turbulence is less than three, illuminate LED, if there is NO tubulence, LED is OFF).
-
08-19-2010, 02:56 PM #40
- Join Date
- Apr 2009
- Location
- Toronto
- Posts
- 125
Re: SIOC "IF" Question
_____________________________
Similar Threads
-
"Inner Circle" HSI - SIOC DC Motors Card Script
By Boeing 747 Flyer in forum OpenCockpits General DiscussionReplies: 64Last Post: 04-21-2011, 10:59 AM -
Looking for "Below GS" and "Spoilers armed" annunciator light offset
By PeterH in forum PM General Q & AReplies: 17Last Post: 03-05-2008, 12:39 PM -
A question for "Bus Drivers"
By mpl330 in forum General Builder Questions All Aircraft TypesReplies: 2Last Post: 01-31-2008, 06:56 PM -
PM updates and a question for "proof of concept"
By pap in forum PM General Q & AReplies: 4Last Post: 01-27-2008, 06:22 AM
Candid connections: Platform for casual relationships Live Women Prime Сasual Dating
Super Сasual Dating - Genuine...