Reference Manual

PMAC 2 Software Reference
PMAC I-Variable Specification 127
The following settings may be used to decode an input signal.
Setting Meaning
0 pulse and direction CW
1 x1 quadrature decode CW
2 x2 quadrature decode CW
3 x4 quadrature decode CW
4 pulse and direction CCW
5 x1 quadrature decode CCW
6 x2 quadrature decode CCW
7 x4 quadrature decode CCW
In any of the quadrature decode modes, PMAC is expecting two input waveforms on
CHAn and CHBn, each with approximately 50% duty cycle, and approximately one-
quarter of a cycle out of phase with each other. “Times-one” (x1) decode provides one
count per cycle; x2 provides two counts per cycle; and x4 provides four counts per cycle.
The vast majority of users select x4 decode to get maximum resolution.
The “clockwise” (CW) and “counterclockwise” (CCW) options simply control which
direction counts up. If you get the wrong direction sense, simply change to the other
option (e.g. from 7 to 3 or vice versa).
In the pulse-and-direction decode modes, PMAC is expecting the pulse train on CHAn,
and the direction (sign) signal on CHBn. If the signal is unidirectional, the CHBn input
can be tied high (to +5V) or low (to GND), or, if set up by E18-E21, E24-E27 for single-
ended (non-differential) input, left to float high.
Any spare encoder counters may be used as fast and accurate timers by setting this
parameter in the 8 to 15 range. In this range, any input signal is ignored. The following
settings may be used in timer mode:
Setting Meaning
8 Timer counting up at SCLK/10
9 Timer counting up at SCLK/10
10 Timer counting up at SCLK/5
11 Timer counting up at SCLK/2.5
12 Timer counting down at SCLK/10
13 Timer counting down at SCLK/10
14 Timer counting down at SCLK/5
15 Timer counting down at SCLK/2.5
These timers are particularly useful when the related capture and compare registers are
utilized for precise event marking and control, including triggered time base. The SLCK
frequency is determined by the crystal clock frequency and E34-E38.
See Also
Triggered Time Base (Synchronizing PMAC to External Events)
I-variables Ix03-Ix05, Ix93
Jumpers E18-E21, E24-E27, E34-E38.