Encoder
Libraries:
Simulink Support Package for Raspberry Pi Hardware /
Basic
Description
The Encoder block outputs the tick count from a quadrature encoder on a rotating motor connected to a Raspberry Pi® hardware board. Every increment in the tick count of the encoder indicates that the motor is rotating clockwise. Every decrement in the tick count of the encoder indicates that the motor is rotating counterclockwise. The total tick count represents the incremental position of the rotating motor.
You can reset the encoder readings from the block using the Reset mode parameter in the block parameters dialog box.
When simulating without hardware, this block outputs zeros. For more information, see Block Produces Zeros or Does Nothing in Simulation.
Ports
Input
Output
Parameters
Version History
Introduced in R2021a