100
Consider
this scenario: We always want to make sure the Dummy Load pump or fan is turned on before putting
the transmitter into it. Our “Test TXA” routine might contain something like this:
1 : If status of "LOAD OFF / LOAD ON" on site "BURK-FM" = "LOAD ON", goto line 4
2 : Raise "LOAD ON" on site "BURK-FM" for [default]
3 : Wait for 00:00:30
4 : Raise "TX-A RF ON" on site "BURK-FM" for [default]
At the start of this macro, if the load is already running, we’ll go directly to starting the transmitter. If the load isn’t
on, we’ll turn it on and wait 30 seconds before starting the transmitter. (Tube filaments could be done the same
way.)
Looking at this macro line by line, the first line is obviously an IF statement. The comparison we are evaluating is a
status input being compared to a literal value. The status input is labeled
"LOAD OFF / LOAD ON"
and the
literal we are comparing with is
"LOAD ON".
If the expression evaluates to true, we are branching to line 4. In
plain English, “If the load is on, then skip to line 4, else continue on line 2.”
Line 2 doesn’t get executed unless the branch from line 1 is not taken. That is, if the test for the load being on
fails, we don’t take the branch to line 4 but rather continue on sequentially, executing Line 2 which is a
Raise
command. This line contains the channel and site information as well as the duration of the command.
After the
Raise
command the macro will
wait
for 30 seconds.
Finally we get to line 4 and turn on the transmitter with another
Raise
command.
There are many types of IF statements and they are listed in