The encoder to convert rotational motion into electrical pulses are used. The pulses produced by the encoder can be parsed and processed by the microcontroller and PLC.
Nowadays, more than ever fallen encoders in industrial environments. Because of this progress and the accuracy of the machines today. The encoder to determine position, angle, speed and length are used.