Specifications
Operation
3.8.1 Defining Macros
To define a macro command sequence, first activate macro recording mode
with the command MAC BEG <macroname> where <macroname> is a
user-settable name with a maximum of 8 characters. While in macro
recording mode, commands are not executed but stored in macro storage.
Recording mode is exited by the MAC END command. The maximum
number of macros to be stored on the E-517 is 60.
A macro is immediately written to non-volatile memory. No additional
storage procedure is required. Note that saving a macro to non-volatile
memory typically takes about 1 s.
A macro can start another macro without any nesting level limitation. A
macro can call itself to form an infinite loop.
During macro recording no macro execution is allowed.
A macro can be overwritten by a macro with the same name.
Macros can be recorded when the wave generator is running.
A running macro sends no responses to any interface. This means
questioning commands are allowed in macros but not answered and
therefore useless.
Example 1: This simple macro initializes the E-517 and performs a move
forward and backward.
MAC BEG macro1
Start recording macro "macro1"
ONL 1 1 2 1 3 1
Switch all piezo channels to ONLINE mode
SVO A 1 B 1 C 1
Enable servo control mode for all axes.
VCO A 1 B 1 C 1
DCO A 1 B 1 C 1
Enable velocity control mode and drift
compensation mode. The E-517 now keeps
track of proper motion.
VEL A 100 B 100 C 100
Set velocity to 100 µm/s.
MOV A 10 B 10 C 10
Move all axes to position 10 µm. This moves
take 0.1 s.
DEL 1000
Delay of approx. 1000 ms.
MOV A 0 B 0 C 0
Move all axes to its home.
DEL 1000
This delay only matters if the macro is run
several times in a loop.
MAC END
Exit the macro recording mode. The macro now
is complete.
www.pi.ws E-517 PZ214Equ Release 1.0.0 Page 38