
Query commands can be used in macros in conjunction with the
CPY
,
JRC
,
MEX
, and
WAC
commands. Otherwise they have no effect because macros do not send responses to
interfaces.
8.6.1
Recording Macros
The
MAC BEG
and
MAC END
commands may not be specified when macros are recorded in
the
Controller macros
tab in PIMikroMove.
A macro is overwritten if a macro with the same name is rerecorded.
If you record a macro on a controller whose address differs from 1, pay attention to the
following when entering commands that need to be an integral part of the macro:
■
If you are working with PITerminal and have established communication via the
Connect…
button, the target address must typed into every command line.
■
If you are working with PIMikroMove or have established PITerminal communication via
the
GCS DLL…
button, the target address is sent automatically and may not be typed in.
Recording macros for PITerminal and PIMikroMove is described in the following.
1. Start the macro recording.
■
If you are working with PITerminal or in the
Command entry
in the PIMikroMove's
window: Send the
command where "macroname" is the name of
the macro.
■
If you are working in PIMikroMove in the
Controller macros
tab: Click the
Create new
empty macro
icon to create a tab for entering a new macro.
2. Enter the commands to be included in the "macroname macro" line-by-line using the
normal command syntax.
Macros can call up themselves or other macros at several nesting levels.
3. End the macro recording.
■
If you are working with PITerminal or in PIMikroMove's
Command entry
window: Send
■
If you are working in PIMikroMove in the
Controller macros
tab: Click the
Send macro
to controller
symbol and enter the macro name into a separate dialog window.
➔
The macro has been stored in the nonvolatile memory of the E-871.1A1N.
4. If you want to check in PITerminal or in the PIMikroMove's
Command entry
window
whether the macro was recorded correctly:
a) Query which macros are saved in the E-871.1A1N by sending the
command.
b) Query the content of "macroname" macro with the
MAC? macroname
command.
5. If you want to check PIMikroMove's
Controller macros
tab to see whether the macro was
recorded correctly:
a) Click the
Read list of macros from controller
icon.
b) Mark the macro to be checked in the list on the left-hand side and click the
Load
selected macro from controller
icon.
Example Macro: Moving the Axis Back and Forth
The axis <axis> is to move back and forth. 3 macros are recorded for this purpose. Macro 1
starts the motion in the positive direction and waits until the axis has reached the target
position. Macro 2 performs this task for the negative direction of motion. Macro 3 calls up
macro 1 and 2.
Record the macros by sending:
MAC BEG macro1
MVR <axis> 12.5
WAC ONT? <axis> = 1
MAC END
8 E-871.1A1N FUNCTIONS
PZ285EN
‒
1/30/2019
94
M O T I O N | P O S I T I O N I N G