Reference Manual
PMAC 2 Software Reference
PMAC Saved Setup Registers 387
Result Word: The output value of the high-resolution sinusoidal-encoder conversion in the Geo PMAC is
placed in the 24-bit X-register of the third line of the conversion table entry. Bit 0 of the result contains
the LSB of the conversion, representing 1/4096 of a line of the encoder. Since PMAC software considers
the contents of Bit 5 to be a “count” for scaling purposes when used for servo feedback or master data, bit
0 will be considered 1/32 of a count. This means that PMAC software will scale the data as 128
“software counts” per line of the encoder.
High-Resolution Interpolation Diagnostic Entry ($Fxxxxx, bit 19 = 1) [Geo PMAC only]
If bit 19 of the first setup line of a Geo PMAC “interpolation” entry is 1, to specify an entry that 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 or resolver and to optimize the accuracy of the conversion during initial setup, and/or to
check for loss of the encoder or resolver during the actual application. Bit 16 of the first setup line
determines whether the result produced is the sum of the squares of the two analog inputs (bit 16 = 0) or
the bias terms for the analog inputs (bit 16 = 1).
Method/Address Setup Word: The first setup line of the five-line entry contains $F in the first hex digit,
$8 in the second hex digit (bit 19 = 1) to produce a sum-of-squares result or $9 in the second digit (bit 19
= 1, bit 16 =1) to produce a bias correction term, and the address of the first of the two A/D converters in
the low 16 bits (the last four hex digits). The second A/D converter will be read at the next higher
address. In the Geo PMAC, the first A/D converter for Channel 1 is at address $FF00, and the first A/D
converter for Channel 2 is at address $FF20, so the first setup line is set to $F8FF00 or $F8FF20 to
produce a sum-of-squares result, or to $F9FF00 or $F9FF20 to produce a bias-correction result.
When set up to determine the bias term, if bit 17 is set to 0, making the second hex digit $9 (as the above
instructions say), the minimum and maximum values for the sine and cosine readings that are used to
determine the appropriate bias values are set to 0. As soon as the Geo PMAC starts accumulating
minimum and maximum values (the next servo cycle), it will set bit 17 to 1, making the second hex digit
to $B. If you want to start a new test, for example after a circuit adjustment, you must set bit 17 to 0
again by making the second hex digit $9.
Reserved Setup Word: The second setup line of this entry type is reserved for future use, and should be
left at 0.
Active Bias Correction Setup Word: The third setup line of the five-line entry contains the sine and cosine
bias terms that are used in the sum-of-squares calculations. Two signed 12-bit bias terms are combined in
a 24-bit word. The sine bias-correction term is in the high 12 bits (bits 12 – 23); the cosine bias-
correction term is in the low 12 bits (bits 0 – 11). These terms match the high 12 bits from the
corresponding A/D converters. This word does not necessarily match the bias “result” term derived from
using this entry to determine a suggested bias correction, or the bias correction used in the “feedback”
table entry for the encoder or resolver.
Reserved Setup Words: The fourth and fifth setup lines of this entry type are reserved for future use, and
should be left at 0.
Result Word (Sum of Squares): When bit 16 of the first setup line is 0, the final (fifth) result word
contains the sum of squares of the biased sine and cosine measurements for the most recent servo cycle.
Result = (SineADC + SineBias)
2
+ (Cosine ADC + CosineBias)
2
The values SineADC and CosineADC are read from the A/D converters at the address specified in the first
setup line. The values SineBias and CosineBias are read from the third setup line.
To understand the scaling of the result word, it is best to think of all four of the values as being
normalized, that is, as having a valid range of -1.0 to +1.0. With small bias terms, the sum of squares