Results 1 to 10 of 14
-
02-06-2017, 03:06 PM #1
- Join Date
- Dec 2013
- Location
- Germany
- Posts
- 118
SIOC RMP1 with one rotary encoder and push button
Hello,
does anyone know if there is a possibility to switch between MHz and kHz with a rotary encoder?
I do not want to waste inputs with more encoders.
Thanks.
-
02-06-2017, 03:46 PM #2
Re: SIOC RMP1 with one rotary encoder and push button
Yes you can with a SIOC script. On the push of the button you switch between MHz and KHz and back.
-
02-06-2017, 04:44 PM #3
- Join Date
- Dec 2013
- Location
- Germany
- Posts
- 118
Re: SIOC RMP1 with one rotary encoder and push button
Do you have a code example?
I tried the following that do not work:
(pseudocode)
Var1 Input_SW type P
if Var1 = 0
MHz
else kHz
That is not the solution
-
02-06-2017, 05:00 PM #4
Re: SIOC RMP1 with one rotary encoder and push button
Here a script for a similar problem.
It should not be too difficult to change it to your requirements....
-
02-07-2017, 02:34 PM #5
- Join Date
- Dec 2013
- Location
- Germany
- Posts
- 118
Re: SIOC RMP1 with one rotary encoder and push button
Thanks for that.
Now the problem is that I just can turn it in both direction but unfortunatly it increses both times. Since the website says it should not I am confused.
Code:Var 0370, name Wechsler, Link IOCARD_SW, Input 274, Type P Var 0372, name COM1, Link IOCARD_ENCODER, Input 275, Aceleration 0, Type 2 { L0 = &COM1 IF &Wechsler = 0 { L0 = L0 * 25 &RMP1kHz = ROTATE 0 ,995 ,L0 } ELSE { &RMP1MHz = ROTATE 18 ,36 ,L0 } }
-
02-08-2017, 05:28 AM #6
Re: SIOC RMP1 with one rotary encoder and push button
Make sure that:* you are you using a Grey Type Rotary Encoder.* you are using two consecutive logical inputs of which 275 is the lowest number.and change Aceleration into 1.
-
02-08-2017, 07:06 AM #7
- Join Date
- Dec 2013
- Location
- Germany
- Posts
- 118
Re: SIOC RMP1 with one rotary encoder and push button
Hi. I am using the same encoder as for example HDG and SPD. And there it works(ok there I do not have to modify the code).
I will check acc 1.
-
02-08-2017, 11:19 AM #8
- Join Date
- Dec 2013
- Location
- Germany
- Posts
- 118
Re: SIOC RMP1 with one rotary encoder and push button
Acc 1 does not work. The encoder works as the following:
Rotate clockwise: 1) 275 on 276 off
2) 275 on 276 on
3) 275 off 276 on
4) both off
-
02-08-2017, 12:02 PM #9
Re: SIOC RMP1 with one rotary encoder and push button
Aceleration 1 only means that you will get the same increment/decrement when you turn the encoder slowly or fast...
-
02-08-2017, 12:32 PM #10
- Join Date
- Dec 2013
- Location
- Germany
- Posts
- 118
Re: SIOC RMP1 with one rotary encoder and push button
Okay. But in both ways it do not work.
So my questions are: Why does it only increase by 5? (*25 is set)
And why does it only increase?
Is the a possibility to "see" the direction?
Thanks.
Niklas
Hi...realize this has been a long time, but I'm heading down the path of building my own 777...
B777 Overhead Panel Design