measuring relative quadrature encoder movement.
-
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: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?
-
@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