Use OC Nav1 to set Nav1 and Nav2

This is the forum for all your MSFS 2020 - PMDG 737 driver questions and issues
Post Reply
gblair
Posts: 33
Joined: Tue Sep 15, 2015 10:37 pm

Use OC Nav1 to set Nav1 and Nav2

Post by gblair »

Hi all,

This forum previously helped me sort this out in OC4BAv4 and OC4BAv5.

viewtopic.php?t=376&start=10

Now again in oi4FS it is different

Background, I have one OC Nav unit set as Nav1. When making ILS approach both NAV radios need to be tuned to the ILS frequency to do a complete coupled approach.

My question is how to modify SIOC script so that when I tune NAV1 it also tunes NAV2 ?

I'm using Oi4FS-PM v5.0.ssi and the only reference I can find for the Nav radios is this

Var 1804, name AC_NAV1, static // read active NAV1 display from NGX
{
IF &NAV1_Power_ON = 1
{
&D_AC_NAV1 = &AC_NAV1 // display new active NAV1 frequency
}
}

Var 1805, name ST_NAV1, static // read standby NAV1 display from NGX
{
IF &NAV1_Power_ON = 1
{
&D_ST_NAV1 = &ST_NAV1 // display new standby NAV1 frequency

Thanks for your help

Gordon
mvr1918
Site Admin
Posts: 1704
Joined: Thu Aug 30, 2012 3:35 pm

Re: Use OC Nav1 to set Nav1 and Nav2

Post by mvr1918 »

You can add the script code to the lines:

Var 2785, name ROT_NAV1_SW, static, Link IOCARD_ENCODER, Device 9, Input 0, Aceleration 1, Type 2

Var 2786, name ROT_NAV1_SF, static, Link IOCARD_ENCODER, Device 9, Input 4, Aceleration 1, Type 2

so it read:


Var 2785, name ROT_NAV1_SW, static, Link IOCARD_ENCODER, Device 9, Input 0, Aceleration 1, Type 2
{
Var 2787 = Var 2785
}

Var 2786, name ROT_NAV1_SF, static, Link IOCARD_ENCODER, Device 9, Input 4, Aceleration 1, Type 2
{
Var 2788 = Var 2786
}


After editing the txt file, compile it. Not tested, but hopefully it should work.
gblair
Posts: 33
Joined: Tue Sep 15, 2015 10:37 pm

Re: Use OC Nav1 to set Nav1 and Nav2

Post by gblair »

Thanks Roar, but that gives me an error when compiling

Phase 2
ERROR! - Command outside place
Line: 6582 Var 2787 = Var 2785
==> 2787
mvr1918
Site Admin
Posts: 1704
Joined: Thu Aug 30, 2012 3:35 pm

Re: Use OC Nav1 to set Nav1 and Nav2

Post by mvr1918 »

I was a bit fast in my answer and I see why you get the error during compilation

try:

Var 2785, name ROT_NAV1_SW, static, Link IOCARD_ENCODER, Device 9, Input 0, Aceleration 1, Type 2
{
&ROT_NAV2_SW = &ROT_NAV1_SW
}

Var 2786, name ROT_NAV1_SF, static, Link IOCARD_ENCODER, Device 9, Input 4, Aceleration 1, Type 2
{
&ROT_NAV2_SF = &ROT_NAV1_SF
}

the & sign should be the dollar sign( I can't write the correct sign with the computer I am logged into now)
gblair
Posts: 33
Joined: Tue Sep 15, 2015 10:37 pm

Re: Use OC Nav1 to set Nav1 and Nav2

Post by gblair »

Hi Roar,

Still not working I'm afraid.

You said the & in your text should be a dollar sign ($), but when I do that I get an error compiling. Making them & (ampersand) it does compile.

Using the compiled .ssi, there is a very big lag/delay on Nav2. I have to turn Nav1 settings multiple times to get a small change in Nav2 and they are not synced

Gordon
mvr1918
Site Admin
Posts: 1704
Joined: Thu Aug 30, 2012 3:35 pm

Re: Use OC Nav1 to set Nav1 and Nav2

Post by mvr1918 »

The interal coding in the PMS737 driver for MSFS is a little bit more tricky than the old ngx/ngxu driver code, so it is not that easy to make a working script code.

I will look into it later this week when I am back at my home where I have the cockpit.

It could be implemeted in this way:

Initially when the driver starts the NAV module is set as NAV1
When CRS2 knob on the MCP is used it activates the NAV module as NAV2
In this mode rotating the knobs on the NAV module will set NAV2
When CRS1 knob on the MCP is used it activates the NAV module as NAV1
In this mode rotating the knobs on the NAV module will set NAV1

So the last used of the CRSs decided which virtual NAV is binded to the hardware NAV
mvr1918
Site Admin
Posts: 1704
Joined: Thu Aug 30, 2012 3:35 pm

Re: Use OC Nav1 to set Nav1 and Nav2

Post by mvr1918 »

Here is a special script for those with only 1 NAV module.

https://1drv.ms/u/s!AjRjRKdTF9fGroIZ4m2 ... Q?e=l7thF9


Initially when the driver starts the NAV module is set as NAV1
When CRS2 knob on the MCP is used it activates the NAV module as NAV2
In this mode rotating the knobs or pushing the TRF on the NAV hardware module will set the NAV2 virtual module
When CRS1 knob on the MCP is used it activates the NAV module as NAV1
In this mode rotating the knobs or pushing the TRF on the NAV hardware module will set the NAV1 virtual module

So the last used CRS movement (CRS1 or CRS2) decides which virtual NAV module that is binded to which NAV hardware module.
gblair
Posts: 33
Joined: Tue Sep 15, 2015 10:37 pm

Re: Use OC Nav1 to set Nav1 and Nav2

Post by gblair »

Thanks Roar, it is working for me

Just a pity that we have to have these workarounds due to MS/Asobo

Regards
mvr1918
Site Admin
Posts: 1704
Joined: Thu Aug 30, 2012 3:35 pm

Re: Use OC Nav1 to set Nav1 and Nav2

Post by mvr1918 »

You are welcome.
Post Reply