Encoder
Measure incremental position and direction of motor connected to EV3 brick
Add-On Required: This feature requires the Simulink Support Package for LEGO MINDSTORMS EV3 Hardware add-on.
Libraries:
Simulink Support Package for LEGO MINDSTORMS EV3 Hardware
Description
Use the Encoder block to measure the incremental wheel rotation of the motor connected to an EV3 brick in degrees. 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.
You can use the Motor block with the Encoder block.
During simulations without hardware, this block emits zeros. See Block Produces Zeros or Does Nothing in Simulation.
Ports
Input
Output
Parameters
Version History
Introduced in R2012a