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
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
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....