Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC On-line Command Specification 347
P5:35:X5Y30 ; Turbo PMAC responds
37:X12Y32
39:X0 Y10
41:RETURN
See Also:
On-line commands B{constant}, LIST, LIST PC, PC, PE
LIST PLC
Function: List the contents of the specified PLC program.
Scope: Global
Syntax: LIST PLC{constant} [,[{start}]] [,[{length}]]
where:
{constant} is an integer from 0 to 31 representing the number of the PLC 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 (the execution point 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 Turbo PMAC to report the contents of the specified uncompiled PLC program
buffer 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. ENDW). If I9 is 1 or 3, the contents are reported in long form (e.g. ENDWHILE).
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 the first comma is present, but no start point is specified, the listing will start from the next line to be
executed in the PLC program. Because Turbo PMAC can execute this command only between PLC
scans, this line will be the first to execute in the next scan. If the second comma is present, but no length
is specified, the listing will continue to the end of the program.
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.
PLCs 0-15 can be protected by password. If the PLC is protected by password, and the proper password
has not been given, Turbo PMAC will reject this command (reporting an ERR002 if I6=1 or 3).
Example:
LIST PLC 5
P1=0
WHILE (P1<1000)
P1=P1+1
ENDWHILE
RETURN
LIST PLC 5,0
0:P1=0
1:WHILE(P1<1000)
3:P1=P1+1
6:ENDWHILE
7:RETURN
LIST PLC 5,,1
1:WHILE(P1<1000)
LIST PLC 5,,
1:WHILE(P1<1000)
3:P1=P1+1
6:ENDWHILE