Results 1 to 7 of 7
  1. #1
    25+ Posting Member
    Join Date
    May 2008
    Location
    Perth
    Posts
    40
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    OC Transponder Panel

    Hi Nico,
    RE; OC Transponder.
    I have got the transponder 7 seg display working, and also the rotary switch STBY, OFF, XPNDR, TA. TA/RA with some help from Blake.
    So far so good.
    The issue now is that the PSX has a keypad entry, and the OC card has rotary encoders.
    think to write a conversion will require the OC card store and update the 4 numbers internally and then write the whole 4 numbers back to PSX. I really don't know if this can be done with PSXseecon. What are your thoughts on this?

    The other option would be to ask Hardy if he can provide a rotary encoder input to the existing PSX Transponder. Even with the keypad in place... just to have a rotary input for the first two, and last two digits. This may be able to be done in background and as far as users of PSX, nothing changes.

    Regards
    Greg

  2. #2
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC Transponder Panel

    Quote Originally Posted by gregh View Post
    What are your thoughts on this?
    You can do the conversion in SIOC. Here a link to a SIOC script for the OC ATC used for Level-D 767.
    Just change the lekseecon variables for PSXseecon variables.

    I'd not ask Hardy to come up with an interface for non-compatible hardware.

    Regards,
    Nico

  3. #3
    25+ Posting Member
    Join Date
    May 2008
    Location
    Perth
    Posts
    40
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC Transponder Panel

    Ok. Thanks Nico,
    I will give that a try.
    Regards
    Greg

  4. #4
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC Transponder Panel

    From my Manual:

    Rotaries:
    You can dial squawk frequencies between 0000 and 7777.
    As soon as you start dialing a ‘d’ will show up in front of the squawk code to indicate that you are dialing in a new one that is not yet synchronized with the one in the 767 panel. If your new frequency is ok, you should set the XPNDR switch in the other position (1 or 2, does not matter) upon which lekseecon will update the squawk code in the panel, so both are synchronized (and the ‘d’ will disappear).
    [Note: I had to implement this trick because the Level-D 767 SDK only understands key presses, no values]


    Nico

  5. #5
    25+ Posting Member
    Join Date
    May 2008
    Location
    Perth
    Posts
    40
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC Transponder Panel

    Hi Nico,
    Thanks for the extra info, I can see how it works now.
    I had to slow the button presses for PSX to.. 50...100...150...200 now working!

    Thanks Thanks Thanks...for your help.
    Regards
    Greg

  6. #6
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC Transponder Panel

    Hi Greg,
    Could you post your XPDR script for the ATC module?
    Regards,
    Nico

  7. #7
    25+ Posting Member
    Join Date
    May 2008
    Location
    Perth
    Posts
    40
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC Transponder Panel

    Not all switches and Indicators working yet.
    But, usable with PSX
    ///////////////////////////////////////////////////////////////////////////
    //
    // Title: Opencockpits ATC737 to be used with the Level-D 767 (FSX + FS9)
    // and with control of STBY/Charly and Ident in SB4, IvAP or vPilot
    //
    // Manual: 5.10
    // Lekseecon
    // version: 10.3
    //
    // Date: 6 July 2014
    //
    // Author: Nico Kaan
    // The Netherlands
    // www.lekseecon.nl
    //
    // ************************************************************************


    Var 9001 name XPDRFreqLow Value 11
    Var 9002 name XPDRFreqHigh value 11
    Var 9003 name XPDRFreq Value 1111


    Var 3489 Static Link IOCARD_SW Device 4 Input 12 Type P // ident push button ATC737


    Var 9009 name D_FAIL Link IOCARD_DISPLAY Device 4 Digit 4 Numbers 1


    Var 9010 name Dialling Link SUBRUTINE
    {
    IF &Dialling = 0
    {
    &D_FAIL = -999999 // blank
    }
    ELSE
    {
    &D_FAIL = -999995 // d from dialing
    }
    }


    Var 9020 name RO_RIGHT Link IOCARD_ENCODER Device 4 Input 10 Aceleration 1 Type 2
    {
    L0 = TESTBIT &XPDR 24
    IF L0 = 0 // not blank or lights test, so a valid frequency
    {
    L0 = &RO_RIGHT * -1
    &XPDRFreqLow = ROTATE 0 77 L0
    CALL &CalcXPDRFreqL L0
    &Dialling = 1
    }
    }


    Var 9021 name RO_LEFT Link IOCARD_ENCODER Device 4 Input 5 Aceleration 1 Type 2
    {
    L0 = TESTBIT &XPDR 24
    IF L0 = 0 // not blank or lights test, so a valid frequency
    {
    L0 = &RO_LEFT * -1
    &XPDRFreqHigh = ROTATE 0 77 L0
    CALL &CalcXPDRFreqH L0
    &Dialling = 1
    }
    }


    Var 9022 name CalcXPDRFreqL Link SUBRUTINE
    {
    L0 = &XPDRFreqLow
    L2 = DIV L0 10
    L1 = MOD L0 10
    IF L1 = 8
    {
    IF &CalcXpdrFreqL > 0
    {
    L2 = L2 + 1
    L1 = 0
    }
    ELSE
    {
    L1 = 6
    }
    }
    ELSE
    {
    IF L1 = 9
    {
    IF &CalcXpdrFreqL > 0
    {
    L2 = L2 + 1
    L1 = 1
    }
    ELSE
    {
    L1 = 7
    }
    }
    }
    L0 = L2 * 10
    &XPDRFreqLow = L0 + L1

    L2 = &XPDRFreqHigh * 100
    L1 = &XPDRFreqLow
    &XPDRFreq = L1 + L2
    &D_ACTIVE = &XPDRFreq
    }


    Var 9023 name CalcXPDRFreqH Link SUBRUTINE
    {
    L0 = &XPDRFreqHigh
    L2 = DIV L0 10
    L1 = MOD L0 10
    IF L1 = 8
    {
    IF &CalcXpdrFreqH > 0
    {
    L2 = L2 + 1
    L1 = 0
    }
    ELSE
    {
    L1 = 6
    }
    }
    ELSE
    {
    IF L1 = 9
    {
    IF &CalcXpdrFreqH > 0
    {
    L2 = L2 + 1
    L1 = 1
    }
    ELSE
    {
    L1 = 7
    }
    }
    }
    L0 = L2 * 10
    &XPDRFreqHigh = L0 + L1

    L2 = &XPDRFreqHigh * 100
    L1 = &XPDRFreqLow
    &XPDRFreq = L1 + L2
    &D_ACTIVE = &XPDRFreq
    }


    Var 9024 name I_XPNDR Link IOCARD_SW Device 4 Input 7 Type I // XPNDR toggle switch
    {
    L0 = TESTBIT &XPDR 24 // comment this and the line below.
    IF L0 = 0 // not blank or lights test, so a valid frequency
    {
    IF &Dialling = 1
    {
    // send freq to panel
    &X_KeyClr = CHANGEBITN 0 &X_KeyClr // clear
    L0 = &XPDRFreq
    L1 = DIV L0 1000
    &Del0Out = DELAY L1 50
    L0 = MOD L0 1000
    L1 = DIV L0 100
    &Del1Out = DELAY L1 100
    L0 = MOD L0 100
    L1 = DIV L0 10
    &Del2Out = DELAY L1 150
    L0 = MOD L0 10
    &Del3Out = DELAY L0 200
    }
    }
    }


    Var 9127 name Del0Out Link SUBRUTINE
    {
    L0 = &Del0Out
    IF L0 < 8
    {
    CALL &OutKey L0
    }
    }




    Var 9124 name Del1Out Link SUBRUTINE
    {
    L0 = &Del1Out
    IF L0 < 8
    {
    CALL &OutKey L0
    }
    }


    Var 9125 name Del2Out Link SUBRUTINE
    {
    L0 = &Del2Out
    IF L0 < 8
    {
    CALL &OutKey L0
    }
    }


    Var 9126 name Del3Out Link SUBRUTINE
    {
    L0 = &Del3Out
    IF L0 < 8
    {
    CALL &OutKey L0
    }
    }


    Var 9025 name OutKey Link SUBRUTINE
    {
    L0 = &OutKey
    IF L0 < 4
    {
    IF L0 = 0
    {
    &X_Key0 = CHANGEBITN 0 &X_Key0
    }
    IF L0 = 1
    {
    &X_Key1 = CHANGEBITN 0 &X_Key1
    }
    IF L0 = 2
    {
    &X_Key2 = CHANGEBITN 0 &X_Key2
    }
    IF L0 = 3
    {
    &X_Key3 = CHANGEBITN 0 &X_Key3
    }
    }
    ELSE
    {
    IF L0 = 4
    {
    &X_Key4 = CHANGEBITN 0 &X_Key4
    }
    IF L0 = 5
    {
    &X_Key5 = CHANGEBITN 0 &X_Key5
    }
    IF L0 = 6
    {
    &X_Key6 = CHANGEBITN 0 &X_Key6
    }
    IF L0 = 7
    {
    &X_Key7 = CHANGEBITN 0 &X_Key7
    }
    }
    }


    // Transponder, keypad


    Var 3481 name X_Key1 Static
    Var 3482 name X_Key2 Static
    Var 3483 name X_Key3 Static
    Var 3484 name X_Key4 Static
    Var 3485 name X_Key5 Static
    Var 3486 name X_Key6 Static
    Var 3487 name X_Key7 Static
    Var 3480 name X_Key0 Static
    Var 3488 name X_KeyClr Static


    // outputs


    Var 9030 name DIS_ATC Link IOCARD_OUT Device 4 Output 20
    Var 9031 name DIS_1 Link IOCARD_OUT Device 4 Output 21
    Var 9032 name DIS_2 Link IOCARD_OUT Device 4 Output 22
    Var 9033 name LED_FAIL Link IOCARD_OUT Device 4 Output 23




    // ************************************************************************
    // XPDR Rotary Switch


    Var 3011 Static name TcasPanSelOff
    Var 3012 Static name TcasPanSelOn


    Var 3018 Static name TcasPanSelStby Link IOCARD_SW Device 4 Input 0 Type I
    {
    IF V3018 = 1
    {
    V3011 = 0
    }
    IF V3018 = 1
    {
    V3012 = 1
    }
    }


    Var 0900 name OpenCOFF Link IOCARD_SW Device 4 Input 1 Type I
    {
    IF V0900 = 1
    {
    V3011 = 1
    }
    IF V0900 = 1
    {
    V3012 = 0
    }
    }


    Var 3019 Static name TcasPanXpdr Link IOCARD_SW Device 4 Input 2 Type I
    {
    IF V3019 = 1
    {
    V3011 = 0
    }
    IF V3019 = 1
    {
    V3012 = 1
    }
    }


    Var 3020 Static name TcasPanTA Link IOCARD_SW Device 4 Input 3 Type I
    {
    IF V3020 = 1
    {
    V3011 = 0
    }
    IF V3020 = 1
    {
    V3012 = 1
    }
    }


    Var 3021 Static name TcasPanRATA Link IOCARD_SW Device 4 Input 4 Type I
    {
    IF V3021 = 1
    {
    V3011 = 0
    }
    IF V3021 = 1
    {
    V3012 = 1
    }
    }


    // Var 3011 name TcasOff Static
    // Var 3020 name TcasTA Static
    // Var 3019 name TcasTARA Static








    // ************************************************************************
    // ATC stby or ON:


    //
    ///////////////////////////////////////////////////////////////////////////




    Var 2204 Static name XPDR
    {
    L0 = TESTBIT &XPDR 24
    IF L0 = 0 // not blank or lights test, so a valid frequency
    {
    &DIS_1 = 0
    &DIS_2 = 0
    &DIS_ATC = 1
    &LED_FAIL = 0
    L2 = FROMBCD &XPDR
    IF L2 = 0
    {
    &D_ACTIVE = -999999 // blank
    }
    ELSE
    {
    IF L2 <> &XPDRFreq
    {
    &XPDRFreq = L2
    &XPDRFreqLow = MOD L2 100
    &XPDRFreqHigh = DIV L2 100
    }
    &D_ACTIVE = &XPDRFreq
    }
    &Dialling = 0
    }
    ELSE
    {
    CALL &DECBCD4 &XPDR
    IF &Digit0 = -999999
    {
    &D_ACTIVE = -999999 // blank
    &D_FAIL = -999999 // blank
    &DIS_ATC = 0
    &DIS_1 = 0
    &DIS_2 = 0
    &LED_FAIL = 0
    }
    ELSE
    {
    &D_ACTIVE = 8888
    &D_FAIL = 8
    &DIS_ATC = 1
    &DIS_1 = 1
    &DIS_2 = 1
    &LED_FAIL = 1
    }
    }
    }


    Var 9103 name D_ACTIVE Link IOCARD_DISPLAY Device 4 Digit 0 Numbers 4


    //
    ///////////////////////////////////////////////////////////////////////////