
8 GCS Commands
C-863.12 Mercury Controller
MS249E
Version: 1.2.1
171
MAC (Call Macro Function)
Description:
Calls a macro function. Permits recording, deleting, and
running macros on the controller.
Format:
MAC <keyword> {<parameter>}
in particular:
MAC BEG <macro name>
MAC DEF <macro name>
MAC DEF?
MAC DEL <macro name>
MAC END
MAC ERR?
MAC NSTART <macro name> <uint> [<String1> [<String2>]]
MAC START <macro name> [<String1> [<String2>]]
Arguments:
<keyword> determines which macro function is called. The
following keywords and parameters are used:
MAC BEG <macroname>
Starts recording a macro to be named
macroname
on the
controller; may not be used in a macro; the commands
that follow become the macro. End the recording with
MAC END. Note that erroneous macro content cannot be
detected by sending the ERR? command.
MAC END
Stops macro recording (cannot become part of a macro)
MAC ERR?
RepoReports the last error that occurred while the macro
was running.
R
esponse: <macroname> <uint1>”=”<uint2> <”<”CMD”>”>
where <macroname> is the name of the macro, <uint1> is
the line in the macro, <uint2> is the error code and
<”<”CMD”>”> is the erroneous command which was sent
to the parser.
MAC DEF <macroname>
Sets specified macro as startup macro. This macro will be
run automatically after the next switch-on or reboot of the
controller. If <macroname> is not specified, the current
startup macro selection is canceled.
MAC DEF?
Asks for the startup macro
Response: <macroname>
If a startup macro is not defined, the response is an empty
string with the terminating character.
MAC DEL <macroname>