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
Good questions, I am not familiar with JeeHell.You can monitor var 372 in the IOCPConsole.exe program, check if you get negative values when turning in one direction and positive values when turning in the other direction....
This is the result: ( I turned more than two times!).
372=-1 - COM1
14=592 - RMP1kHz
372=0 - COM1
372=1 - COM1
14=568 - RMP1kHz
372=0 - COM1
372=1 - COM1
14=544 - RMP1kHz
372=0 - COM1
372=-1 - COM1
14=518 - RMP1kHz
372=0 - COM1
372=1 - COM1
14=494 - RMP1kHz
372=0 - COM1
To my mind I think that this is a JL problem? Isint it?
I have a new result with all var.:
372=-1 - COM1
14=133 - RMP1kHz
372=0 - COM1
16=128130 - RMP1Stby_disp
372=1 - COM1
14=108 - RMP1kHz
372=0 - COM1
16=128135 - RMP1Stby_disp
372=-1 - COM1
14=133 - RMP1kHz
372=0 - COM1
16=128140 - RMP1Stby_disp
In my oppinion this is a JL bug, isnt it?
Anyone who can use it with SIOC?
Regards,
Niklas
Is there no one using RMP with SIOC?