
Application Solutions
MultiFlex PCI 1000 Series User's Manual
135
Building MCCL Macro Sequences
A powerful feature is the ability to define MCCL (Motion Control Command Language) command
sequences as macros.
i
For additional information on macro’s and MCCL (Motion Control Command
Language) commands please refer to the
MCCL Reference Manual
.
A
macro is a user define sequence of operations that is executed by issuing a single command. For
example:
1MR1000,WS0.25,MR-1000,WS0.25
will cause the motor attached to axis 1 to move 1000 counts in the positive direction, wait one quarter
second after it has reached the destination, then move back to the original position followed by a similar
delay. If this sequence were to represent a frequently desired motion for the system, it could be defined
as a macro command. This is done by inserting a Macro Define (
MDn
) command as the first command in
the command string. For example:
MD3,1MR1000,WS0.25,MR-1000,WS0.25
will define macro #3. Whenever it is desired to perform this motion sequence, issue the command Macro
Call (MC3).
To command the controller to display the contents of a macro, issue the
T
ell
M
acro (
TMn
) command with
parameter ‘n’ = the number of the macro to be displayed. To display the contents of all stored macro’s
issue the Tell macro command with parameter ‘n’ = -1.
!
Once a macro operation has begun, the host will not be able to communicate
with the controller until the
macro has completed execution
. For information
on communicating with the controller while executing macro’s please refer to
the section titled
MCCL Multi-Tasking
.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com