This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Using Single Ended and Differential Quadrature Encoders With NI DAQ Cards

Updated Nov 15, 2019

Reported In


  • Quadrature Encoder
  • PXIe-6341
  • PCI-6229
  • PXIe-6612


  • NI-DAQmx

Issue Details

I have a quadrature encoder that I want to use with my NI data acquisition (DAQ) card, but I am unsure what measurements I can take and how to connect the encoder to my DAQ card.


If you are not already familiar with the fundamentals of quadrature encoders, please see the Encoder Measurements: How-To Guide​.

How you use your quadrature encoder with your NI DAQ Card depends on whether you are using a single ended or a differential quadrature encoder.

Single Ended Quadrature Encoder

A standard single ended quadrature encoder has up to 3 channels— A, B and Z.
There are also 3 types of encoding possible, X1, X2 and X4.
These are explained in the Additional notes section below. 

To use your quadrature encoder with your DAQ card, connect channels A, B and Z to the counter's SOURCE, AUX and GATE pins, respectively. To find the pinout specific to your DAQ card, right click the card in NI MAX and select Device Pinout. Refer to the guide Connecting Quadrature Encoders to a DAQ Device for step-by-step instructions for wiring and configuring your NI DAQ device for quadrature encoder measurements.


Differential Quadrature Encoder

Differential quadrature encoders have 5 signals rather than 3. These are A, A Inverse, B, B Inverse and a Z index channel. Most of NI-DAQ cards do not support differential encoder measurements. The alternative would be to use the NI-9411's differential digital inputs to measure the encoder's differential outputs. 

However, we can use these differential encoders in the same way we would use a single ended quadrature encoder. You can connect just the A, B and Z index channels to the SOURCE, AUX and GATE pins on your counter, this will allow the encoder to operate as though it is a single ended device. You can also make the same connections with the A inverse, B inverse and Z channels to a second counter. 

Additional Information

Channels A and B are both output by the quadrature encoder 90 degrees out of phase with each other. Images of the A and B channel outputs are shown below. The direction of rotation is determined by which phase leads. When phase B leads A, then the shaft is rotating in the counter-clockwise direction. 

The types of encoding (X1, X2 and X4) simply determine what edges of channel A and B signals the counter increments/decrements on. For more information about these types of encoding, see page 7-15 of the M Series User Manual