Results 1 to 3 of 3
  1. #1
    25+ Posting Member



    Join Date
    Nov 2009
    Location
    Germany
    Posts
    60
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    SIOC for Standby Frequency

    Hello,

    i want to read the offset for the standby frequency of COM 1.

    The offset is $311A. The Sioc code should read the content and display it on the 7 segment displays.

    My code is:

    var 1, Link FSUIPC_IN, Offset $311A, Length 2
    {
    v2 = v1
    }
    var 2, name COM1STBY, Link IOCARD_DISPLAY, Digit 10, Numbers 5

    Actually, if i turn the encoder for the frequency, the values on the 7 segment displays are changing. But the numbers shown do not make sense. I suppose the Output in the $311A Offset required some formatting but i do not know how. Is this a special offset ? Is some formatting or something else required to show the correct frequency ?

    Thanks for any help...

    Cheers
    Andy

  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: SIOC for Standby Frequency

    Hi Andy,

    The FSUIPC offset is in BCD format and without leading one.

    So you have to convert to decimal first and then add 10000, before wrriting to your 5 digit displays.
    Try this:
    Code:
    var 1, Link FSUIPC_IN, Offset $311A, Length 2
    {
     L0 = FROMBCD v1
     v2 = L0 + 10000
    }
    var 2, name COM1STBY, Link IOCARD_DISPLAY, Digit 10, Numbers 5
    regards,
    Nico

  3. Thanks Masterploxis thanked for this post
  4. #3
    25+ Posting Member



    Join Date
    Nov 2009
    Location
    Germany
    Posts
    60
    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 for Standby Frequency

    Hi Nico,

    thanks - i already figured out that the problem was the BCD format in the FSUIPC offset. I tried to use the FROMBCD but did not succeed. So thank you very much for the input - i will try the code when i am back at the SIM at home...

    Cheers
    Andy

    UPDATE: IT WORKS ! Thank you so much....