Configuring The Quadrature Decoder - Matrox GatorEye Series Installation And Technical Reference

Table of Contents

Advertisement

Configuring the quadrature decoder

Matrox GatorEye features a quadrature decoder that can decode the two-bit code
from a rotary encoder. A rotary encoder (sometimes called a quadrature encoder)
is a device that provides information about the position and direction of a rotating
shaft (for example, that of a conveyor belt). The encoder outputs a two-bit code
(also known as a Gray code) every time the shaft turns by one step in either
direction. The count and sequence determines the position of the rotating shaft
and the direction of rotation.
State 1
State 2
State 3
State 4
The quadrature decoder of Matrox GatorEye can decode Gray code and update a
32-bit internal counter. The sequence going from State 1 through State 2 through
State 3 through State 4 increments the 32-bit internal counter (that is, starting
from State 1, the direction of the internal counter is positive when bit B changes
before bit A). You can read the quadrature counter at each change of state (tick).
You can also use the quadrature counter to increment a general counter which can
then be used to trigger a grab. Alternatively, you can trigger a grab on each tick
(clockwise, counter-clockwise, the next new tick, or any tick) of the quadrature
encoder. In the event that the Gray code from the encoder remains the same or
the sequence reverses, the quadrature decoder will take this into account and the
counter will either remain the same or decrement accordingly. The quadrature
decoder supports a maximum of 10,000 cycles/sec (40,000 counts/sec).
❖ Note that an external source must be used to power the rotary encoder.
To use the quadrature decoder, you must configure two auxiliary lines to receive
quadrature input signals; one line to carry bit A, and one line to carry bit B. You
can control the quadrature decoder settings using the MIL-Lite function
MdigControlFeature(), modifying the DCF file, or using the GenICam-extension
features of your Matrox GatorEye. The following subsection details how to use
the Matrox GatorEye GenICam-extension features that pertain to the quadrature
decoder.
Configuring the quadrature decoder
Quadrature bit A
0
0
1
1
Quadrature bit B
0
1
1
0
37

Advertisement

Table of Contents
loading

Table of Contents