encoder is a device that compiles and converts a signal (such as a bit stream) or data into a signal form that can be used for communication, transmission, and storage. The encoder converts angular displacement or linear displacement into electrical signals. The former is called a code wheel and the latter is called a code ruler. Encoders can be divided into two types: contact type and non-contact type according to the readout mode; encoders can be divided into two types: incremental type and absolute type according to the working principle. The incremental encoder converts the displacement into a periodic electric signal, and then converts this electric signal into a counting pulse, and the number of pulses is used to indicate the magnitude of the displacement. Each position of the absolute encoder corresponds to a certain digital code, so its indication is only related to the start and end positions of the measurement, and has nothing to do with the middle process of the measurement.