PMAC Product Guide In addition, 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 DWELL s 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 ... Q Function :
Quit Program at end of move Scope : Coordinate-system specific Syntax: Q This causes the currently addressed coordinate system to cease execution of the program at the end of the currently executing move or the next move if that has already been calculated. The program counter is set to the next line in the program, so execution may be resumed at that point with an R or S command. Compare this to the similar / command, which always stops at the end of the currently executing move. Examples: B10R ; Point to beginning of PROG 10 and run Q ; Quit execution R ; Resume execution Q ; Quit execution again S ; Resume execution for a single move Online Commands 187