User's Manual

PMAC User Manual
Setting Up a Motor 73
Shift-Right Parallel Conversion
If both bit 19 and bit 18 of the source and process word for a parallel data conversion are set to 1, the raw
data at the source address is shifted right three bits before being placed in the result word. Entries of this
form would have the conversion formats (bits 16-23 of this word) $2C, $3C, $6C, or $7C. This
conversion format is intended for data that is found in the high 16 bits of the 24-bit word (LSB is bit 8), as
for feedback from a MACRO input register.
Another use of this format is with the Acc-39 Handwheel Decoder. This board contains an HCTL-2000
quadrature decoder IC that converts the quadrature signal from a handwheel to an 8-bit parallel word that
is brought in on the JPAN control panel port. On the PMAC PC, -Lite, and -VME, this byte appears on
bits 8-15 of register Y:$FFC0. A normal parallel conversion would put the 1’s bit of the handwheel
counter at bit 13, effectively making it 256 times greater than if it were at the normal bit-5 location. This
shift-right conversion puts the 1's bit at bit 5, as for normal encoders.
When using this shift-right format, the bits enabled mask word should reflect the locations of the bits used
after the shift. For example, if all 16 high bits are used (bits 8 to 23), then the bits enabled mask word
should be $1FFFC0, to mark the use of bits 5 to 20 after the shift. With the Acc-39, which uses bits 8-15,
the mask word should be $001FC0, to mark the use of bits 5 to 12 after the shift.
Time-Base Conversion Entries
A time-base conversion is basically a scaled digital differentiation. When the source data is a counter, the
result is a frequency value. Every servo cycle the table calculates the difference between the values of the
source register for this cycle for the last cycle, and multiplies the difference by the scale factor.
The most common use for the resulting value is for time-base (feedrate override) control, which makes
the speed of PMAC execution proportional to an external frequency (usually the speed of a master device.
Refer to the Synchronizing PMAC to External Events section of this manual for details on how this is
used.
Time-Base Conversion
X-Words Y-words
1. Last cycle's source data:
Bits 0-4: Fractional Bits
Bits 5-23: Integer Bits
1. Source and process
Bits 0-15: X Address of source data (usually
a converted position register).
Bits 16-23: = $40 for time base conversion
2. Actual time-base value: product of scale
factor and difference between last two
source values
2. Time-base scale factor (supplied by user)
For example, the default conversion table creates a time-base value from the data in the Encoder 4
counter. It is desirable in this time-base conversion to have the source data with sub-count interpolation
— this significantly smoothes out the process by reducing the quantization error created by digital
differentiation. To do this, the source register should be from the conversion table itself, not from the
encoder counter.
In the default conversion table, the converted data from Encoder 4 is found in X:$0723 (1827 decimal).
Therefore, the first setup (Y) word for the time-base conversion entry is $400723 — the $40 specifies
time-base conversion, and the $0723 specifies the source address.
Scale Factor
The second setup (Y) word is the scaling factor — the value that multiplies the difference between the
current source data and the last source data. Setting its value usually requires some computation; this
subject is covered in the Time-Base Control section of Coordination Features of this manual.