© National Instruments
|
3-27
Figure 3-31.
Measurements Using Two Pulse Encoders
Angular Position Measurement
In an angular measurement task, the counter measures the angle of a quadrature encoder or
two-pulse encoder. Refer to the
Quadrature and Two-Pulse Encoder Overview
section for more
information.
Create Channel
To make an angular measurement, first call the DAQ Create Channel (CI-Position-Angular
Encoder) VI or function. When calling the VI or function, specify the following parameters:
•
Decoding Type—For two-pulse encoders, set this to Two-Pulse Counting. For quadrature
encoders, set this to XI, X2, or X4 decoding.
•
Z index enables, z index phase, z index value—If the encoder has a z output, set z index
enable to True. Set the z index phase to indicate when to reset the counter. Set z index value
to indicate the value to reset the counter to.
•
Pulses per revolution—Indicates the number of pulses of the A signal on each revolution
of the counter.
•
Initial angle—Indicates the starting angle of the encoder.
Channel Settings
By default, the counter uses the default PFI terminals for the A, B, and Z encoder signals. Refer
to Chapter 5,
, for more information.
To change the source of the A, B, or Z signal, set the relevant DAQmx Channel property:
•
CI.Encoder.AInputTerm
•
CI.Encoder.BInputTerm
•
CI.Encoder.CInputTerm
Ch A
Ch B
Co
u
nter V
a
l
u
e
2
3
5
4
3
4
4