Push rotary and COM/NAV help [SOLVED]
Posted: Tue Aug 21, 2018 4:33 pm
Hello,
i need some help gentlemens. Another topic i read, how to set pushable single encoder for comm and nav panels. I use CTS 288v encoder
I changed the script and of course change device, output etc. The push funktion is working perfect if i push the button change before and after the decimal the adjustable numbers but the numbers changing randomly not continuously. I try normal encoder that is working good. On the encoder has 2 ground pole ( i soldered it for one) and has 3 more pole, one for the push button and two for a rotary these cable connect to the master card.
Can you help me?
Here is my script i was changed, i found another topic this site.
Thank you, Peter.
Re: COM/NAV with single encoder[SOLVED]
Postby nolatron » Mon May 14, 2018 1:35 am
Doh! I meant to post that here so it's archived here as well.
Here’s the changes I made for COM1 and NAV1 radio panels to work with a single rotary encoder. You’ll need to adjust the Device and Input numbers for your hardware, and possibly the rotation value, adding a negative (-) or not, depending on your hardware setup.
Find this block of code for the COM1 panel:
Var 0502, name ROT_COM1_SW, Link IOCARD_ENCODER, Device 31, Input 57, Aceleration 1, Type 2
{
L0 = &ROT_COM1_SW * 1 // change turning direction
&ST_COM1High = ROTATE 18 ,36 ,L0
CALL &Com1ToNGX
}
Var 0503, name ROT_COM1_SF, Link IOCARD_ENCODER, Device 8, Input 4, Aceleration 1, Type 2
{
L0 = &ROT_COM1_SF * 25 // instead of acceleration that doesn't wor
&ST_COM1Low = ROTATE 0 ,999 ,L0
CALL &Com1ToNGX
}
and replace with the following
Var 8600, name COM_SWITCH, Link IOCARD_SW, Device 31, Input 62 Type P // in the shaft
Var 8601, name ROT_COM1_SW, Link IOCARD_ENCODER, Device 31, Input 57, Aceleration 1, Type 2
{
L0 = v8601 // * -1 make sure turning right increments
IF v8600 = 0
{
L0 = &ROT_COM1_SW * 1 // change turning direction
&ST_COM1High = ROTATE 18 ,36 ,L0
CALL &Com1ToNGX
}
ELSE
{
L0 = &ROT_COM1_SW * 25 // instead of acceleration that doesn't wor
&ST_COM1Low = ROTATE 0 ,999 ,L0
CALL &Com1ToNGX
}
}
======
Find this block of code for the NAV1 panel:
Var 0524, name ROT_NAV1_SW, Link IOCARD_ENCODER, Device 31, Input 55, Aceleration 1, Type 2
{
L0 = &ROT_NAV1_SW * -1 // change turning direction
&ST_NAV1High = ROTATE 8 ,17 ,L0
CALL &Nav1ToNGX
}
Var 0525, name ROT_NAV1_SF, Link IOCARD_ENCODER, Device 9, Input 4, Aceleration 1, Type 2
{
L0 = &ROT_NAV1_SF * -5 // instead of acceleration that doesn't wor
&ST_NAV1Low = ROTATE 0 ,99 ,L0
CALL &Nav1ToNGX
}
and replace with the following
Var 8602, name NAV_SWITCH, Link IOCARD_SW, Device 31, Input 61 Type P // in the shaft
Var 8603, name ROT_NAV1_SW, Link IOCARD_ENCODER, Device 31, Input 55, Aceleration 1, Type 2
{
L0 = v8603 // * -1 make sure turning right increments
IF v8602 = 0
{
L0 = &ROT_NAV1_SW * -1 // change turning direction
&ST_NAV1High = ROTATE 8 ,17 ,L0
CALL &Nav1ToNGX
}
ELSE
{
L0 = &ROT_NAV1_SW * -5 // instead of acceleration that doesn't wor
&ST_NAV1Low = ROTATE 0 ,99 ,L0
CALL &Nav1ToNGX
}
}
Here's a video showing it in action:
https://www.youtube.com/watch?v=jpovN2mLImQ
i need some help gentlemens. Another topic i read, how to set pushable single encoder for comm and nav panels. I use CTS 288v encoder
I changed the script and of course change device, output etc. The push funktion is working perfect if i push the button change before and after the decimal the adjustable numbers but the numbers changing randomly not continuously. I try normal encoder that is working good. On the encoder has 2 ground pole ( i soldered it for one) and has 3 more pole, one for the push button and two for a rotary these cable connect to the master card.
Can you help me?
Here is my script i was changed, i found another topic this site.
Thank you, Peter.
Re: COM/NAV with single encoder[SOLVED]
Postby nolatron » Mon May 14, 2018 1:35 am
Doh! I meant to post that here so it's archived here as well.
Here’s the changes I made for COM1 and NAV1 radio panels to work with a single rotary encoder. You’ll need to adjust the Device and Input numbers for your hardware, and possibly the rotation value, adding a negative (-) or not, depending on your hardware setup.
Find this block of code for the COM1 panel:
Var 0502, name ROT_COM1_SW, Link IOCARD_ENCODER, Device 31, Input 57, Aceleration 1, Type 2
{
L0 = &ROT_COM1_SW * 1 // change turning direction
&ST_COM1High = ROTATE 18 ,36 ,L0
CALL &Com1ToNGX
}
Var 0503, name ROT_COM1_SF, Link IOCARD_ENCODER, Device 8, Input 4, Aceleration 1, Type 2
{
L0 = &ROT_COM1_SF * 25 // instead of acceleration that doesn't wor
&ST_COM1Low = ROTATE 0 ,999 ,L0
CALL &Com1ToNGX
}
and replace with the following
Var 8600, name COM_SWITCH, Link IOCARD_SW, Device 31, Input 62 Type P // in the shaft
Var 8601, name ROT_COM1_SW, Link IOCARD_ENCODER, Device 31, Input 57, Aceleration 1, Type 2
{
L0 = v8601 // * -1 make sure turning right increments
IF v8600 = 0
{
L0 = &ROT_COM1_SW * 1 // change turning direction
&ST_COM1High = ROTATE 18 ,36 ,L0
CALL &Com1ToNGX
}
ELSE
{
L0 = &ROT_COM1_SW * 25 // instead of acceleration that doesn't wor
&ST_COM1Low = ROTATE 0 ,999 ,L0
CALL &Com1ToNGX
}
}
======
Find this block of code for the NAV1 panel:
Var 0524, name ROT_NAV1_SW, Link IOCARD_ENCODER, Device 31, Input 55, Aceleration 1, Type 2
{
L0 = &ROT_NAV1_SW * -1 // change turning direction
&ST_NAV1High = ROTATE 8 ,17 ,L0
CALL &Nav1ToNGX
}
Var 0525, name ROT_NAV1_SF, Link IOCARD_ENCODER, Device 9, Input 4, Aceleration 1, Type 2
{
L0 = &ROT_NAV1_SF * -5 // instead of acceleration that doesn't wor
&ST_NAV1Low = ROTATE 0 ,99 ,L0
CALL &Nav1ToNGX
}
and replace with the following
Var 8602, name NAV_SWITCH, Link IOCARD_SW, Device 31, Input 61 Type P // in the shaft
Var 8603, name ROT_NAV1_SW, Link IOCARD_ENCODER, Device 31, Input 55, Aceleration 1, Type 2
{
L0 = v8603 // * -1 make sure turning right increments
IF v8602 = 0
{
L0 = &ROT_NAV1_SW * -1 // change turning direction
&ST_NAV1High = ROTATE 8 ,17 ,L0
CALL &Nav1ToNGX
}
ELSE
{
L0 = &ROT_NAV1_SW * -5 // instead of acceleration that doesn't wor
&ST_NAV1Low = ROTATE 0 ,99 ,L0
CALL &Nav1ToNGX
}
}
Here's a video showing it in action:
https://www.youtube.com/watch?v=jpovN2mLImQ