Specifications

103
CREATING MACROS TYPES OF MACROS
TECHNICAL SUPPORT 978-486-0086 • support@burk.com • www.burk.com
IF/THEN/ELSE
This feature allows the macro to perform conditional functions,
such as initiating a command output if a metering or status
channel gives a certain reading. IF/THEN/ELSE statements can
be placed anywhere within a macro. The “IF” and the “THEN”
must be on the same line in the macro. The “ELSE” statement is
on a line by itself and is not required in order for the IF/THEN
condition to be evaluated. The “ENDIF” statement must be
included as the last line for any IF/THEN statement.
Macro Line Example Description
IF status(3)=low THEN [CR] “IF” begins the IF/THEN statement
Command ME, ME, 1A [CR] These command lines will execute only if
Delay 50 [CR] status input is equal to LOW
Command ME, ME, 16A [CR]
ENDIF [CR] “ENDIF” ends the IF/THEN statement (more
command statements in a macro can be included
before and/or after this IF/THEN portion)
Macro Line Example Description
IF MUTESTATESTATUS(5)=1 AND meter(12)>3500 THEN [CR]
Status Channel 5 must be
muted AND Meter Channel
12 must be more than 3500
before Macro #2 on this unit
executes
MACRO ME, ME, 2 [CR]
ELSE [CR] If the above is FALSE then
COMMAND ME, ME, 9B [CR] Command Channel 9 on
ENDIF [CR] this unit will close ‘B’ output
WHILE/WEND
This statement is used to repeat a command or set of commands
as long as a specific condition exists. The statement begins with
the word “WHILE” followed by a specific condition. The next few
lines are instructions that are followed while that condition is still
valid. The “WEND” instruction is the last line of the WHILE
statement and concludes the set of instructions.
Macro Line Example Description
WHILE meter(5)<50 [CR] While Meter Channel 5’s value is less than 50 then execute
Command ME, ME, 12A [CR] Command Channel 12’s ‘A’ output
WEND [CR] Ends the WHILE statement – macro may continue