LOW_QUANT announcer

This is a new forum for the OC4BAv4.
Post Reply
ridnert
Posts: 31
Joined: Wed Jan 08, 2014 10:07 am

LOW_QUANT announcer

Post by ridnert »

Hi Roar
Have a problem which I can´t get rid off regarding var V0015 LOW_QUANT annuoncer Output 35.
My light is on almost all time. It doesn´t help if I change the output number. If I change the script to a led that is not in use I can see that that led is lit up on the sioc monitor anyway.
Any clues? What is affecting this lights coming on, any way to manipulate but remove the wire or use an output which is not in use? I use FSX but I guess that doesn´t matter Script is OCP4NGX_v4.0_OC
Brgds Thommy
mvr1918
Site Admin
Posts: 1709
Joined: Thu Aug 30, 2012 3:35 pm

Re: LOW_QUANT announcer

Post by mvr1918 »

See this info I send to Opencockpit a long time ago.


When using Var 0015 in the OCP4NGX_4.0.txt the compiled file will compile and look OK.

But, when using the script with the PMDG NGX the Var 0015 will get a value 48 ( I have checked with IOCPConsole), which in turn shows up
as LOW_PRESSURE annunciator is ON.

Changing the txt file so Var 0015 is set to Var 3915 and the other V0015 lines in script are set to V3915
will compile with a OK result.
But, running this script PMDG NGX again will just move the problem as the original Var 0016 now becomes the new Var 0015 so LOW QUANTIY gets the 48 value and then turn annunciator to ON. If you change the next VAR it will move the problem again. It seems like it is the number 15 variable in the script that has this issue.

So I found out that making the changes in the Edit Config within SIOC.exe will work fine. Because you then do not have any Var 0015 in the script

I suspect that the value 48 that is wrongly set to Var 0015 actually comes from the Var 1500 range wich have values 48 at some point in the
startup phase.
-------------------------------
Var 1500, name EACA0, static, Link SUBRUTINE
{
IF &EL_STATE <> 8
{
L0 = &EACA0 - 48
IF L0 < 0
{
&AC_AMP0 = -999999
}
ELSE
{
&AC_AMP0 = L0
}
}


I struggled a long time to fix this issue. I have not found any faults in my script, so I suspect this is a compiler bug, but I really do not now.
Alpin-Flier
Posts: 46
Joined: Sun May 24, 2015 2:59 pm

Re: LOW_QUANT announcer

Post by Alpin-Flier »

Hi Roar

I just saw this thread this morning. I had the same problem and wondered, why the Low_Quant LED was always on. Then I have seen the "48" in V0015. I programmed the Low_Quant output away from V0015:

Var 0052, Link IOCARD_OUT, Device 30, Output 35 // LOW_QUANTITY
Var 1042, name LOW_QUANT, static
{
IF &EL_STATE <> 9
{
V0052 = &LOW_QUANT
}
}

I had V0052 free, because I changed many things in the original script, but use any free var below V1000 for it. V1042 provides the correct drive signal.

I suppose, that the problem is inside the OCP4NGX driver. This driver converts the PMDG data block to distinct variables, mainly in the range V1000 to V1999. The responsability for value attribution to variables is only in the driver itself. E.g. the IOCP driver from Ascanio for standard FSX planes uses the range from V0001 to V0999 to represent the values.

My conclusion: there is a driver bug, that unexpectedly delivers data to V0015. Sorry, Roar, if I should be wrong.

Best regards
Urs
mvr1918
Site Admin
Posts: 1709
Joined: Thu Aug 30, 2012 3:35 pm

Re: LOW_QUANT announcer

Post by mvr1918 »

Urs,

I still beive it is the compiler, as I never found any bug. But, I could also be wrong. Anyway, moving it away from the Var 0015 get rid of it.

You are welcomed to find the bug. The script of OVH was a pain to do, as the variable values from the PMDG B737 system do not match up with what you see on the virtual PMDG B737 OVH.
Alpin-Flier
Posts: 46
Joined: Sun May 24, 2015 2:59 pm

Re: LOW_QUANT announcer

Post by Alpin-Flier »

Hi Roar

Thank you very much for answering, even on Sunday 8-) . Yes, I can immagine that the compiler does such funny stuff. At least it is easy to circumvent the V0015 problem.

Meanwhile I would like to chase such bugs and even add more variables I need from the plane (e.g. ground speed, that is not in the PMDG data block, but available from simconnect), my knowledge of programming is poor. I would need the source and learn C++ (if this is the programming language, you use for the driver). I would prefer kind of cooperation. I can tell you what I need in the driver to finish the 737 cockpit. From my side you can get a lot of scripts for distinct tasks (as motorized throttle and trim control). Deal or no deal? By the way, my cockpit is nearly finished, but I had to use a lot of FSUIPC and tricky solutions. I would like to replace it with an event driven approach.

Best regards
Urs
mvr1918
Site Admin
Posts: 1709
Joined: Thu Aug 30, 2012 3:35 pm

Re: LOW_QUANT announcer

Post by mvr1918 »

All Events(inputs) and Variables(Outputs) defined in the PMDG SDK are supported in the OCP4NGX driver.

In addition all defined SimConnect Events and Variables can be added to the driver, but is takes a lot of time to do it.
Is the script you have for a motorized throttle for any specific throttle brand? Is it using DC motors or Servos to drive the throttle, Spd Brake, Trims?
I am building my own motorized throttle ( but it is a loong projects, but at some point in time I would need a to start the scripting and driver coding)


AS seen in this video, I still use a Saitek modified Throttle, but I need a motorized one.

https://www.youtube.com/watch?v=SzqK9piloYk
Alpin-Flier
Posts: 46
Joined: Sun May 24, 2015 2:59 pm

Re: LOW_QUANT announcer

Post by Alpin-Flier »

Hi Roar

I use the control stand of Cockpit-for-you (CFY). It has 4 DC motors (Throttle 1 and 2, Trimwheel and Speedbrake). One OC motorplus card controls motors, three relays in series to 3 motors, three servos and the parkbrake lamp. Lever/wheel pots and switches are connected to a Bodnarcard BU0836. I think any similar construction could work with my script.

I don't need all Simmconnect variables. Many are already in the PMDG block. But some important are missed there, e.g. ground speed and radiometer altitude. You need these for defining the priority of levers. I will send you a PM with the complete list.

Nice video, flying a 747 with 737 cockpit, :D

Best regards
Urs
mvr1918
Site Admin
Posts: 1709
Joined: Thu Aug 30, 2012 3:35 pm

Re: LOW_QUANT announcer

Post by mvr1918 »

Urs,

Just to confirm I got your list of wanted variables to be implemented in the OCP4NGX driver.

To implemet the list will take many days of coding and a lot more days to test. I will look into it when I have some time.

But, I want promise anything.
Post Reply