Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

NI-DAQmx: Measure Angular Position with Quadrature Encoder

0 ratings | 0.00 out of 5
Print

Downloads

Filename: 200010.vi
Requirements: View

I. Description:
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, and Z Index Value are all configurable.

Position is measured on the counter's default A, B, and Z input terminals (refer to section IV, I/O Connections Overview, for more information).

II. 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, Pulses Per Revolution, Z Index Enable, Z Index Phase, and Z Index Value to specify how you want the counter to measure position.

III. Block Diagram Steps:
1. Create a Counter Input channel to Angular Encoder. The Decoding Type, Pulses Per Revolution, Z Index Enable, Z Index Phase, Z Index Value parameters are used to determine how the counter should measure position.
2. Call the Start VI to arm the counter and begin measuring. The counter will be preloaded with the Initial Angle.
3. The counter will be continually polled until the Stop button is pressed on the front panel.
4. Call the Clear Task VI to clear the Task.
5. Use the popup dialog box to display an error if any.

IV. 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.

Requirements


Filename: 200010.vi

Software Requirements


Application Software: LabVIEW Base Development System 7.1.1
Language(s): LabVIEW

Hardware Requirements


Hardware Group: Counter/Timers (TIO)
Hardware Model: PXI-6608, PXI-6610, PXI-6624, PCI-6601, PXI-6602, PCI-6608, PCI-6610, PCI-6624, PXI-6601, PCI-6602
Driver: NI-DAQmx 8.0

 
0 ratings | 0.00 out of 5
Print

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/).