Specifications

97
CREATING MACROS • PROGRAMMING WINDOW
TECHNICAL SUPPORT 978-486-0086 • support@burk.com • www.burk.com
A macro consists of the macro name, a sequence of instructions,
and an instruction to end the macro. Macros can be any length,
and with the exception of macro and alarm names, lines within
the macro may be any desired length. The macro will continue to
the next line automatically unless you have entered a [CR] or a “ :
(ENTER or a colon) to end the line. The total compressed
memory used for macro programming cannot exceed 10KB per
I/O unit. It is unlikely that you’ll ever reach this limit.
Beginning a Macro
Each macro must be identified by name in the first line of the
macro itself. The word MACRO is used just prior to the name with
the name enclosed in double-quote marks (“ ”). All macros must
end with the line MEND for macro end. Alarms or warnings
issued within a macro also use double-quote marks and are
identified by typing: ALARM “text” or WARNING “statement.
Remarks may be inserted anywhere in the macro by using single
quote (‘ ‘) marks around them.
Ending a Macro
There is one manual method and five software methods of
ending a macro. The manual method is to right-click on the macro
button on the monitor view window. This brings up a list of the
currently running macros and their titles. Click on the macro to kill
it and then click on the End Macro button.
The software methods include the five commands that can be
inserted into any macro. See table at right.
Macro Source Code
The near-English text that you create a macro with is called
source code. The source code syntax is shown on the next page.
EXP and NUM, as used in the table, are not valid source code.
They denote the use of a number. When programming macros,
enter the appropriate Site or I/O unit ID number, status, metering,
or command channels, or macro number instead of EXP or NUM.
CR refers to a carriage return or enter; a colon ( : ) can also be
used to separate instructions within a macro line. Where
parentheses “( )” are shown, the parentheses must be included in
the source code. Where brackets “[ ]” are shown, the brackets are
there to set off the item only – such as [CR] – the brackets are
not included in the source code. Commas “ , ” that are shown
must be included.
Macro Structure
END [CR] Stops the macro
immediately and exits.
EXIT [CR] – Stops the macro
immediately and exits.
KILL X [CR] Terminates macro #X
on this I/O unit.
MEND [CR] – Used as the last line
of every macro. Macro is exited
because it is finished.
RETURN [CR] – Stops the macro
immediately and exits.
Although macro structures
include an argument for
addressing different sites,
I/O units configured at one site
cannot activate commands or
macros at another site. Therefore,
the sites should always be
referenced as ME.