Reference Manual
PMAC 2 Software Reference
208 PMAC On-Line Command Specification
correction; if none is specified, PMAC assumes the target is the addressed motor;
• {count length} is a positive integer representing the span of the table in
encoder counts of the source motor.
Remarks
This command establishes a leadscrew (position) compensation table assigned to the
addressed motor. The next {entries} constants sent to PMAC will be placed into this
table. Once defined, the tables are enabled and disabled with the variable I51.
The table “belongs” to the currently addressed motor, and unless otherwise specified in the
command line, it will use the addressed motor both for source position data and as the target
for its corrections. Each motor can only have one table that “belongs” to it (for a total of 8
tables in one PMAC), but it can act as a source or a target for multiple motors.
Note:
PMAC will reject this command, reporting an ERR003 if I6=1 or 3, if
any COMP buffer exists for a lower numbered motor, or if any
TCOMP, BLCOMP, TBUF, ROTARY, or GATHER buffer exists.
Any of these buffers must be deleted first. COMP buffers must be
defined from high-numbered motor to low-numbered motor, and
deleted from low-numbered motor to high-numbered motor.
It is possible to directly specify a source motor (with #{source}), or source and target
motors (with #{source},#{target}), in this command. Either or both of them may be
different from the motor to which the table belongs. (In other words, just because a table
belongs to a motor does not necessarily mean that it affects or is affected by that motor’s
position.)
The table can operate as a function of either the desired (commanded) or actual position of
the source motor. If a D is entered immediately after the source motor number (which must
be explicitly declared here), the table operates as a function of the desired position of the
source motor; if no D is entered, the table operates as a function of the actual position of the
source motor.
The last item on the command line, {count length}, specifies the span of the
compensation table in encoder counts of the source motor. In use, if the source motor
position goes outside of the range 0 to count-length, the source position is “rolled over” to
within this range before the correction is computed. The spacing between entries in the table
is {count length} divided by {entries}.
On succeeding lines will be given the actual entries of the table. The units of these entries
are 1/16 count, and the entries must be integer values. The first entry is the correction at one
spacing from the motor zero position (as determined by the most recent home search move or
power-up/reset), the second entry is the correction two spacings away, and so on. The
correction is the amount added to the nominal position to get the corrected position. The
correction at the zero position is zero by definition.
The last entry in the table represents the correction at {count length} distance from the
source motor’s zero position. Since the table has the capability to roll over, this entry also
represents the correction at the source motor’s zero position. For this reason, the last entry
should virtually always be set to zero.
Example
#1 DEFINE COMP 4,2000 ; Create table for motor 1