Results 1 to 2 of 2
  1. #1
    25+ Posting Member
    Join Date
    Apr 2009
    Location
    Canada
    Posts
    74
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Unhappy 7 Segment displays reading reversed!

    Hi Nico,

    Sorry to have to come back to you so soon.

    I decided on a new post as SIOC and LEKSEECON are running just fine.
    I have loaded the whole MCP script with no errors.

    But my 7 segment displays are reading everything reversed.

    I have 2 displayII cards installed to the Mastercard.

    Outputs are as follows

    7 segments installed from Left to Right

    IAS - 13-14-15
    HDG - 10-11-12
    VRT SPD - 5-6-7-8-9
    ALT-0-1-2-3-4


    My HDG.txt (example) HDG - 10-11-12 (connected to displayII)
    Var 9001 name RO_HDG Link IOCARD_ENCODER Type 2 Aceleration 2 Device 2 Input 41
    {
    L0 = &RO_HDG * 1 // turning right should be plus
    v297 = ROTATE 0 359 L0
    }

    Var 9002 name OutHDG Link SUBRUTINE
    {
    IF &ColdAndDark = 1
    {
    &D_HDG = -999999
    }
    ELSE
    {
    IF &TestMIP = 1
    {
    &D_HDG = 888
    }
    ELSE
    {
    &D_HDG = v297
    }
    }
    }

    Var 9003 name D_HDG Link IOCARD_DISPLAY Numbers 3 Device 2 Digit 10
    ** You mentioned on lekseecon website example to put the digit for the least significant number, which should be 12 (In the case of HDG outputs), but when I do that it only displays the 3rd 7 segment, the first two are blank.

    When I put digit 10 as shown above, my display is 620 DEG instead of 026 DEG
    When I put digit 11 it will show only two of the three 7 segments.
    When I put digit 12 it will show only the third 7 segment.

    For ALT. ALT-0-1-2-3-4

    I get the following
    LD767 shows 12500 FT
    my MCP reads 12005 FT

    Var 299 Static // read/write ALT from/to level-D panel
    {
    CALL &OutALT
    }

    Var 9001 name RO_ALT Link IOCARD_ENCODER Device 2 Input 37 Aceleration 2 Type 4
    {
    L0 = &RO_ALT * -1 // turning right should be plus
    v299 = LIMIT 0 640 L0
    }

    Var 9002 name OutALT Link SUBRUTINE
    {
    IF &ColdAndDark = 1
    {
    &D_ALT = -999999
    &D_ALTL0 = -999999
    &D_ALTL00 = -999999
    }
    ELSE
    {
    IF &TestMIP = 1
    {
    &D_ALT = 888
    &D_ALTL0 = 8
    &D_ALTL00 = 8
    }
    ELSE
    {
    L0 = v299 * 100
    IF L0 >= 10000
    {
    &D_ALTL0 = DIV L0 10000
    L1 = MOD L0 10000
    &D_ALTL00 = DIV L1 1000
    &D_ALT = MOD L0 1000
    }
    ELSE
    {
    &D_ALTL0 = -999999
    IF L0 >= 1000
    {
    &D_ALTL00 = DIV L0 1000
    &D_ALT = MOD L0 1000
    }
    ELSE
    {
    &D_ALTL00 = -999999
    &D_ALT = L0
    }
    }
    }
    }
    }

    Var 9003 name D_ALT Link IOCARD_DISPLAY Device 2 Digit 2 Numbers 3 (changed my digits to 2 or 4 as well, but does not work right)
    Var 9004 name D_ALTL00 Link IOCARD_DISPLAY Device 2 Digit 1 Numbers 1
    Var 9005 name D_ALTL0 Link IOCARD_DISPLAY Device 2 Digit 0 Numbers 1


    I have switched the digits around, but cannot get the correct reading.


    I am going to read your examples again to see what I may be missing.

    Thanks,


    Taufeeq

  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: 7 Segment displays reading reversed!

    Hi,
    Frst, please start a new thread in the Lekseecon Q and A subforum, not at the Top Level of the lekseecon forum....

    Second: this is not a SIOC problem but a hardware issue. You have connected your digits in the wrong order to your displayII cards ...

    For HDG for instance you should have fysically assembled them 12 - 11 - 10 (least significant digit to the right, has the lowest number)
    example: heading 253: 2=12 5=11 and 3=10
    See also http://www.lekseecon.nl/howto.html#write3dig
    Just reverse the fysical order and it will be fine (note that you cannot solve this in SIOC)

    regards,
    Nico
    Last edited by kiek; 10-16-2010 at 04:46 AM.

Similar Threads

  1. help with wiring up old units with 7 segment displays. What to use?
    By Geremy Britton in forum General Builder Questions All Aircraft Types
    Replies: 2
    Last Post: 09-10-2010, 10:36 AM
  2. 7 segment displays how does it work
    By Stijn in forum OpenCockpits General Discussion
    Replies: 14
    Last Post: 06-23-2009, 07:15 PM
  3. 7 segment displays qestion?
    By spiro in forum General Builder Questions All Aircraft Types
    Replies: 4
    Last Post: 04-09-2009, 04:47 PM
  4. Pesky 7 segment displays
    By Gaspode in forum I/O Interfacing Hardware and Software
    Replies: 4
    Last Post: 09-11-2007, 08:03 PM