Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC Global I-Variables 248
Each 12-bit bias-correction term should contain the value opposite that which the high 12 bits of the
matching A/D converter report when they should ideally report zero. In action, the bias term will be
added to the high 12 bits of the corresponding ADC reading before subsequent calculations are done.
For example, if the bias-correction word were set to $004FFA, the sine bias correction would be +4 LSBs
of a 12-bit ADC, and the cosine bias correction would be -6 LSBs ($FFA = -6) of a 12-bit ADC. In use, 4
12-bit LSBs would be added to the sine reading, and 6 12-bit LSBs would be subtracted from the cosine
reading each cycle before further processing.
In most cases, the bias-correction word will be determined automatically by a high-resolution
“diagnostic” entry (format $F/$1) in the conversion table. The result of that diagnostic entry, containing
both bias corrections, can simply be copied into this setup word.
Note: In firmware revisions 1.940 and older, the bias word contained a single 24-bit bias term that was
added to both the sine and the cosine terms.
Conversion Result: The result of the conversion is placed in the X-register of the third line of the entry.
Careful attention must be paid to the scaling of this 24-bit result. The least significant bit (Bit 0) of the
result represents 1/4096 of a line of the sine/cosine encoder.
When Turbo PMAC software reads this data for servo use with Ixx03, Ixx04, Ixx05, or Isx93, it expects
to find data in units of 1/32 of a “count”. Therefore, PMAC software regards this format as producing
128 “counts” per line. (The fact that the hardware counter used produces 4 counts per line is not relevant
to the actual use of this format; this fact would only be used when reading the actual hardware counter for
commutation or debugging purposes.)
Example: This format is used to interpolate a linear scale with a 40-micron pitch (40m/line), producing a
resolution of about 10 nanometers (40,000/4096), used as position feedback for a motor. PMAC
considers a “count” to be 1/128 of a line, yielding a count length of 40/128 = 0.3125 m. To set user
units of millimeters for the axis, the axis scale factor would be:
High-Resolution Interpolation Diagnostic Entry ($F/$1): An ECT entry in which the first hex digit of
the first line is $F and the first hex digit of the second line is $1 produces either vector magnitude or
analog-input bias terms for the sine and cosine inputs of a sinusoidal encoder or resolver. This is a five-
line entry. These result values can be used to verify proper setup and interface of the encoder and to
optimize the accuracy of the conversion during initial setup, and/or to check for loss of the encoder during
the actual application. Bit 0 of the second setup line determines whether the result produced is the sum of
the squares of the two analog inputs (bit 0 = 0) or the bias terms for the analog inputs (bit 0 = 1).
Method/Address Setup Word: The first setup line (I-variable) of the five-line entry contains $F in the first
hex digit, and the address of the first of the two A/D converters in the low 19 bits (bits 0 18). The
second A/D converter will be read at the next higher address.
The following table shows the possible entries when the ACC-51P, with PMAC(1) style Servo ICs, is
used:
UserUnit
counts
m
count
mm
m
UserUnit
mm
actorAxisScaleF 3200
3125.0
*
1000
*
1