Reference Manual

PMAC 2 Software Reference
PMAC On-Line Command Specification 277
PC
Function
Report Program Counter
Scope
Coordinate-system specific
Syntax
PC
Remarks
This command causes PMAC to report the motion program number and address offset of the
line in that program that it will next calculate (in the addressed coordinate system). It will
also report the program number and address offset of any lines it must RETURN to if it is
inside a GOSUB or CALL jump (up to 15 deep).
The number reported after the colon is not a line number; as an address offset, it is the
number of words of memory from the top of the program. The LIST PROGRAM command,
when used with comma delimiters, shows the program or section of the program with address
offsets for each line. The LIST PC command can show lines of the program with address
offsets from the point of calculation.
Because PMAC calculates ahead in a continuous sequence of moves, the PC (Program
Calculation) command will in general return a program line further down in the program than
PE will.
If the coordinate system is not pointing to any motion program, PMAC will return an error
(ERR003 if I6=1 or 3). Initially the pointing must be done with the B{constant}
command.
Example
PC
P1:0.................. ; Ready to execute at the top of PROG 1
PC
P76:22............. ; Ready to execute at 22nd word of PROG 76
LIST PC
P76:22:X10Y20 ; Program line at 22nd word of PROG 76
PC
P1001:35>P3.12 ; Execution will return to PROG 3, address 12
See Also
On-line commands B{constant}, LIST, LIST PC, LIST PE, LIST PROGRAM, PE
PE
Function
Report Program Execution Pointer
Scope
Coordinate-system specific
Syntax
PE
Remarks
This command causes PMAC to report the motion program number and address offset of the
currently executing programmed move in the addressed coordinate system. This is similar to
the PC command, which reports the program number and address offset of the next move to
be calculated. Since PMAC is calculating ahead in a continuous sequence of moves, PC will
in general report a move line several moves ahead of PE.
If the coordinate system is not pointing to any motion program, PMAC will return an error
(ERR003 if I6=1 or 3). Initially the pointing must be done with the B{constant}
command.
Example
PE
P1:2
PE
P1:5
See Also
On-line commands B{constant}, LIST, LIST PC, LIST PE, PC