PMAC Product Guide LIST PROGRAM Function : List the contents of the specified motion program. Scope : Global Syntax : LIST PROGRAM {constant} [{start}] [,{length}] LIST PROG {constant} [{start}] [,{length}] where {constant} is an integer from 1 to 32767 specifying the number of the motion program. the optional {start} parameter is an integer constant specifying the distance from the start of the buffer (in words of memory) to begin the listing (0 is the default). the optional {length} parameter (after a comma) is an integer constant specifying the number of words of the buffer to be sent to the host (to the end of the buffer is the default).
This command causes PMAC to report the contents of the specified fixed motion program buffer (PROG) to the host. The contents are reported in ASCII text form. If I9 is 0 or 2, the contents are reported in short form (e.g. LIN ). If I9 is 1 or 3, the contents are reported in long form (e.g. LINEAR ). If neither {start} nor {length} is specified, the entire contents of the buffer will be reported. If {start} is specified, the reporting will begin {start} words from the beginning of the buffer. If {length} is specified, the reporting will continue for {length} words from the starting point.
If either {start} , {length} , or both, or just the comma is included in the command, the listing of the program will include the buffer address offsets with each line. Having a listing with these offsets can be useful in conjunction with later use of the PC (Program-Counter) and LIST PC commands. If the motion program requested by this command does not exist in PMAC, PMAC will reject this command (reporting an ERR003 if I6=1 or 3). PROGs 1000-32767 can be protected by password. If the PROG is protected by password and the proper password has not been given, PMAC will reject this command (reporting an ERR002 if I6=1 or 3). Examples:
LIST PROG 9 ; Request listing of all of motion program 9 LINEAR ; PMAC responds F10 X10Y10 X0Y0 RETURN LIST PROG 9, ; Request listing of program w/ address offsets 0:LINEAR 1:F10 2:X10Y10 ; Note that a 2-axis command takes two addresses 4:X0Y0 6:RETURN LIST PROG 9,4 ; Request listing starting at address 4 4:X0Y0 6:RETURN LIST PROG 9,2,4 ; Request listing starting at 2, four words long 2:X10Y10 4:X0Y0 LIST PROG 9,,2 ; Request listing starting at top, 2 words long 0:LINEAR 1:F10 176 Online Commands