99
MACROS
The ARC Plus features on-board macros for automatic responses to conditions at the remote site, scheduled
activities based on time-of-day, or calendar-based routines that reference pre-configured calendar times.
MACRO PRIMER
Macros consist of a series of individual lines that generally act in sequence. There are only three types of macro
lines: branching, actions and IF statements.
BRANCHING
Branching controls the order in which macro instructions are executed. Without branching, we would merely have
a list of steps to follow which would play back much like a recording. With branching, it is possible to make the
macro behave differently under different conditions.
There is only one branching instruction in the macro language,
goto
, but it appears in two different forms. On a
line by itself, goto is used to branch to a different line like this:
Goto line 1.
It also appears as part of an
IF
statement:
If
(something)
=
(something else)
goto line 4.
Branching also allows looping in the macro. This is useful for constantly checking on something or performing an
action until some result is achieved. To perform a loop, put a
goto
on the line following the steps to be looped
followed by the line number of the first action. If there are no if statements branching out of the loop, it is an
infinite loop. If the action needs to end when a value is reached, include an If statement in the loop which includes
a
goto
to a line outside the loop (such as an
end
statement at the end of the program).
ACTIONS
Actions include physical things like
Raise "TX-A RF ON" on site "BURK-FM" for 00:00:01
and more virtual things like
Decrement memory 8
or
Wait for 00:00:01.
Actions also include “Set” functions like
Set Test1 on BURK-FM = 100
or
Set high critical of "TX-A FWD" on "BURK-FM" to 105.
For a complete set of actions Click or turn to
IF STATEMENTS
When a macro is started, it executes lines sequentially unless it is redirected by a
goto.
Each
If
statement has a
comparison which is evaluated for true or false.
A
goto
is included in every
If
statement, but it is conditional on
the results of the comparison.
If the comparison is true, the IF statement will branch the macro to another line. If
not, the macro will simply continue on the next line.
You do not have to type these
lines into the macro!
The Macro Editor is “point and
shoot” so there is little to
remember and no such thing as
a syntax error.