MATLAB Answers

Arduino Engineering Kit - Scope does not show actual encoder position and speed

1 view (last 30 days)
Gabriele Boccacci
Gabriele Boccacci on 20 Jul 2020
Commented: Leung Marco on 29 Dec 2020
When tryng to follow the tutorial of section 2.3, the scope connected to the encoder block shows a constant value of zero, while in the tutorial it is shown a descending sine function. I am using Matlab r2020a and Simulink 10.1, because the r2019a, that came with the kit, has different issues on MacOS Catalina. I'm running it in normal mode.

Answers (1)

Arun Kumar
Arun Kumar on 23 Jul 2020
Hi Gabriele,
Encoder blocks are not supported for Normal mode simulation. In the documentation of the block it is mentioned:
"If you simulate a model that contains the Encoder block without connecting the hardware, the block outputs zeroes"
Try running the model in external mode.
HTH!
Thanks,
Arun
  2 Comments
Leung Marco
Leung Marco on 29 Dec 2020
Hi Arun,
I am facing the same problem as what the above people mentioned. There's not an option "External" availble next to "stop time" for version 2020a.
Please let us know how to solve this problem. Thanks very much!
Marco

Sign in to comment.

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by