NI-DAQmx Base: Measure Linear Position with a Quadrature Encoder.
Overview
An example program for measuring a linear encoder through DAQmx Base.
The LabVIEW and C code examples demonstrate how to measure linear position using a quadrature encoder on a counter input channel with DAQmx Base. The Decoding Type, Distance Per Pulse, Z Index Enable, Z Index Phase, and Z Index Value are all configurable.
Position is measured on the counter's default A, B, and Z input terminals on the counter specified.
Instructions for Running:
1. Select the Physical Channel which corresponds to the counter you want to measure position on the DAQ device.
2. Enter the Decoding Type, Distance Per Pulse, Z Index Enable, Z Index Phase, and Z Index Value to specify how you want the counter to measure position.
Requirements
Filename: measure_linear_encoder.c
Software Requirements
Application Software: LabVIEW Professional Development System
Language(s): LabVIEW, C
Hardware Requirements
Driver: NI-DAQmx Base
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
