© National Instruments | 3-27
NI 6612 User Manual
Two-Pulse Encoders
The counter supports two pulse encoders that have two channels: channels A and B.
The counter increments on each rising edge of channel A. The counter decrements on each rising
edge of channel B, as shown in Figure 3-31.
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,
Counter Signal Routing and Clock Generation, 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
Counter Value2 3 54 344