Encoder
Measure rotation of motor in ticks
- Library:
Simulink Support Package for Arduino Hardware / Arduino Motor Carrier
Description
TheEncoderblock reads the position and rotational speed of the motor from an encoder that is connected to an MKR Motor Carrier. The position is measured in ticks, and the speed is measured in ticks per second. Every increment in the tick count indicates a clockwise rotation, and every decrement in the tick count indicates a counterclockwise rotation.
If you simulate a model that contains theEncoderblock without connecting the hardware, the block outputs zeroes. For more information, seeBlock Produces Zeros or Does Nothing in Simulation.