To download NI software, including the products shown below, visit ni.com/downloads.
This VI demonstrates on measuring the rotation of an incremental quadrature encoder using the DAQ-STC counter on E-series DAQ cards.
Connect phase A of the encoder to the SOURCE of counter 0 and connect phase B to DIO 6 which is the Up/Down line for counter 0.
If you configure Counter 0 for Hardware Up/Down counting, Counter 0 counts up when the Up/Down line is high and down when the Up/Down line is low.
If counting on the rising edge of phase A, the Up/Down line will be high when rotating clockwise (CW) and low when rotating counter-clockwise (CCW).
LabVIEW 2012 or compatible.
NI-DAQmx 15.5.1 or compatible.
Steps to Implement or Execute Code:
Block Diagram Steps:
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.