A rotary encoder is an optoelectronic rotary measurement device that directly converts measured angular displacement into digital signals (high-speed pulse signals).
Based on signal principles, encoders are classified into incremental encoders and absolute encoders.
Incremental encoders are the type most commonly used; their output pulse signals can be fed directly into a PLC, where the PLC's high-speed counter tallies the pulses to obtain the measurement result. Different encoder models feature varying numbers of output pulse phases: some output three phases (A, B, and Z), others output two (A and B), and the simplest types output only phase A.
The encoder has five leads: three for pulse output, one for the COM terminal, and one for the power supply (for open-collector output types). The power supply can be external or derived directly from the PLC's 24V DC supply. The negative (-) terminal of the power supply connects to the encoder's COM terminal, while the positive (+) terminal connects to the encoder's power input terminal. The encoder's COM terminal connects to the PLC's input COM terminal, and the A, B, and Z pulse output lines connect directly to the PLC's input terminals. Phases A and B are pulses with a 90-degree phase difference, while the Z-phase signal produces a single pulse per full rotation and typically serves as a zero-reference point; attention must be paid to the PLC input response time during connection. Rotary encoders also include a shielded wire, which should be grounded during use to enhance interference immunity.
Encoder-----------PLC
A-----------------X0
B-----------------X1
Z------------------X2
+24V------------+24V
COM------------- -24V-----------COM

