User guide
16
6000 Series Programmer's Guide
Controlling Execution of Programs and the Command Buffer
The 6000 controller command buffer is capable of storing 2000 characters waiting to be
processed. (This is separate from the memory allocated for program storage – see Memory
Allocation, page 12.) Three commands, COMEXC, COMEXK, and COMEXP, affect command
execution. Three additional commands, COMEXL, COMEXR, and COMEXS, affect the
execution of programs and the command buffer.
COMEXC (Continuous Command Execution)
The COMEXC command enables the Continuous Command Execution Mode. This mode
allows the program to continue to the next command before motion is complete. This is
useful for:
• Monitoring other processes while motion is occurring
• Performing calculations in advance of motion completion
• Pre-emptive GOs — executing a new profile with new attributes (distance, accel/decel,
velocity, positioning mode, and Following ratio ) before motion is complete: The
motion profile underway is pre-empted with a new profile when a new GO is issued. The
new GO both constructs and launches the pre-empting profile. Pre-emptive GOs are
appropriate when the desired motion parameters are not known until motion is already
underway. For a detailed description, refer to On-The-Fly Motion on page 178.
• Pre-process the next move while the current move is in progress (see CAUTION note).
This reduces the processing time for the subsequent move to only a few microseconds.
CAUTION: Avoid executing moves prematurely
With continuous command execution enabled (COMEXC1), if you wish motion to stop
before executing the subsequent move, place a WAIT(AS.1=bØ) statement before the
subsequent GO command. If you wish to ensure the load settles adequately before the
next move, use the WAIT(AS.24=b1) command instead (this requires you to define
end-of-move settling criteria — see
Target Zone Mode
on page 105 for details).
In the programming example below, by enabling the continuous command execution mode
(COMEXC1), the controller is able to turn on output #3 after the encoder moves 4000 units of
its 125000-unit move. Normally, with COMEXC disabled (COMEXCØ), command processing
would be temporarily stopped at the GO1 command until motion is complete.
Programming Example (portion of program only)
COMEXC1 ;Enable continuous command execution mode
D125000 ;Set distance
V2 ;Set velocity
A10 ;Set acceleration
GO1 ;Initiate motion on axis 1
WAIT(1PE>4000) ;Wait for the encoder position to exceed 4000
OUTXX1 ;Turn on programmable output #3
WAIT(AS.1=b0) ;Wait for motion to complete on axis 1 (AS bit #1 = zero)
OUTXX0 ;Turn off programmable output #3
COMEXK (Continue Command Execution on Kill)
This feature is applicable only to bus-based products. The COMEXK command
determines whether the commands following a Kill (K) command in a block write will be saved
after the (K) command is processed. Upon receiving a (K) command, or an external kill input
(INFNCi-C), all commands in the command buffer are eliminated. If there are any other
commands contained within the data block during the Kill (K) command, these commands will
also be eliminated from the command buffer, unless Continue Execution on Kill (COMEXK) is
enabled. This also holds true when a Kill input is received.










