
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 130 / 240
Phone +49 721 4846-0, Fax +49 721 4846-1019, Email
Variables
For more flexible programming, the E-727 supports variables. While global variables are always
available, local variables are only valid for a given macro. Typically, variables are used when
working with macros.
Variables are present in volatile memory (RAM) only. The variable values are of the STRING data
type.
The following conventions apply to variable names:
Variable names must not contain special characters (especially no “$”).
The maximum number of characters is 8.
Names of global variables can consist of characters A to Z and 0 to 9. They must start
with an alphabetic character.
Names of local variables must not contain alphabetic characters. Possible characters
are 0 to 9.
The variable name can also be given via the value of another variable.
If the value of a variable is to be used, the notation must be as follows:
The variable name must be preceded by the dollar sign ($).
Variable names consisting of multiple characters must be put in curly brackets.
If the variable name consists of a single character, the curly brackets can be omitted.
Note that if the curly brackets are omitted with variable names consisting of multiple characters,
the first character after the “$” is interpreted as the variable name.
Local variables:
Local variables can only be used in macros.
At present, the controller firmware supports three local variables: 0, 1 and 2.
The values of the local variables 1 and 2 are given as arguments of the MAC START
or MAC NSTART command when starting the macro.
The command formats are:
MAC START <macroname> [<String1> [<String2>]]
MAC NSTART <macroname> <uint> [<String1> [<String2>]]
<STRING1> and <STRING2> indicate the values for the local variables 1 and 2 used in the
macro. <STRING1> and <STRING2> can be given directly or via the values of variables. <uint>
defines the number of times the macro is to be run. See the
MAC
command description for
more information.
The local variable 0 is read-only. Its value gives the number of arguments (i. e. values
of local variables) set when starting the macro.
Inside a macro, the values of local variables can be modified using ADD, CPY or VAR,
and can be deleted with VAR (except for the local variable 0).
As long as the macro is running, the values of the local variables can be queried with
VAR? 0
VAR? 1
VAR? 2
The queries can be sent inside or outside of the macro.