Page 4 of 9 FirstFirst 12345678 ... LastLast
Results 31 to 40 of 90
  1. #31
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    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 "IF" Question

    Jack

    I wrongly assumed that you had done the basic syntax checking

    David

  2. #32
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    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 "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
       }
      }
    Why did this happen?

    I know everyone thinks I'm the SIOC Dunce, but I'm more thoughtful than you think.

  3. #33
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    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 "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

  4. #34
    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 "IF" Question

    Quote Originally Posted by Boeing 747 Flyer View Post
    The script I posted here was the wrong one
    So please pay atttention to what you post, you're waisting my time...
    Nico

  5. #35
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    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 "IF" Question

    Quote Originally Posted by kiek View Post
    So please pay atttention to what you post, you're waisting my time...
    Nico
    Everybody makes mistakes...

  6. #36
    75+ Posting Member
    Join Date
    Apr 2009
    Location
    Toronto
    Posts
    125
    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 "IF" Question

    _____________________________
    Last edited by deering; 08-15-2010 at 03:34 PM. Reason: Clarification

  7. #37
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    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 "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
       }
    }

  8. #38
    75+ Posting Member
    Join Date
    Apr 2009
    Location
    Toronto
    Posts
    125
    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 "IF" Question

    ___________________________

  9. #39
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    635
    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 "IF" Question

    - what does

    Code:
                         &REF = 0 OR 1
    do?

    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).

  10. #40
    75+ Posting Member
    Join Date
    Apr 2009
    Location
    Toronto
    Posts
    125
    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 "IF" Question

    _____________________________

Page 4 of 9 FirstFirst 12345678 ... LastLast

Similar Threads

  1. "Inner Circle" HSI - SIOC DC Motors Card Script
    By Boeing 747 Flyer in forum OpenCockpits General Discussion
    Replies: 64
    Last Post: 04-21-2011, 10:59 AM
  2. Replies: 17
    Last Post: 03-05-2008, 12:39 PM
  3. A question for "Bus Drivers"
    By mpl330 in forum General Builder Questions All Aircraft Types
    Replies: 2
    Last Post: 01-31-2008, 06:56 PM
  4. PM updates and a question for "proof of concept"
    By pap in forum PM General Q & A
    Replies: 4
    Last Post: 01-27-2008, 06:22 AM