Delta Tau GEO BRICK LV Reference Manual

Page of 760
Turbo PMAC/PMAC2 Software Reference
 
Turbo PMAC Global I-Variables 
 203 
I68n0/I69n0  MACRO IC Channel n* Encoder/Timer Decode Control 
Range:   
0 - 15 
Units:   
None 
Default: 
Note: 
This I-variable is only active if the MACRO IC is present, and is a DSPGATE2 IC.  
The presence and type of MACRO ICs are reported in I4902 and I4903. 
I68n0 and I69n0 control how the encoder input signal for Channel n* (n* = 1 to 2) on a DSPGATE2 
MACRO IC is decoded into counts.  For MACRO ICs 0 and 2, n = n*; for MACRO ICs 1 and 3, n = n* + 
5 (i.e. I6810 controls MACRO IC 0 Channel 1; I6970 controls MACRO IC 3 Channel 2).  As such, this 
defines the sign and magnitude of a count.  The following settings may be used to decode an input signal.  
 
I68n0/I69n0 = 0: 
Pulse and direction CW 
 
I68n0/I69n0 = 1: 
x1 quadrature decode CW 
 
I68n0/I69n0 = 2: 
x2 quadrature decode CW 
 
I68n0/I69n0 = 3: 
x4 quadrature decode CW 
 
I68n0/I69n0 = 4: 
Pulse and direction CCW 
 
I68n0/I69n0 = 5: 
x1 quadrature decode CCW 
 
I68n0/I69n0 = 6: 
x2 quadrature decode CCW 
 
I68n0/I69n0 = 7: 
x4 quadrature decode CCW 
 
I68n0/I69n0 = 8: 
Internal pulse and direction 
 
I68n0/I69n0 = 9: 
Not used 
 
I68n0/I69n0 = 10:  Not used 
 
I68n0/I69n0 = 11:  x6 hall format decode CW* 
 
I68n0/I69n0 = 12:  MLDT pulse timer control 
(internal pulse resets timer; external pulse latches timer) 
 
I68n0/I69n0 = 13:  Not used 
 
I68n0/I69n0 = 14:  Not used 
 
I68n0/I69n0 = 15:  x6 hall format decode CCW* 
*requires version B or newer of the DSPGATE2 MACRO IC. 
In any of the quadrature decode modes, the MACRO IC 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 
the wrong direction sense is received, simply change to the other option (e.g. from 7 to 3 or vice versa). 
WARNING 
Changing the direction sense of the decode for the feedback encoder of a motor 
that is operating properly will result in unstable positive feedback and a dangerous 
runaway condition in the absence of other changes.  The output polarity must be 
changed as well to re-establish polarity match for stable negative feedback. 
In the pulse-and-direction decode modes, the MACRO IC is expecting the pulse train on CHAn, and the 
direction (sign) signal on CHBn.  If the signal is unidirectional, the CHBn line can be allowed to pull up 
to a high state, or it can be hardwired to a high or low state.