Hello Mr Dowson,
Having solved most of the problems in my Cockpit, there still is one that I can't . I work with IOCards, maybe you know them. With the programming language I was able to make the annunciator lights work in my Lear45 pit.
There is one however that I cannot get to work properly, and it is the emergency battery. To set a warning light on, I need to be able to read out the voltage from the battery, so that when the voltage drops below 11 volts in my case, I can tell IOCards to turn on the warning light.
To do that I need an Offset code.
I can monitor the voltage with the Simkits Digital Davtron Clock, and in my screenpanel there is also a gauge that warns for low battery.
In the second, unsupported (i know, unsupported) table in the Programmer's Guide there are some Offsets I could use, like 2834 BATTERY_VOLTAGE, or 2840 MAIN_BUS_VOLTAGE.
With one of these I hoped to be able to monitor the battery voltage.
With SIOC, the programming language of IOCards i added a check for the voltage:
Var 0050, name LED26, Link IOCARD_OUT, Output 26 // emergency Battery
Var 0051, Link SUBRUTINE // Battery Status Check
{
IF V0049 = 1 (is a subroutine for the test button that makes all my annunciators light up)
{
&LED26 = 1 (is the emergency battery Led)
}
ELSE
{
IF V0052 <= ??? (Is the needed value to activate the LED)
{
&LED26 = 1
}
ELSE
{
&LED26 = 0
}
}
}
Var 0052, Link FSUIPC_IN, Offset $2834, Length 1 // Battery Voltage
{
CALL V0051 // Calculate Changes & Monitor Check Button
}
But when I read out the binary and decimal values for one of these offsets while the battery is discharging to determine what value to fill in at the line where it now says <=???, it fluctuates tremendously, from 3 to sometimes way over 300 (decimal values, give or take), and it keeps doing that.
So the led comes on now and then, when I set the value to 11 volts (more like flickering).
This doesn't work, and therefore I was hoping you could help me with an Offset code that does what I need, maybe you can add Offset 2834 to the supported list?
There surely must be more builders that can put that to good use?
Best Regards,
Jaap Both
The Lear45 Project
TESTED SOME MORE.......
Do you by any chance know where Offset $2866 is for? It is not in your list or Project Magenta's list but it seems to work. I use it with a size of 1.
With running engines I get a decimal value of 40, which is 12 volts on my panel. When I shut down the engines, and start draining the battery, the value drops very slowly to 37 at which point my panel indicates 11 volts and the warning light illuminates. Eureka! When I restart the engines, the value slowly climbs until it reaches 40 again, and stays there.
I only hope this offset does not interfere with anything else on my panel...