Results 1 to 7 of 7

Thread: Sioc Question

  1. #1
    75+ Posting Member Olympic260's Avatar
    Join Date
    Dec 2006
    Location
    Athens Greece
    Posts
    79
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Sioc Question

    I am also puting the question here besides OC forum.

    For the MIP I have used this code as reference

    http://www.opencockpits.com/modules....c=4843&forum=8

    On this the gear Indication LED are defined as, mine is the same minus the Device X and different outputs

    Var 4003, Link FSUIPC_IN, Offset $0BEC, Length 4 // Nose Gear Green Offset, 0=up, 16383=dwn
    {
    IF V4003 = 16383
    {
    V4004 = 1
    V4005 = 0
    }
    IF V4003 < 16383
    {
    V4004 = 0
    V4005 = 1
    }
    IF V4003 = 0
    {
    V4004 = 0
    V4005 = 0
    }
    }

    Var 4004, Link IOCARD_OUT, Device 3, Output 42 // Nose Gear Green Led, 0=off, 1=on

    Var 4005, Link IOCARD_OUT, Device 3, Output 41 // Nose Gear Red Led, 0=off, 1=on

    Var 4006, Link FSUIPC_IN, Offset $0BF4, Length 4 // Left Gear Position Offset, 0=up, 16383=d
    {
    IF V4006 = 16383
    {
    V4007 = 1
    V4008 = 0
    }
    IF V4006 < 16383
    {
    V4007 = 0
    V4008 = 1
    }
    IF V4006 = 0
    {
    V4007 = 0
    V4008 = 0
    }
    }

    Var 4007, Link IOCARD_OUT, Device 3, Output 44 // Left Gear Green Led, 0=off, 1=on

    Var 4008, Link IOCARD_OUT, Device 3, Output 43 // Left Gear Red Led, 0=off, 1=on

    Var 4009, Link FSUIPC_IN, Offset $0BF0, Length 4 // Right Gear Position Offset, 0=up, 16383=
    {
    IF V4009 = 16383
    {
    V4010 = 1
    V4011 = 0
    }
    IF V4009 < 16383
    {
    V4010 = 0
    V4011 = 1
    }
    IF V4009 = 0
    {
    V4010 = 0
    V4011 = 0
    }
    }

    Var 4010, Link IOCARD_OUT, Device 3, Output 46 // Right Gear Green Led, 0=off, 1=on

    Var 4011, Link IOCARD_OUT, Device 3, Output 45 // Right Gear Red Led, 0=off, 1=on

    I have aslo use the following for the Light test

    Var 2000, Link FSUIPC_OUT, Offset $560D, Length 1 // Light test

    Var 2001, Link IOCARD_SW, Input 183
    {
    V2000 = CHANGEBIT 0 ,V2001
    }


    The problem is that when I use the light test, all LED that are defined in teh SIOC are turning ON except the 6 Gear LED. The gear LED are working fine, Green when gear down, red in trans.

    Any ideas why they don't turn on with the light test?

    BR
    Chris

  2. #2
    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 Question

    I don't know PM; but, from the symptoms it appears that all the other LEDs react to the status of lamp indicators in PM which, I assume, are turned on by the lamp test. Your gear indicators, follow gear positions - which are not changed by lamp test.

    You could have the gear indicators follow the lamp test button directly.

    Jim.

  3. #3
    75+ Posting Member Jylhami's Avatar
    Join Date
    Feb 2007
    Location
    Finland
    Posts
    81
    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 Question

    Hi Chris,

    you don't have anything else than the gear status to control the leds.

    I use SUBROUTINE to get control of things, this is a copy paste from my SIOC code:

    Var 0018, name FS_gearsw, Link FSUIPC_OUT, Offset $0BE8, Length 4 // Lg position, 0=up, 16383=dwn
    Var 0014, name FS_nosegear, Link FSUIPC_IN, Offset $0BEC, Length 4
    {
    CALL &Gear
    }
    Var 0015, name FS_leftgear, Link FSUIPC_IN, Offset $0BF4, Length 4
    {
    CALL &Gear
    }
    Var 0016, name FS_rightgear, Link FSUIPC_IN, Offset $0BF0, Length 4
    {
    CALL &Gear
    }

    Var 0215, name Gear_SW, Link IOCARD_SW, Input 15 // Gear_sw
    {
    &FS_gear = &Gear_SW
    CALL &Gear
    }

    Var 0611, name Nose_green, Link IOCARD_OUT, Device 3, Output 42 // Nose Gear Green Led, 0=off, 1=on
    Var 0612, name Left_green, Link IOCARD_OUT, Device 3, Output 44 // Left Gear Green Led, 0=off, 1=on
    Var 0613, name Right_green, Link IOCARD_OUT, Device 3, Output 46 // Right Gear Green Led, 0=off, 1=on
    // Var 0614, name Gear_transit, Link IOCARD_OUT, Output 14

    Var 0806, name Gear, Link SUBRUTINE
    {
    IF &TestSW = 1
    {
    &Gear_transit = 1
    &Nose_green = 1
    &FS_rightgear = 1
    &Left_green = 1
    }
    ELSE
    {
    IF &FS_nosegear < 16383
    {
    &Gear_transit = 1
    &Nose_green = 0
    }
    IF &FS_nosegear = 0
    {
    &Gear_transit = 0
    }
    IF &FS_nosegear = 16383
    {
    &Nose_green = 1
    &Gear_transit = 0
    }
    IF &FS_leftgear = 16383
    {
    &Left_green = 1
    }
    ELSE
    {
    &Left_green = 0
    }
    IF &FS_rightgear = 16383
    {
    &Right_green = 1
    }
    ELSE
    {
    &Right_green = 0
    }
    }
    }

    Var 2001, name TestSW, Link IOCARD_SW, Input 183
    {
    CALL &Gear
    }

    At the end i added your link for your test switch, and added it in the Gear subroutine.

    All variables you can easily change in one place, because all is working with names

    I have changed these exept the gear switch input.

    Hope this helps,

    BW:Mika

  4. #4
    75+ Posting Member Olympic260's Avatar
    Join Date
    Dec 2006
    Location
    Athens Greece
    Posts
    79
    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 Question

    Thank you for your answers guys,

    Mika I will try this on my SIOC on the first chance.

    BR
    Chris

  5. #5
    75+ Posting Member Olympic260's Avatar
    Join Date
    Dec 2006
    Location
    Athens Greece
    Posts
    79
    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 Question

    Mika,

    it woked just fine, I made some slight changes to better suit my needs but thank you very much for the help


    . Finaly the MIP is 99% ready from swtches LED and SIOC, only copilot six packs master caution and Fire Warning missing


    http://www.youtube.com/watch?v=ITVhdpDcobo
    Chris

  6. #6
    75+ Posting Member Jylhami's Avatar
    Join Date
    Feb 2007
    Location
    Finland
    Posts
    81
    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 Question

    Glad it helped you out !

    It was just copy-paste code snippled, not tested.

    Nice Work you got

  7. #7
    New Member conicio's Avatar
    Join Date
    Sep 2007
    Location
    Spain
    Posts
    1
    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 Question

    Perhaps you should call the light test routine from every VAR of the gear leds, i.e. If VarXXX = 1 then VarYYYY=1 or maybe a call subroutine Var (call varXXXX)
    Regards

Similar Threads

  1. A General SIOC Question
    By jmig in forum OpenCockpits General Discussion
    Replies: 8
    Last Post: 12-23-2009, 11:14 AM
  2. sioc question
    By djcevera20 in forum OpenCockpits General Discussion
    Replies: 1
    Last Post: 06-01-2009, 02:01 AM
  3. Question on SIOC
    By 4EVERCooL in forum OpenCockpits General Discussion
    Replies: 5
    Last Post: 10-14-2008, 12:07 AM
  4. SIOC question
    By barkay in forum OpenCockpits General Discussion
    Replies: 7
    Last Post: 10-08-2008, 03:29 PM
  5. A BIG thanks & another SIOC question
    By jmig in forum OpenCockpits General Discussion
    Replies: 1
    Last Post: 09-02-2008, 12:25 PM