Encoder block in Simulink not resetting properly
Show older comments
Since the R2021b, Simulink hardware support for Arduino introduced also the rotary Encoder block: https://www.mathworks.com/help/supportpkg/arduino/ref/encodersensors.html
This block offers an ability to reset counter either regularly at sample time or using an external signal. Unfortunately, external signal reset simply doesn't work. It resets the counter in regular intervals, regardless of the reset input state. To me, it seems like a bug, but maybe I didn't catch something.
As you can see from the following image, Encoder is counting (blue line) regardless of the state at the Reset input (yellow), but then it's zeroing itself regularly.

I am using R2023a, Simulink Support Package for Arduino Hardware with Arduino UNO, and operating in Connected IO mode
Any advices, please?
Accepted Answer
More Answers (1)
Cris LaPierre
on 16 Jun 2023
1 vote
I get the same behavior when I test it. I would suggest reporting this here: https://www.mathworks.com/support/contact_us.html
1 Comment
Richard Balogh
on 16 Jun 2023
Categories
Find more on Arduino Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
