The photoelectric rotary encoder is an angular position sensor. The encoder shaft is mechanically connected to the rotating shaft of the machine, and the shaft rotation drives the code disc to rotate. The code disc is composed of a series of opaque and transparent sectors. The light emitted from the light emitting diode (LED) passes through the transparent sector of the code wheel and is detected by the photodiode. The photodiode detects the light and sends out an electrical signal, which is amplified and converted into a digital signal before being transmitted to the processing system or frequency converter. Therefore, the output of the encoder reflects the angular position of the shaft rotation in the form of a digital signal.