omron — I900, I905, ... I975 Encoder n Decode Control Encoder I-Variable 0

PMAC Product Guide Encoder/Flag Setup I-Variables One PMAC can have up to 16 incremental encoder channels -- four per gate array IC. Each encoder and its related flags and registers are set up using (up to) five I-Variables. The encoders and their flags are numbered 1 to 16, matching the numbers of their pinouts (e.g. CHA1, CHB1, and CHC1 belong to encoder 1.) The encoder I-Variables are assigned to the different encoders as follows: I900 - I904 -- Encoder 1 I905 - I909 -- Encoder 2 I910 - I914 -- Encoder 3 I915 - I919 -- Encoder 4 ...

I970 - I974 -- Encoder 15 I975 - I979 -- Encoder 16 An encoder is assigned to a motor for position, velocity (feedback), handwheel (master), or feedpot (frequency control) by using the appropriate motor I-Variables (see above). I900, I905, ... I975 Encoder n Decode Control Encoder I-Variable 0 Range: 0 .. 15 Default: 7 Units: none This parameter controls how the input signal for Encoder n is decoded into counts. As such, this defines the sign and magnitude of a count. The following settings may be used to decode an input signal.

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 using the wrong direction sense, simply change to the other option (e.g. from 7 to 3 or vice versa). Warning:

Changing the direction sense of the encoder decode for a motor that is servoing properly will result in unstable positive feedback and a dangerous runaway condition in the absence of other changes (for motors not commutated by PMAC from the same encoder). The output polarity must be changed as well to re- establish polarity match for stable negative feedback. 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: 126 I-Variables Value 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