Reference Manual

PMAC 2 Software Reference
386 PMAC Saved Setup Registers
conversion representing 1/4096 of a line of the encoder. Since PMAC software considers 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 Encoder Interpolation Entries ($F) [New 3-line or 5-line entry for Geo PMAC
only]: The $F entry in the Geo PMAC is used to process the feedback from sinusoidal incremental
encoders through the Geo PMAC’s high-resolution interpolation circuitry in one of two ways. The two
methods are distinguished by bit 19 of the first setup line of the entry. If bit 19 is 0, making the second
hex digit $0, it is a 3-line entry that simply produces a position result with 4096 states per line of the
encoder, suitable for direct use as feedback or master data. If bit 19 is 1, making the second hex digit $8,
it is a 5-line entry that produces several data results useful for setup and diagnostics of the feedback. Note
that this conversion type operates differently from the interpolation entries on other types of PMACs.
High-Resolution Interpolation Position Entry ($F0xxxx) [Geo PMAC only]
If bit 19 of the first setup line of a Geo PMAC interpolation entry is 0, to specify an entry that produces a
usable position result, this is a three-line entry (as opposed to two lines on other PMACs). The entry
combines whole-line information from the encoder counter whose address is specified in the first line
with fractional-line information from the arctangent of the A/D converters whose address is specified in
the second line. Note that the direction sense of both parts must agree. On power-up/reset, PMAC
checks the direction sense of the counter and matches the direction sense of the fractional information to
this. However, if the direction sense of the counter is then changed with the encoder-decode I-variable,
the new settings must be saved and the PMAC reset to restore proper direction mapping.
Method/Address Setup Word: The first setup line of the three-line entry contains $F in the first hex digit,
$0 in the second hex digit, and the base address of the encoder channel to be read in the low 16 bits (the
third through sixth hex digits). In the Geo PMAC, the first encoder channel is at address $C000 and the
second encoder channel is at address $C008, so the first setup line is set to $F0C000 or $F0C008.
A/D-Converter Address Setup Word: The second line of the entry contains $00 in the first two hex digits
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
second setup line is set to $00FF00 or $00FF20.
Sine/Cosine Bias Setup Word: The third setup line in a high-resolution sinusoidal-encoder conversion
entry contains bias-correction terms for the sine and cosine ADC values. The high twelve bits (the first
three hex digits) contain the bias-correction term for the sine input; the low twelve bits (the last three hex
digits) contain the bias-correction term for the cosine input. Each 12-bit section should be treated as a
signed 12-bit value (so if the most significant of the 12 bits is a 1, the bias value is negative).
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 an analog “diagnostic” entry
in the conversion table. The result of that diagnostic entry, containing both bias corrections, can simply
be copied into this setup word.