Page 1 of 2
Use Nav1 Radio to set NAV1 and Nav2 (Solved)
Posted: Mon Jun 13, 2016 9:05 pm
by gblair
Hi Roar and all,
I am using Opencockpits 1 X NAV, 1 X COM and 1 X XPDR on my pedestal, all working correctly with OC4BA v4.
I am using PMDG 737NGX in my sim. 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 ?
Regards
Gordon
Re: Use Nav1 Radio to set NAV1 and Nav2
Posted: Fri Jun 17, 2016 8:57 am
by mvr1918
I have no time to look into this issue myself.
I believe it can be done quite easily by using the NAV1's TEST button as a latch for selecting either NAV 1 or NAV2. All code for both NAV1 and NAV2 is in the script already, but needs to be modified so that
it uses the NAV2 script codes when TEST is ON and NAV1 when TEST is OFF.
At least this is the way I would have tried to do it.
Re: Use Nav1 Radio to set NAV1 and Nav2
Posted: Sat Jun 25, 2016 2:27 pm
by gblair
Hi Roar, appreciate that your busy.
I'm still a newbie with SIOC and don't really follow the section on NAv1 and Nav2 in the script
I just need the Nav2 radio to follow the settings from NAV1. Isn't there a simple way to make the appropriate Nav2 variable/offset = the Nav1 variable/offset ?
Regards
Gordon
Re: Use Nav1 Radio to set NAV1 and Nav2
Posted: Wed Jun 29, 2016 11:45 am
by Alpin-Flier
Hi Gordon
I'm not an expert but I have done some successful script writing for my home cockpit. Let me try to help you.
If you use OCP4NGX_v4.0.txt or similar, you should make the following changes. Look for the two coincidences
&N1STtoNGX = TOBCD &ST_NAV1
and add for both immediately below
&N2STtoNGX = TOBCD &ST_NAV1
So the standby frequency is changed in the PMDG on both NAV units, when external NAV1 is changed.
Now you have to copy the transfer button of NAV1 to TFR NAV2. Look for
Var 6448, name NAV1_TFR, static, Link IOCARD_SW, Device 9, Input 6, Type P // Active/Standby swap button
{
L0 = &AC_NAV1
L1 = &ST_NAV1
&ST_NAV1 = L0
&AC_NAV1 = L1
CALL &OutAC_NAV1
CALL &OutST_NAV1
}
Insert a line at the end like follows
Var 6448, name NAV1_TFR, static, Link IOCARD_SW, Device 9, Input 6, Type P // Active/Standby swap button
{
L0 = &AC_NAV1
L1 = &ST_NAV1
&ST_NAV1 = L0
&AC_NAV1 = L1
CALL &OutAC_NAV1
CALL &OutST_NAV1
&NAV2_TFR = NAV1_TFR
}
I could not try it, but it should work. Please let us know the result.
Regards
Urs
Re: Use Nav1 Radio to set NAV1 and Nav2
Posted: Wed Jun 29, 2016 8:59 pm
by gblair
Hi Urs,
Thanks for helping me, I was looking in the right place but not sue what changes to make.
After making your suggested changes and compiling, I get the following error:
Open file "F:\Lockheed Martin\SIOC\OCP4NGX_v4.4_NAV12.txt"
10:40:17 PM
Phase 1
.OK.
Phase 2
ERROR! - Unknow operator
Line: 2985 &NAV2_TFR = NAV1_TFR
==> NAV1_TFR
Re: Use Nav1 Radio to set NAV1 and Nav2
Posted: Wed Jun 29, 2016 9:51 pm
by Alpin-Flier
Hi Gordon
Ups, sorry, my fault. The last line must be
&NAV2_TFR = &NAV1_TFR
Try with this. Good luck.
Urs
Re: Use Nav1 Radio to set NAV1 and Nav2
Posted: Thu Jun 30, 2016 7:19 pm
by gblair
Hi Urs,
Thanks very much, works perfect and I'm beginning to understand more of SIOC.
If you don't mind me asking, where did you learn SIOC ?
I have been looking at Niko Kaan's site
http://www.lekseecon.nl/howto.html anything else you can recommend?
Regards,
Gordon
Re: Use Nav1 Radio to set NAV1 and Nav2
Posted: Thu Jun 30, 2016 9:04 pm
by Alpin-Flier
Hi Gordon
Thank you very much for the positive feedback. I started with the same informations you have. The rest is learning by doing, from short test scripts to quite large programs, e.g. for the chronometers, that did not work the same way as in the PMDG. Now they do
All the best
Urs
Re: Use Nav1 Radio to set NAV1 and Nav2
Posted: Sat Jun 09, 2018 2:57 pm
by gblair
Hi all,
I have updated to the latest script v4.6 which seems quite different to the older version that I was using when Alpin-Flier helped me to modify the script.
Now I cant find the section where I need to make the modifications again.
Can someone please help me to do this in the v4.6 script
Thanks
Gordon
Re: Use Nav1 Radio to set NAV1 and Nav2
Posted: Thu Jun 14, 2018 12:20 pm
by gblair
Anyone able to offer some help ?