PMAC Product Guide After any fixed motion program buffer has been opened, each coordinate system must be commanded to point to a motion program with the B{constant} command before it can run a motion command (otherwise PMAC will report ERR015 if I6=1 or 3) Examples: CLOSE ; Make sure other buffers are closed DELETE GATHER ; Make sure memory is free OPEN PROG 255 ; Open buffer for entry, disabling program CLEAR ; Erase existing contents X10 Y20 F5 ; Enter new version of program... ... CLOSE ; Close buffer at end of program &1B255R ; Point to this program and run it P Function : Report motor position Scope : Motor specific Syntax :
P This command causes PMAC to report the present actual position for the addressed motor to the host, scaled in counts, rounded to the nearest tenth of a count. PMAC reports the value of the actual position register plus the position bias register, plus the compensation correction register, and if bit 16 of Ix05 is 1 (handwheel offset mode), minus the master position register. Examples: P ; Request the position of the addressed motor 1995 ; PMAC responds #1P ; Request position of Motor 1 -0.5 ; PMAC responds #2P#4P ; Request positions of Motors 2 and 4 9998 ; PMAC responds with Motor 2 position first 10002 ; PMAC responds with Motor 4 position next P{constant} Function :
Report the current P-variable values Scope : Global Syntax : P{constant}[..{constant}] where {constant} is an integer from 0 to 1023 representing the number of the P-Variable. the optional second {constant} must be at least as great as the first {constant} -- it represents the number of the end of the range. This command causes PMAC to report the current value of the specified P-Variable or range of P- Variables. Examples: P1 ; Host asks for value 25 ; PMAC responds P1005 3.444444444 P100..102 17.5 -373 0.0005 Online Commands 183