
Model 8210A-2-5
IM-377
Aeroflex / Weinschel
35
7-16. Macro Commands
MACRO Function:
Define a macro
Syntax:
MACRO
name text
Argument(s):
name
string10
macro name
text
string
macro body
Remarks:
This function is used to define a macro. The macro name may be any user-defined
string, and may also be the same as internal commands. The macro text defines the command(s)
that will be executed when the macro is invoked. Macros allow for up to 9 replaceable parameters,
which are designated $1, $2, up to $9. The special macro name "POWERON" is reserved for
defining a macro that will automatically be executed by the system during the power-up configuration
phase. The user may define up to 32 additional macros. Attempting to define more than the allowable
number of macros will result in an execution error, and the user must delete an existing macro to
make room for the new definition. A list of the currently defined macros may be obtained with the
LIST? MACRO command. Macros can be up to 128 characters in length, and may be stored in the
non-volatile memory via the SAVE MACRO command. If a macro name is the same as an internal
command, the macro replaces the internal command. Macro expansion may be enabled/disabled with
the EMC command.
Return Value:
none
Example(s):
MACRO "POWERON" "EMC 0; ATTN -1; EMC 1"
MACRO? Function:
Read a macro definition
Syntax:
MACRO?
name
Argument(s):
name string10 macro name
Remarks:
This function is used to read a macro definition.
Return Value:
text
string
macro body
Example(s):
MACRO? "POWERON" returns "EMC 0; ATTN -1; EMC 1"
LIST? MACRO
Function:
Read list of macro names
Syntax:
LIST? MACRO
Argument(s):
none
Remarks:
This function is used to read a list of the currently defined macro names that have
been created via the MACRO command. It returns a count of the macros, and for each the macro
name.
Return Value:
count
integer
count of names name string10 name
Example(s):
LIST? MACRO returns the following ’1, POWERON’
EMC
Function:
Enable/Disable macro expansion.
Syntax:
EMC
ena
Argument(s):
ena
integer
enable flag
Remarks:
This function is used to enable or disable macro expansion. If the value of
ena
is 0,
than macros are disabled. Any other value enables macro expansion.
Return Value:
none
Example(s):
EMC 0
EMC?
Function:
Read macro state
Syntax:
EMC?
Argument(s):
none
Remarks:
This function is used to read the state of the macro enable flag.
Return Value:
0, macros are disabled
1, macros enabled
Example(s):
EMC? returns ’1’
Содержание 8210A-2-5
Страница 52: ......