Results 1 to 4 of 4
  1. #1
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Dec 2009
    Location
    World
    Posts
    8
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    SIOC Delay 'Command'

    Hi all,

    Have been battling through learning SIOC today and have learnt almost everything from Nico's site so far which has been brilliant!

    On the site there is the example of the delay being used to light a led:
    Code:
    Var 1
     {
       &Led = DELAY 1 400 
     }
    
     Var 2 name Led Link IOCARD_OUT Output 92
    I am trying to find the correct way to use this in conjunction with the CHANGEBIT. What I would like to do is something like this:
    Code:
    &FO_JoyStick64 = CHANGEBIT 0 1
    
    ''AFTER A DELAY OF 1 SECOND THEN..."
    
    &FO_JoyStick64 = CHANGEBIT 0 0
    Any ideas on how to go about this? My attempts so far have all resulted in errors and have included:
    Code:
    CHANGEBIT 0 DELAY 0 100
    DELAY CHANGEBIT 0 0 100
    Many thanks in advance,
    Marcus

  2. Likes kiek liked this post
  3. #2
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Dec 2009
    Location
    World
    Posts
    8
    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 Delay 'Command'

    SOLVED!

    In case anyone else is reading and looking for the answer, the solution in my case was to reset the offset variable itself.

    Code:
    Var 1 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
    
    Var 2 name pb_test Link IOCARD_SW Input 3 Type I
            If pb_test = 1
            {
            &FO_JoyStick64 = CHANGEBIT 0 1
            v1 = DELAY 0 10
            }

  4. Thanks dc8flightdeck thanked for this post
  5. #3
    150+ Forum Groupie
    Join Date
    Jul 2006
    Location
    Kansas
    Posts
    157
    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 Delay 'Command'

    This delay timer is exactly what I needed and works like a charm! Thanks!!

    Justin
    Home of the world's first South American DC-8 jetliner.
    Home of the Blue Angel F-4 Phantom simulator.

  6. #4
    150+ Forum Groupie
    Join Date
    Jul 2006
    Location
    Kansas
    Posts
    157
    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 Delay 'Command'

    In case they help someone, here are some timer scripts that I use.

    **************************************ADI flag delay when battery turned on********************************
    Var 0154, name FOflags, Link FSUIPC_INOUT, Offset $281C, Length 4 // Battery STATUS
    {
    IF &FOflags = 0 // Battery OFF
    {
    &2Flags = 0

    &2Flags = DELAY 1 1200 // 12 second delay befor flag pulls
    }
    }
    Var 0155, name 2Flags, Link IOCARD_OUT, Output 38 // F/O Gyro and Steer flags On/OFF

    ***********************************TIMER, INTANTLY RUN OUTPUT FOR X SECONDS****************************
    Var 0097, name ground, Link FSUIPC_INOUT, Offset $0366, Length 2 // aircraft is on ground
    {
    IF &ground = 1 // Generator one ON
    {
    &Bump = CHANGEBIT 0 1
    v0098 = DELAY 0 140 // run for 1.4 seconds
    }
    ELSE
    {
    &Bump = 0
    }
    }
    Var 0098, name Bump, Link IOCARD_OUT, Output 8 // Bump relay







    // ----------------------------------AP Master ON/OFF timed AP light flash------------------------------

    Var 0142, name Engaged, Link FSUIPC_INOUT, Offset $07BC, Length 4 // Autopilot Master switch
    {
    IF &Engaged = 0
    {
    IF &M_AP_LGT = 0 // only start if led does not blink
    {
    &BlinkAP = 100 // begin value of timer
    &BlinkAP = TIMER 0 -1 40
    }
    }
    }
    Var 2 name BlinkAP
    {
    L0 = MOD &BlinkAP 2
    IF L0 = 1
    {
    &M_AP_LGT = 1
    }
    ELSE
    {
    &M_AP_LGT = 0
    }
    }

    Var 0143, name M_AP_LGT, Link IOCARD_OUT, Output 32 // AP Master disengaged light flash
    Home of the world's first South American DC-8 jetliner.
    Home of the Blue Angel F-4 Phantom simulator.

Similar Threads

  1. WIN 7 and SSDs The TRIM Command
    By Prof Bill in forum Microsoft Windows 7
    Replies: 2
    Last Post: 02-09-2010, 06:58 PM
  2. Copy and Paste Command
    By Tim in forum General Builder Questions All Aircraft Types
    Replies: 5
    Last Post: 03-10-2008, 05:10 PM
  3. PMDG 737 or 737 Pilot In Command
    By Geremy Britton in forum General Builder Questions All Aircraft Types
    Replies: 6
    Last Post: 11-12-2007, 10:25 AM
  4. Need help with an apparently 'mouse only' command
    By Michael Carter in forum I/O Interfacing Hardware and Software
    Replies: 9
    Last Post: 08-19-2007, 12:08 AM
  5. Keyboard to send Command
    By mimmonick in forum Computer Hardware Setup
    Replies: 2
    Last Post: 06-14-2007, 12:16 PM