Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    75+ Posting Member
    Join Date
    Dec 2013
    Location
    Germany
    Posts
    118
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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.

  2. #2
    500+ This must be a daytime job kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    698
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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.

  3. #3
    75+ Posting Member
    Join Date
    Dec 2013
    Location
    Germany
    Posts
    118
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

  4. #4
    500+ This must be a daytime job kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    698
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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....

  5. #5
    75+ Posting Member
    Join Date
    Dec 2013
    Location
    Germany
    Posts
    118
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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
      }
    }
    In addition, it increases only by 5. But this amy come from JL?

  6. #6
    500+ This must be a daytime job kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    698
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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.

  7. #7
    75+ Posting Member
    Join Date
    Dec 2013
    Location
    Germany
    Posts
    118
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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.

  8. #8
    75+ Posting Member
    Join Date
    Dec 2013
    Location
    Germany
    Posts
    118
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

  9. #9
    500+ This must be a daytime job kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    698
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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...

  10. #10
    75+ Posting Member
    Join Date
    Dec 2013
    Location
    Germany
    Posts
    118
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

Page 1 of 2 12 LastLast