Reference Manual

PMAC 2 Software Reference
278 PMAC On-Line Command Specification
PMATCH
Function
Re-match Axis Positions to Motor Positions
Scope
Coordinate-system specific
Syntax
PMATCH
Remarks
This command causes PMAC to recalculate the axis starting positions for the coordinate
system to match the current motor commanded positions (by inverting the axis definition
statement equations and solving for the axis position).
Normally this does not need to be done. However, if a motor move function, such as a jog
move, an open-loop move, or a stop on abort or limit, was done since the last axis move or
home, PMAC will not automatically know that the axis position has changed. If an axis
move is then attempted without the use of the PMATCH command, PMAC will use the wrong
axis starting point in its calculations.
Also, with an absolute sensor, a PMATCH command should be executed before the first
programmed move, so the starting axis position matches the (non-zero) motor position.
If the PMATCH function is not performed, PMAC will use the last axis destination position as
the starting point for its upcoming axis move calculations, which is not necessarily the same
position as the current commanded motor positions.
The PMATCH function can be executed from within a motion program using CMD”PMATCH”
with DWELLs both before and after. This is useful if the coordinate system setup changes in
the middle of the program (e.g. new axis brought in, or following mode changed).
If more than one motor is defined to a given axis (as in a gantry system), the commanded
position of the lower-numbered motor is used in the PMAC calculations.
Note:
If I14 is set to 1, the PMATCH function will be executed automatically
every time program execution is started. Most users will want to use
I14=1 so they do not have to worry about when this needs to be done.
Example
#1J+.................. ; Jog motor 1
#1J/.................. ; Stop jogging
PMATCH............. ; Match axis position to current motor position
B200R ............... ; Execute program 200
OPEN PROG 10 CLEAR
...
CMD”&1#4->100C” ; Bring C-axis into coordinate system
DWELL100
CMD”PMATCH”. ; Issue PMATCH so C-axis has proper start position
DWELL100
C90
See Also
Further Position Processing (Setting Up a Motor)
Axes, Coordinate Systems (Setting Up a Coordinate System)
I-variables I14, Ix06