beautypg.com

Encoder mode – Measurement Computing Personal Daq/3000 Series User Manual

Page 49

background image

Encoder Mode

TIP: When using a counter for a trigger source, it is a good idea to use a pre-trigger with a value of at least 1.

The reason is that all counters start at zero with the initial scan; and there will be no valid reference in regard to

rising or falling edge. Setting a pre-trigger to 1 or more ensures that a valid reference value is present, and that

the first trigger will be legitimate.

Introduction

Rotary shaft encoders are frequently used with CNC equipment, metal-working machines, packaging
equipment, elevators, valve control systems, and in a multitude of other applications in which rotary shafts
are involved.

The encoder mode allows the 3000 Series module to make use of data from optical incremental quadrature
encoders. When in the encoder mode, the Personal Daq accepts single-ended inputs. When reading phase
A, phase B, and index Z signals, the /3000 Series device provides positioning, direction, and velocity data.

The Personal Daq/3000 Series module can only receive input from up to two
encoders.

3000 Series Personal Daqs support quadrature encoders with a 16-bit (Counter Low), or a 32-bit (Counter
High) counter, 20 MHz frequency, and x1, x2, and x4 count modes. With only phase A and phase B
signals, 2 channels are supported; with phase A, phase B, and index Z signals, 1 channel is supported.

Quadrature encoders generally have 3 outputs: A, B, and Z. The A and B signals are pulse trains driven
by an optical sensor inside the encoder. As the encoder shaft rotates, a laminated optical shield rotates
inside the encoder. The shield has three concentric circular patterns of alternating opaque and transparent
windows through which an LED will shine. There is one LED for each of the concentric circular patterns
and likewise, one phototransistor. One phototransistor produces the A signal, another phototransistor
produces the B signal and the last phototransistor produces the Z signal. The concentric pattern for A has
512 window pairs (or 1024, 4096, etc.)

The concentric pattern for B has the same number of window pairs as A except that the entire pattern
is rotated by 1/4 of a window-pair. Thus the B signal will always be 90 degrees out of phase from the A
signal. The A and B signals will pulse 512 times (or 1024, 4096, etc.) per complete rotation of the
encoder.

The concentric pattern for the Z signal has only one transparent window and therefore pulses
only once per complete rotation. Representative signals are shown in the following figure.

Personal Daq/3000 Series User’s Manual

887894

Counter Input Modes 5-15