REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    measuring relative quadrature encoder movement.

    REXYGEN Studio
    2
    2
    327
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      Gerritjan1
      last edited by

      Hello,

      I think I am missing something. On the monarco HAT you can use the MNR_CNT1Q input that will increase/decrease the counter value based on the amount of rotation of the encoder.
      I want to know the relative amount of movement the encoder made in a task cycle. For that I used the DIF_ block as in the attached picture: Encoder.png

      The issue is that that the counter outputs unsigned int and will underflow to 2^16-1 when moved below 0. This creates weird behavior. Is there a different block that solves the behavior?

      cechuratC 1 Reply Last reply Reply Quote 0
      • cechuratC
        cechurat @Gerritjan1
        last edited by

        @gerritjan1 Hi,

        have a look at function block "ABSROT". It might help you solve your task. Just set the lolim and hilim parameters as a range of the counter output.

        Let us know if you managed get the desired behaviour.

        Cheers,
        Tomas

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

        There is also an outdated REXYGEN community forum.

        Powered by NodeBB.