OR in an IF/THEN Statement
Example 1 shows how a macro can examine a situation, then
choose the appropriate course of action. The first line sets an
individual variable “X.” This line is important because it enables
the macro to recognize whether or not it has already taken
some kind of action. The first “IF” statement checks Status
Channel 2. If the reading on this channel is “High,” then the
macro issues Commands 16b and 12a, and changes the
individual variable to X = 1. If the reading on Status Channel 2
is not “High,” the “IF” statement ends without issuing the
commands or changing the variable.
The next “IF” statement checks the individual variable. IF X = 1,
then commands have been issued, the “IF” statement is skipped
and the macro ends. If X = 0 still, then the “IF” statement
continues execution. Here another “IF” statement checks Status
Channel 5. If the reading on this channel is “High,” the macro
issues Commands 16b and 12a, then ends the macro.
Example 2 shows how the same results can be achieved by the
use of the “OR” statement in an “IF/THEN” command.
AND in an IF/THEN Statement
Example 1 shows a macro examining two factors in a situation and then taking action if both factors require it.
First, the macro checks Status Channel 5. If the reading on this channel is not “Low,” the IF statement is skipped
and the macro ends. If the reading on Status Channel 5 is “Low,” then the macro checks Status Channel 6. If the
reading on Status Channel 6 is also “Low,” the macro then issues Commands 10a and 11a. If Status Channel 6 is
not “Low,” then no action is taken and the macro ends.
In order for any commands to be issued, both conditions must be true.
Example 2
shows how the
same results
can be
achieved by
the use of the
“AND”
statement in
the “IF/THEN”
command.
CHAPTER 10: MACROS
109
CUSTOMER SUPPORT: 978-486-3711 • support@burk.com • www.burk.com
Example 1
Example 2
Example 1
Example 2
Summary of Contents for GSC3000
Page 8: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL viii ...
Page 22: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL 14 ...
Page 32: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL 24 ...
Page 40: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL 32 ...
Page 52: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL 44 ...
Page 68: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL 60 ...
Page 120: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL 112 ...
Page 128: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL 120 ...
Page 132: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL 124 ...
Page 140: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL 132 ...
Page 144: ...GSC3000 VRC2500 INSTALLATION OPERATION MANUAL 136 ...