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.
Printable View
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.
Yes you can with a SIOC script. On the push of the button you switch between MHz and KHz and back.
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
Here a script for a similar problem.
It should not be too difficult to change it to your requirements....
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.
In addition, it increases only by 5. But this amy come from JL?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
}
}
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.
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.
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
Aceleration 1 only means that you will get the same increment/decrement when you turn the encoder slowly or fast...
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