Quadrature Decoder Tool
Tool Name | Short Name | Inputs Count/Type | Outputs Count/Type/Name |
---|---|---|---|
Quadrature Decoder Tool | QDC | 2 paired I/O input lines |
1 event stream: QDC<i> 1 status bit: QDC<i>Direction 1 status word: QDC<i>Position |
Quadrature Decoder Tool Wiring Diagram
The quadrature edge detector is fed by a pair of signals named A and B delivered by a phase-quadrature motion encoder device.
The source selectors allows following pairs of adjacent input-capable GPIO input lines to be selected as A/B input sources: DIN11-DIN12, DIN21-DIN22, TTLIO11-TTLIO12, TTLIO21-TTLIO22, IIN11-IIN12, IIN13-IIN14, IIN21-IIN22, and IIN23-IIN24.
The tool includes the following function blocks:
- A quadrature edge detector
- A backward motion compensator
- A 32-bit position counter
The tool delivers:
- One I/O Toolbox event stream named QDC<i>.
- A direction status bit indicating the direction of the motion.
- A position status word indicating the position offset.
Quadrature Decoder Tool Operation
The Quadrature Decoder Tool decodes the A/B signals and delivers 1, 2, or 4 events every A/B cycle, possibly filtered by the backward motion compensator.
The quadrature edge detector analyzes the transitions on the A/B lines. It delivers:
- An event stream, named U, having 1, 2, or 4 events every A/B cycle according the
QuadratureDecoderToolActivation
settings - An identification of the phase between A and B (A leads B or vice-versa)
The U stream may be filtered by the backward motion compensator before being delivered to the QDC<i> output.
The phase indication may be
inverted according to the QuadratureDecoderToolForwardDirection
settings before being delivered to the Direction
output.
The backward motion compensator filters the U stream according to the QuadratureDecoderToolOutputMode
setting.
When set to Unfiltered
, all the events of the U stream are delivered to the QDC<i> output:
When set to ForwardOnly
, only the events corresponding to the forward direction are delivered to the QDC<i> output:
When set to FirstPassForwardOnly
, only the events corresponding to the first pass in the forward direction are delivered to the
QDC<i> output:
The position counter increments by 1 for any U event corresponding to the forward direction and decrements by 1 for the backward direction.
The counter can be reset using the QuadratureDecoderToolPositionReset
command.