Chapter 4 Command Reference
Introduction
Programming Guide 4-125
*DMC <string>, <arbitrary block>
(Define Macro Command)
*DMC <string>, <arbitrary block>
This command assigns a sequence of zero or more commands/queries to a macro
label. The sequence is executed when the label is received as a command or query.
The <string> parameter specifies the macro label. The macro label may not be a
common command/query header. It may be the same as an instrument-specific
command/query header; in this case, provided macros are enabled, the macro
expansion is executed and the instrument-specific command/query may be
executed by disabling macros.
The <arbitrary block> contains the sequence of commands/queries being labeled.
Parameters may be passed to the sequence during execution. Placeholders for
parameters appear in the sequence as a dollar sign followed by a single digit in the
range one to nine inclusive. The first parameter following the macro label is
substituted for the parameter placeholder labeled $1, and so on up to nine
parameters.
See the section titled “How to Program the Counter to Define Macros” in Chapter
3 of this guide.
• The maximum macro label length is 12 characters.
• Redefining an existing macro causes an execution error.
• The Counter allows up to four levels of recursion.
• There is no query form. Use *GMC? (see page 4-129) to query the current
definition of a macro label.
Comments