For more information, see:
l Pulse measurement specifications (p. 169)
l Digital input/output specifications (p. 171)
l Period-averaging measurement specifications (p. 168)
6.6.5 Quadrature measurements
The Quadrature() instruction is used to measure shaft or rotary encoders. A shaft encoder
outputs a signal to represent the angular position or motion of the shaft. Each encoder will have
two output signals, an A line and a B line. As the shaft rotates the A and B lines will generate
digital pulses that can be read, or counted, by the datalogger.
In the following example, channel A leads channel B, therefore the encoder is determined to be
moving in a clockwise direction. If channel B led channel A, it would be determined that the
encoder was moving in a counterclockwise direction.
Terminals C1-C8 can be configured as digital pairs to monitor the two channels of an encoder.
The Quadrature() instruction can return:
l The accumulated number of counts from channel A and channel B. Count will increase if
channel A leads channel B. Count will decrease if channel B leads channel A.
l The net direction.
l Number of counts in the A-leading-B direction.
l Number of counts in the B-leading-A direction.
Counting modes:
l Counting the increase on rising edge of channel A when channel A leads channel B.
Counting the decrease on falling edge of channel A when channel B leads channel A.
l Counting the increase at each rising and falling edge of channel A when channel A leads
channel B. Counting the decrease at each rising and falling edge of channel A when
channel A leads channel B.
6. Measurements 76