ni.com is currently experiencing download issues.
Support teams are actively working on the resolution.
ni.com is currently experiencing download issues.
Support teams are actively working on the resolution.
To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how to measure angular position using a quadrature encoder on a Counter Input Channel. The Decoding Type, Pulses Per Revolution, Z Index Enable, Z Index Phase, Z Index Value, and Sample Clock Source are all configurable.
Description
Position is measured on the counter's default A, B, and Z input terminals (refer to section IV, I/O Connections Overview, below for more information)..
Note: For buffered position measurement, an external sample clock is necessary to signal when a sample should be inserted into the buffer. This is set by the Clock Source control. This example is set up to use the other counter on a two+ counter device to provide the external clock, eliminating the need to provide an alternate clock. This does however, use an another counter in addition to the counter which measurese the angular position.
Steps to Complete
Front Panel Steps:
Block Diagram Steps:
I/O Connections Overview:
The counter will measure position on the A, B, and Z Input Terminals of the counter specified in the Physical Channel I/O control.
Position measurement only works with TIO counters. For more information on the default counter input and output terminals for your device, open the NI-DAQmx Help, and refer to Counter Signal Connections found under the Device Considerations book in the table of contents.
Requirement:
LabVIEW 8.5 or compatible
NI-DAQmx 9.0 or compatible
Real of Simulated NI-DAQ device with two or more counters
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.