Represent connected Optical Shaft Encoder and read relative position of motor shaft in ticks
Simulink Coder Support Package for VEX EDR V5 Robot Brain / Sensors

The Optical Shaft Encoder block represents an Optical Shaft Encoder that is connected to the 3-wire ports of VEX EDR V5 Robot Brain, and reads the relative position of the motor shaft in ticks. The value increments for anti-clockwise rotation and decrements for clockwise rotation of the motor shaft.
The tick count also depends on the Reset mode that you selected.