
User Manual
E727T0005, valid for E-727
BRO, 2019-06-28
Physik Instrumente (PI) GmbH & Co. KG, Auf der Roemerstrasse 1, 76228 Karlsruhe, Germany
Page 127 / 240
Phone +49 721 4846-0, Fax +49 721 4846-1019, Email
2.
Record the MOVLR macro by sending:
MAC BEG movlr
MAC START movwai ${LEFT}
MAC START movwai ${RIGHT}
MAC END
MOVLR successively starts the MOVWAI macro (which is still to be recorded) for both
directions of motion. The values of the global variables LEFT and RIGHT are used when
MOVWAI is started, to set the value of the local variable 1 contained in MOVWAI (dollar signs
and braces are necessary for the local variable 1 in the macro to actually be replaced by the
value of the global variable and not by its name).
3.
Record the MOVWAI macro by sending:
MAC BEG movwai
MOV 1 $1
WAC ONT? 1 = 1
MAC END
MOVWAI moves axis 1 to the target position which is given by the value of the local variable 1
and waits until the axis has reached the target position.
4.
Start the execution of the MOVLR macro by sending:
MAC NSTART movlr 5
The MOVLR macro is executed five times in succession, i.e., axis 1 alternately moves to the
positions 5 and 15 five times. You can also select any other value for the number of
executions.
Example: Implementing multiple calls of a macro via a loop
INFORMATION
When macros are recorded on the
Controller macros
tab in PIMikroMove, the
MAC BEG
and
MAC END
commands must be omitted.
The TESTDION macro checks the status of the digital input lines on the
Digital
I/O
socket. It uses a
local variable to identify the digital input line (1 to 4). So that the TESTDION macro does not have
to be called separately for each input line, another macro with a loop is recorded.
Record the LOOPDION macro by sending:
MAC BEG loopdion
VAR COUNTER 1
MAC START TESTDION ${COUNTER}
ADD COUNTER ${COUNTER} 1