Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC On-line Command Specification 298
Note:
Prior to V1.936 firmware, an open buffer could be accessed from any port, and the
CLOSE command could be used on one port to close a buffer that had been opened
on another port. Starting in V1.936, if a CLOSE command could only be used to
close a buffer opened from the same port.
The CLOSE command should be used immediately after the entry of a motion, PLC, rotary, etc. buffer. If
the buffer is left open, subsequent statements that are intended as on-line commands (e.g. P1=0) will get
entered into the buffer instead. It is good practice to have CLOSE at the beginning and end of any file to
be downloaded to Turbo PMAC.
If the program buffer closed by the CLOSE command is improperly structured, structured (e.g. no ENDIF
or ENDWHILE to match an IF or WHILE), Turbo PMAC will report an error to the CLOSE command,
returning ERR009 if I6 is 1 or 3. However, the buffer will still be closed.
Example:
CLOSE ; This makes sure all buffers are closed
OPEN PROG 1 ; Open motion program buffer 1
CLEAR ; Clear out this buffer
F1000 ; Program actually starts here!...
X2500 ;...and ends on this line!
CLOSE ; This closes the program buffer
LIST PROG 1 ; Request listing of closed program
F1000 ; Turbo PMAC starts listing
X2500
RETURN ; This was appended by the CLOSE command
See Also:
Program Buffers (Talking to Turbo PMAC)
On-line commands OPEN, CLEAR, <CTRL-L>, <CTRL-U>
CLOSE ALL
Function: Close the currently opened buffer on any port
Scope: Global
Syntax: CLOSE ALL
CLS ALL
This command closes the program buffer (PROGRAM, PLC, ROTARY) that is currently opened,
regardless of the port over which the buffer was opened. When Turbo PMAC receives a CLOSE ALL
command, it automatically appends a RETURN statement to the end of the open program buffer (except
for rotary motion program buffers).
Note:
The similar CLOSE command can only affect a buffer that was opened on the same
port as which the CLOSE command is sent.
See Also:
On-line commands OPEN{buffer}, CLOSE