The encoder is mainly used to detect the angular position of the motor and can be converted into a linear running distance. Of course, the motor speed can also be calculated by calculating the number of pulses per unit time, whether it is used to detect speed or position-all for precise control