Quadrature Encoders

NI-DAQ Measurement

Quadrature Encoders

Quadrature encoders, or angular encoders, cause two signals to pulse while a shaft in the encoder rotates. These signals are signal A (also called channel A) and signal B (also called channel B). Signal A and B are offset by 90°, which determines the direction the encoder moves. For instance, in a quadrature encoder, if signal A leads, the encoder rotates clockwise. If signal B leads, the encoder rotates counter clockwise.

Counters on M Series, C Series, NI-TIO devices support three types of decoding for quadrature encoders: X1, X2, and X4. With X1 decoding, when signal A leads signal B, the counter increments on the rising edge of signal A. When signal B leads signal A, the counter decrements on the falling edge of signal A.

With X2 decoding, the same behavior holds as with X1, except the counter increments and decrements on both rising and falling edges of signal A.

Similarly, with X4 decoding, the counter increments and decrements on both rising and falling edges of both signal A and signal B. X4 decoding is more sensitive to position, but is also more likely to provide an incorrect measurement if there is vibration in the encoder.

Many encoders also use z indexing for precise determination of a reference position.