User`s manual

4.0 - Programming PMAC
Page - 36
PMAC uses a multiple-step process to work with its feedback and master position information, and with external time-base
sources, to provide maximum power and flexibility. For most PMAC users with quadrature encoders, this process can be
virtually transparent, with no need to worry about the details. However, some users will need to understand this conversion
process in some detail to make the changes necessary to use other types of feedback, to optimize their system, or to perform
special functions. The PMAC Executive Program for PC compatible computers has a special editing screen for the
conversion table that makes viewing it and changing it very easy.
4.5.1 - Conversion Table Structure
The Encoder Conversion Table has two "columns", one in the X memory space of the processor, and one in the Y memory
space. The X-column holds the converted data, while the Y-column holds the addresses of the source registers, and the
conversion methods used on the data in each of those source registers. Basically, the user sets up the table by writing to the
Y-column, and PMAC uses the Y-column data to fill up the X-column each servo cycle.
The encoder conversion table starts at address $720 (1824 decimal) in PMAC's memory. It can continue through address
$73F (1855 decimal). The active part of the table is ended by the first Y word that is all zeros. The encoder table as shipped
from the factory converts the eight incremental encoder registers on the base PMAC board in locations $720 through $727
(1824 to 1831). Locations $728 and $729 create time base information from the converted Encoder 4 register ($723).
Y:$72A is zero, ending the active part of the table.
Some conversion types need more than one entry, the other Y-words are further setup parameters for the conversion.
The conversion result is placed in the last (highest address) X-word, and the other X-words hold intermediate data.
Example:
$728 (1832) $400723 Time-base from converted Enc. 4
$729 (1833) $000295 Time-base scale factor for above
The result of this timebase value based on encoder #4 is placed in register X:$0729, the second and last entry for this
conversion.
4.5.2 - Further Position Processing
Once the position feedback signals have been processed by the Encoder Conversion Table (which happens at the beginning
of each servo cycle), the data is ready for use by the servo loop. For each activated motor, PMAC takes the position
information in the 24-bit register pointed to by Ix03 and extends it in software to a 48-bit register that holds the actual motor
position. Several other features are available for conditioning the feedback signal as needed:
- Axis Position Scaling: in the coordinate system axis definition a scale factor determines the relationship between
encoder counts and user units to be used in motion programs.
- Leadscrew Compensation: a compensation table containing corrective values for errors due to the leadscrew
imperfections can be created for each motor.
- Backlash Compensation: On reversal of the direction of the commanded velocity, a pre-programmed backlash
distance is added to or subtracted from the commanded position.
- Torque Compensation Tables: The table belonging to a motor provides a torque correction to that motor as a
function of that motor’s position.
4.6 - PMAC position registers
YX
$0720
$073F
PMAC’s Conversion Table
Source address
and conversion
method
Result value for
PMAC’s usage
FeedBack device Servo algorithms