Unable to read var (SOLVED)

Forum for the OC4BA v2/v3 and OC4BAConfig including the OCP4NGX driver
Post Reply
reggie
Posts: 8
Joined: Fri Jun 28, 2013 2:58 pm
Location: CYQB

Unable to read var (SOLVED)

Post by reggie »

I Roar,
I've just installed new OC4BA v3 150117.

I do not succed to read var value. It is not a bug in the sofware or in the installation, I always have that problem.
Can you look at my simple script file and explain what I made wrong.

Thank you
Rejean CYQB

Test file:
// *****************************************************************************
// * Config_SIOC ver 5.0B5 - Rejean Tremblay
// * OC4BANGX_253
// *****************************************************************************
// TEST 1304 = MAIN_annunAP[0]); 1305 = MAIN_annunAP[1]);
// TEST 1526 = MAIN_annunAP_Amber[0]); 1527 = MAIN_annunAP_Amber[1])


VAR 1304, name ap_0, static // AP state
{
CALL &apsub0
}

Var 0342, name apsub0, Link SUBRUTINE
{
IF &ap_0 = 0
{
&ap_0_led = 0
}
ELSE
{
&ap_0_led = 1
}
}
Var 1526, name ap_3, static // AP state
{
CALL &apsub3
}
Var 0348, name apsub3, Link SUBRUTINE
{
IF &ap_3 = 0
{
&ap_3_led = 0
}
ELSE
{
&ap_3_led = 1
}
}
Var 0351, name ap_0_led, Link IOCARD_OUT, Device 2, Output 12 // RED LED - A/P
Var 0353, name at_0_led, Link IOCARD_OUT, Device 2, Output 13 // CPT's AT LED red
Var 0355, name fmc_0_led, Link IOCARD_OUT, Device 2, Output 15 // CPT's FMC LED
Var 0356, name ap_3_led, Link IOCARD_OUT, Device 2, Output 11 // CPT's AP LED amber
Var 0357, name at_3_led, Link IOCARD_OUT, Device 2, Output 14 // CPT's AT LED amber
mvr1918
Site Admin
Posts: 1630
Joined: Thu Aug 30, 2012 3:35 pm

Re: Unable to read var

Post by mvr1918 »

Hi,

The script looks OK. It is the same as I use in 3.4 script , but with your device/output numbers

But you must use the latest OCP4NGX version 2.5.5 for SDK SP2 function ( both red and amber)

The device 2 I do not know, but if your EXP/MASTER has IDX2 in SIOC.ini it should be OK


With 2.5.5 ( also other OCP4NGX for HW with IOCARDS) you must toggle BAT SW to initiate everything.


OCP4NGX version with even version number do not have all VARS enabled.

If you do not have any OVH BAT SW function in your Hardware. Go to IOCPConsole and toggle it for testing.

Then either make HW switch or make you specific script to toggle when you start.


Roar
reggie
Posts: 8
Joined: Fri Jun 28, 2013 2:58 pm
Location: CYQB

Re: Unable to read var

Post by reggie »

Thank you for your quick answer.

OK I made the test with OC4BA v255 on B737NGX version sp1D using FSX and P3D
On the FSX software parts PMDG B737 is load, everything is ON electrical circuit an engine running.

The only scripts load in SIOC v 5.0B5 is the sample test posted, so no others things should be interfere.
On the other hand I had never be able to read any VAR even in older version but always able to use Event without any problem
So all my MIP is programed with FSUIPC reading variable and Macro command to execute event, what is a mess when I have to reinstall PMDG aircraft, all macro must be redone.
And that's the reason why I want to use OC4BA driver, but my MIP is a bit different than yours, I using USB_Keys board for all Push Switch so I can not use your script as it is even if I modify inputs and outputs.
Can it be a problem with SimConnect ?

How I make the test
I push CMD-A switch on the screen I saw the amber led flashing on the screen, but on my MIP nothing react.
So I check with SIOC Monitor to check LEDS and I can turn it ON
I also check with IOCP Console and I do not have a value for VAR 1304 or any other Var number.

I really do not know how to go further on that trouble shooting.

So I really appreciate your support.

Thank you

Réjean CYQB
mvr1918
Site Admin
Posts: 1630
Joined: Thu Aug 30, 2012 3:35 pm

Re: Unable to read var

Post by mvr1918 »

Hi,

You can't read anything via OCP4NGX just with your test code.

You need to activate 1 important variable before OCP4NGX starts to send any information
it receives from PMDG to SIOC.


Try to send a 1 to Var 2800 via IOCPConsole when you test. Or, Define a Var2800 name OVHSTATE Static Value 1 in the beginning of your code.

A 1 in Var 2800 should initiate OCP4NGX to stat sending info.

Try it tell me if you succeed.
reggie
Posts: 8
Joined: Fri Jun 28, 2013 2:58 pm
Location: CYQB

Re: Unable to read var

Post by reggie »

YES. It's working

I should had knowing that a long time ago, But I do not want bother you.

Thank you very much Roar

Réjean CYQB
mvr1918
Site Admin
Posts: 1630
Joined: Thu Aug 30, 2012 3:35 pm

Re: Unable to read var (SOLVED)

Post by mvr1918 »

Fine, I mark this a solved
Post Reply