4.8 Macros and the Scheduler

The FF-800 macros allow the user to program a series of commands that can be executed by a single command. Parameters can be passed to any command inside a macro when the macro is executed -- this gives the user unparalleled flexibility in configuring their system. Another feature unique to the FF-800 macro system if the ablity to program "conditional macro statements". This allows the macro to terminate early if a particular status flag is not in the proper state (the status flags and conditional macro programming will be described in greater detail later). This conditional execution capability lets the user define dynamic macros that can execute different sequences of commands based on the current status of the repeater system. Nested macros are also allowed which enables the user to place macros within macros.

In addition to providing the user with custom command capabilities, the macros are used by the FF-800 to specify the actions taken by the scheduler events and the command trigger inputs. The LTiZ (Long Tone Zero) support also uses a macro definition to determine what (if anything) the FF-800 will do if a LTiZ is detected. The macro assignments are similar to those for the messages in that there is a data base of up to 64 macros that the user defines for their particular system. These macros are then assigned as desired to the scheduler, trigger inputs, or LTiZ function. All macros are available as immediate execution commands regardless of their assignment status.

4.8.1 Macro Management and Execution

Macro Enter Access: CONFIGURATION
(cnfg) (590)
Response: "M R O Enter"

The Macro Enter command places the FF-800 into the macro entry mode -- this mode is similar to the text edit and CT edit modes in that all subsequent DTMF entries are interpreted as macro entries and normal command entry is suspended until the "macro enter" mode is complete. The user then enters the commands that are desired. Commands are entered by keying the digits for the prefix and parameters just as though the command would normally be entered -- each command entry must be separated by a loss of COS or a delimiter sequence (#*). Either of these operations causes the command to be analyzed and stored into the macro -- the controller responds "M E" to all valid entries. If the DTMF entry does not correspond to a valid DTMF command, the entry is ignored and the FF-800 responds with "Error" to indicate that the command was not valid. There are several support commands that are valid only from within a macro, and these are described in the following paragraphs.

Macro Enter Abort Access: CONFIGURATION
(cnfg) (591)
Response: "Abort"

This command allows the user to abort the macro entry in progress and discard any entries that have been made. It is only valid from the macro entry mode. After execution, the FF- 800 is in normal DTMF command mode.

Macro Enter Save Access: CONFIGURATION
(cnfg) (592) (Mm) M = bank (1-8); m = slot (1-8)
Response: "Complete"

This command terminates the macro entry mode and saves all entries to macro number (mm). Any macro that previously existed at (Mm) is replaced with the new macro commands. After execution, the FF-800 is in normal DTMF command mode.

Speech Suppress Toggle Access: CONTROL
(cntl) (1)
Response: none

This command is only valid when entered into a macro. It toggles the FF-800 speech and tone response suppress status. Thus the first occurrence of this command in a macro will cause the FF-800 to suppress all speech and tone responses until the Speech Suppress Toggle command is encountered again (or the end of the macro). It may be entered as many times as desired (within the size limits of the macro) and is used to suppress function responses for some or all of the commands contained in the macro.

Parameter Designate Access: CONFIGURATION
(cnfg) (599)
Response: none

This command is placed in a macro just prior to the command that is to receive the macro execute parameter. It may be used only once in a particular macro -- subsequent entries are ignored. Any parameter that is included with Macro Execute at the time of execution will be passed to the command that immeadiately follows Parameter Designate.

Abort Macro if True Access: CONFIGURATION
(cnfg) (596) (flag#)
Response: "Abort" if true, no response if false

If the specified flag is true, the macro execution in progress will be terminated. This command is only valid from within a macro.

Abort Macro if False Access: CONFIGURATION
(cnfg) (597) (flag#)
Response: "Abort" if false, no response if true

If the specified flag is false, the macro execution in progress will be terminated. This command is only valid from within a macro.

The termination applies only to the macro that contains the Abort Macro command. If the aborted macro was called from another macro, execution shall return to the calling macro. The abort macro commands can be used to disable macros or the user can nest macros with different abort macro commands to construct dynamic macros -- these macros could execute any of several completely different sets of commands based on the status of a particular flag or flags.

Macro User Flags Access: CONTROL
(cntl) (598) (flag#) ; (on/off)
Response: "F L G On" or "F L G Off" on = true, off = false

The user flags provide a means to directly enable or disable a macro or macro path based on the selected user defined flag(s). Any of the system flags can be interrogated with this command, but only the user flags can be modified. The following list defines the available flags:

01any remote base = RX21phone off hook
02any remote base = TX22busy input
03all remote bases = off23DTMF detect
04Port A = RX24Port A = TX
05Port B = RX25Port B = TX
06Port C = RX26Port C = TX
07Port D = RX27Port D = TX
08output #128user flag #1
09output #229user flag #2
10output #330user flag #3
11output #431user flag #4
12output #532user flag #5
13output #633user flag #6
14output #734user flag #7
15output #835user flag #8
16command trigger #136COS A
17command trigger #237COS B
18command trigger #338COS C
19command trigger #439COS D
20ID Pending
Macro Execute Access: General
{#28} (AC2) (macro#) ; (parameters) macro bank 1
{#29} (AC3) (macro#) ; (parameters) macro bank 2
{#30} (AC4) (macro#) ; (parameters) macro bank 3
{#31} (AC5) (macro#) ; (parameters) macro bank 4
{#54} (BA7) (macro#) ; (parameters) macro bank 5
{#55} (BA8) (macro#) ; (parameters) macro bank 6
{#56} (BA9) (macro#) ; (parameters) macro bank 7
{#57} (BB0) (macro#) ; (parameters) macro bank 8
Response: none

The 64 available macros are divided into 8 banks of 8 macros each ( (macro#) = 1 to 8). Since each prefix provides access to up to 8 macros, the user should segregate the macros into groups that are available to different types of users. For example, a macro to change the status of the repeater should not be placed in the same bank as one that contains an open autopatch macro. The optional (parameters) field is used to pass (parameters) to a command within the macro. If the parameters are omitted, the internal command will try to execute with no parameters (the results of this depend on the command). If the (parameters) option is included with a macro that does not use Macro Designate, the parameters are ignored.

Command Trigger Assign Access: CONTROL
(cntl) (475) (input#) (active hi/lo) ; (macro#)
Response: "C M D T" plus (macro#) or "Off"

If a command trigger input is to be implemented, the user must specify the action of the particular input. Each input has two states, high and low, each of which may invoke a macro. weather a macro is assigned to the active hi or active low state of a particular input depends on how the user wants the input to be interpreted. For example: if an input is usually high, and then goes low to signal some "event", the user would assign the macro that deals with this "event" to the active low state of that input. On reset the FF-800 will examine each input and execute any triggered macros based on the status of the inputs at the time of reset.

LTiZ Trigger Assign Access: CONTROL
(cntl) (476) ; (macro #)
Response: "L T I Z" plus macro number or "Off"

If the user desires to implement the LTiZ standard, they may do so with this command. First, the action or actions that are to result from an LTiZ detection are determined and programmed into a macro (this could be an autopatch to a system operator, a message directing the user what to do, or some other action as desired by the system operator). Once the macro is complete, it is assigned with LTiZ Assign and the feature will be available immeadiately. The LTiZ standard specifies that a single DTMF "0" held on for a specific amount of time shall trigger the desired function.

LTiZ Detect Time Access: CONTROL
(cntl) (477) ; (time)
Response: "L T I Z Time" plus time value

The minimum LTiZ detect duration is set with this command. (time) is in seconds from 1 to 255. This parameter is not a state variable (but is maintained in non-volatile storage).

The following examples describe the macro entry process:

Construct a simple macro to read the time and pulse output #7:

(unlock control and configuration security)
DD590			macro enter mode
"M R O Enter"
AB8			read time command
"M E"			entry OK
DDDD12345		invalid command
"Abort"			command ignored
CC1			toggle suppress speech off
"M E"
AC77			pulse output command
"M E"
DD59211			save macro to bank 1, number 1

AC21			execute macro
"The Time Is One Oh One A M"	the pulse command response is suppressed.

The following macro utilizes the parametric option:

DD590			Entmacro enter mode
"M R O Enter"
CC1			speech toggle off
"M E"
AC77			pulse output #7 (ie., start tape recorder)
"M E"
CC1			speech toggle on
"M E"
DD599			designate next command to get parameter
"M E"
AB1			autopatch command (leave off phone #, user will supply when the 
macro is executed).
"M E"
DD59212			save the macro, bank 1, number 2

AC223683716		execute the macro with the phone number.
"Telephone Call 3 6 8 3 7 1 6"
AA9			complete phone call
"Call Complete"

AC22**			re-dial with read back suppress
"Telephone Call"
AA9			complete phone call
"Call Complete"
(see Autopatch for explanation of patch parameters)
Enter a macro to restrict access of port C if Port B = RX or TX: (port C is an HF remote base while port B is a VHF/UHF remote base and it is decided by the repeater committee that the HF remote shall not be activated if the VHF/UHF remote is in use)
DD590			macro entry mode
"M R O Enter"
DD59605			abort if port B = RX
"M E"
AD41			put port C in RX
"M E"
DD59213			save macro

AC23			execute macro (if B = off)
"C R X"

AC23			execute macro (if B = RX)
A more complicated macro may be used to support special telephone considerations. The following macro is designed for a site that has two available phone lines -- each line has commercial services which provide a busy signal to the FF-800 when their respective line is in use. These two busy signals are connected to command trigger inputs 1 and 2 (no macro is assigned to these inputs for this example). The repeater owner wants the controller to automatically choose the non-busy phone line each time an autopatch is executed. A relay is connected to output 7 to switch between the two lines -- the inputs are true when the phone line is busy. Two macros will be needed to construct this feature:
DD590			macro entry mode
"M R O Enter"
CC1			speech off
"M E"
AC32			try to do line 2 macro
"M E"
DD59621			abort if phone off hook (line 2 worked)
AB570			turn off line relay (pick line 1)
"M E"
DD59616			abort if line 1 is busy
"M E"
CC1			speech on
"M E"
DD599			designate autopatch parameter
"M E"
AB1			autopatch command
"M E"
DD59221			save to bank 2, number 1

The second macro will try to do the autopatch on line 2:
DD590			macro entry mode
"M R O Enter"
DD59617			abort if line 2 = busy
"M E"
AB571			activate phone line for line 2
"M E"
CC1			speech on (was turned off before)
"M E"
DD599			designate parameter
"M E"
AB1			do the autopatch
"M E"
CC1			speech off
"M E"
DD59222			save to bank 2, number 2
The autopatch command would now be {AC30} plus the phone number and options (as specified in the Autopatch command). In this example the phone busy input would be left disconnected. If both lines were busy, the FF-800 would respond "Abort" and the user would have to try again later -- otherwise, the controller would connect to the first available phone line and initiate the autopatch. This example demonstrates the power and flexibility of the FF-800 macro system. For custom commands or operations, the user will find few limits to the capabilities that can be incorporated into their system.

Command Trigger input example: One possible use for the command trigger inputs would be that of a loss of commercial power alert feature. In this example, a signal is provided to input #3 that goes high when the repeater commercial supply is lost (of course, this assumes that a battery back-up system is in place for the repeater). Two macros must be programmed: one to activate the power fail mode, and one to deactivate the power fail mode. What these macros do is up to the user. They could simply activate/de-activate a tail message or the user could change timer settings and ID message settings to limit transmitter key up duration during the power fail condition (this example sets a tail message).

DD590			macro enter mode
"M R O Enter"
CC1			speech suppress
"M E"
CC45011			turn tail #1 on
"M E"
DD59221			save to bank 2, number 1
{set trigger command syntax: (cntl) (475) (input#) (active hi/lo) ; (macro#)}
CC4753120			set trigger for macro #20, on high input
"C M D T Two Zero"

Enter power fail message and assign to tail #1:

DD580			text enter mode
"Power Failure"
*325			save to message #25

DD55522*25		assign message to tail #1
"Two Two A S N Two Five"
The configuration is complete. Bringing input #3 high will activate the "Power Failure" tail message. This example requires the user to manually clear the message, but the user could also program a macro to automatically deactivate the tail message when input #3 goes low (this is left as an exercise for the user to try).

4.8.2 Scheduler and Clock Functions

The FF-800 features a battery-backed real time clock that can be used to provide the time of day and date to users (either through command entry or ID bulletins and tail messages). The clock can also be used to schedule "events" that are to occur at a specific time. These "events" trigger the execution of a macro that performs a particular function. The scheduler allows the user to program the FF-800 to automatically re-configure itself to respond to regular, or semi-regular events.

The scheduler allows events to be specified by month, date or day of week, hour, and minute. Any of these parameters can be replaced by a "wildcard" which allows daily, weekly, or monthly events. Since the user defines which time parameters are to be wildcards, the event patterns that can be defined are very flexible.

Set Clock Access: CONTROL
(cntl) (410) (hhmmss) ; (MMDDYY) set time and date (date is optional)
Response: "Time" in female voice
(cntl) (410) ; (day of week) set day of week
Response: "D O W" plus numeric day of week

The time and date parameters MUST include leading zeros, which means that One Ten a.m. would be represented as "011000". Also, the time is always entered in 24 hour format. If the (MMDDYY) is excluded, the current date settings are left unchanged. If the clock is disabled by the Disable Clock command, the Set Clock command will automatically re-start the clock.

The (day of week) parameter is a single digit from 1 to 7 (1 = sunday, 2 = monday, etc...). The day of week is only used by the scheduler to match weekly events (events that occur on the same day of each week).

CC410165900		set clock to 4:59 pm
CC410165900082493	set clock to 4:59 pm, August 24, 1993
CC4101			set day to Monday
"Set D O W One"
CC410			interrogate day of week
"D O W One"
Disable Clock Access: CONFIGURATION
(cnfg) (515) ; (on/off)
Response: "C L K" plus "On" or "Off"

This command is used to de-activate the internal clock. This operation preserves the clock battery and should be executed if the FF-800 is to be without power for an extended period of time. The clock battery is specified by its manufacturer to last 10 years without power applied. This command can also be used to temporarily disable the scheduler and time functions if desired.

Example: A large metropolitan repeater club maintains spare repeater components as part of their maintenance procedure. The FF-800 that is used as a spare is to be stored until needed:

DD515			interrogate clock status
"C L K On"
DD5150			turn off clock
"Set C L K Off"
When the controller is powered up for use, the user would only need to set the time to re- activate the clock.

Time Talk Access: GENERAL
{#24} (AB8)
Response:"The Time Is" plus 12 hr format time, all in female voice

This is a user available command that allows the time of day to be interrogated.

"The Time Is Twelve Oh One A M"
Date Talk Access: GENERAL
{#50} (BA3)
Response: numeric form of current month and date

This is a user available command that allows the current date to be interrogated.

"One Twenty Seven"	January 27
Clock Smoothing Access: CONFIGURATION
(cnfg) (517) ; (correction) correct slow clock
(cnfg) (517) ; (*) ; (correction) correct fast clock
Response: "S M U Plus" plus (correction) or "S M U Minus" plus (correction)

While the clock manufacturer specifies the accuracy of their devices, it has been found that some combinations of electrical noise and temperature variations can adversely affect the long term accuracy of the clock module. This command gives the user the ability to set a correction factor of up to plus or minus 30 seconds per day to counteract any errors that might appear in their clock. This procedure can allow the clock to be "trimmed" to within +/- 15 seconds per month of the actual time.

If the user suspects that their clock accuracy is not within acceptable limits, they should begin keeping accurate records of the set time and deviated time. Ideally, the user would set the time and note the date and time for this operation against a known standard (such as WWV). With this information noted, the user can later quantify the extent of the inaccuracy (which is an important pre-requisite to the Clock Smoothing command). The clock should run for at least a couple of weeks before trying to determine any error in the current time. After the clock has been running for two weeks or more, determine the total error (in seconds) and divide by the number of days since the clock was set (this gives the error in seconds per day). This value is entered as the (correction) parameter.

Example: The user sets the clock by WWV to 16:34 on August 8. On August 26, at 16:01, the user notes that the clock is 1 minute 10 seconds fast (with reference to WWV). by dividing 70 seconds by 18 days, the user notes that the clock is fast by 3.88 seconds per day (round this up to 4). Thus, we want to correct the fast clock as follows:

DD517			check current value
"S M U Zero"
DD517*4			set to subtract 4 seconds per day
"Set S M U Minus Four"
Note: Always add or subtract the calculated value with the current value. For example, use the same correction as above:
DD517			check current value
"S M U One"
DD517*3			subtract 4 from current setting (1 - 4 = -3)
"Set S M U Minus Three"
If the initial calibrate operation is based on fairly accurate data, subsequent calibrations should not be required.

Set Scheduler Event Time Access: CONTROL
(cntl) (471) (event #) ; (hhmmMMDD)
(cntl) (471) (event #) ; (hhmmd)
hh = hours in 24 hour format
mm = minutes
MM = month
DD = date
d = day of week (1 = sun, 2 = mon, etc...)
Response: "S C D Time" plus the time string
Wild cards are indicated in the response string as "W C".
The weekly event mode responds:
"S C D Time" plus time string, "D O W" plus day of week number.

The time and date parameters must include leading zeros for each parameter. The weekly event setting is specified by the (hhmmd) format. This format will set the event to occur at the same time on the same day of each week. With the exception of (d), any of the other parameters can be replaced by (**). Doing so specifies the wild card for that parameter -- only (**) is valid as a wild card. This wild card system allows the user to specify any frequency of events from once a minute to once a year.

Set Scheduler Event Macro Access: CONTROL
(cntl) (474) (event #) ; (macro#)
Response: "S C D Operator" plus the (macro#)

If there is no macro assigned to an event, the scheduler will not perform any operation when the event time is reached.

Event Enable Access: CONTROL
(cntl) (473) (event#) ; (on/off)
Response: "S C D On" or "S C D Off"

Event Enable allows the user to enable or disable a particular event without resetting any of the scheduler parameters. This command can be used inside a scheduler event macro to create "leap-frog" events. These events would turn on or off other events to meet special scheduling requirements. An example of this would be a scheduler event to reset the clock for day light savings time. If a scheduler event is programmed to set the clock to 1:00 am and that event occurs at 2:00 am, the scheduler system would get stuck in an infinite loop unless that same event macro was to execute Event Enable and deactivate itself. The event could be re-enabled in the spring by the event macro that sets the clock forward (this event does not need to deactivate itself, because it won't loop on itself).

Event Re-Synchronize Access: CONTROL
(cntl) (479800)
Response: "S C D Current" plus any event macro responses

Depending on the extent of the scheduler use and the types of command macros implemented, the user may need to re-synchronize the scheduler system after a reset operation. This causes the FF-800 to proceed through the event list and execute all enabled events beginning at January 1 and ending at the current date and time. This guarantees that the state of the controller is updated as though it had been on the air since January 1.

Scheduler Example: For this example the user desires to set a "drive time" mode where the QSO time-out is 90 seconds, and the courtesy tone is changed. This mode would take effect between 6:30 to 9:00 and 16:00 to 18:00. The first step is to define a pair of macros, one to initiate the "drive time" mode, and one to return the repeater to the "normal" mode.

DD590			macro enter mode
"M R O Enter"
CC1			speech off (no announce desired)
"M E"
DD5100190			set QSO time to 90 seconds
"M E"
DD5500207			port A courtesy tone = #7
"M E"
DD59231			save to bank 3, number 1

DD590			macro enter mode
"M R O Enter"
CC1			speech off (no announce desired)
"M E"
DD51001180		set QSO time to 180 seconds
"M E"
DD5500202			port A courtesy tone = #2
"M E"
DD59232			save to bank 3, number 2

Configure scheduler:
CC471010630****		set event 1 for 6:30 am, every day
"Set S C D Time Six Thirty W C W C"
CC4740131			macro #31 initiates "drive time"
"Set S C D Operator Three One"
CC473011			turn on event #1
"Set S C D On"
CC471020900****		set event 2 for 9:00 am, every day
"Set S C D Time Nine Oclock W C W C"
CC4740232			macro #32 terminates "drive time"
"Set S C D Operator Three Two"
CC473021			turn on event #2
"Set S C D On"
CC471031600****		set event 3 for 4:00 pm, every day
"Set S C D Time Sixteen Oclock W C W C"
CC4740331			macro #31 initiates "drive time"
"Set S C D Operator Three One"
CC473031			turn on event #3
"Set S C D On"
CC471041800****		set event 4 for 6:00 pm, every day
"Set S C D Time Eighteen Oclock W C W C"
CC4740432			macro #32 terminates "drive time"
"Set S C D Operator Three Two"
CC473041			turn on event #4
"Set S C D On"
The user also decides that the "drive time" feature is not appropriate for Saturday and Sunday, so a pair of weekly events are used to turn the previous events off Friday at 18:01 and turn them back on sunday at 18:01.

DD590			macro enter mode
"M R O Enter"
CC1			speech off (optional)
"M E"
CC473010			turn off event #1
"M E" 
CC473020			turn off event #2
"M E"
CC473030			turn off event #3
"M E"
CC473040			turn off event #4
"M E" 
DD59233			save to bank 3, number 3

DD590			macro enter mode
"M R O Enter"
CC1			speech off (optional)
"M E"
CC473011			turn on event #1
"M E" 
CC473021			turn on event #2
"M E"
CC473031			turn on event #3
"M E"
CC473041			turn on event #4
"M E" 
DD59234			save to bank 3, number 4

CC4710518016		set weekly event, Friday, 6:01 pm
"Set S C D Time Eighteen Oh One D O W Six"
CC4740533			set event macro (events off)
"Set S C D Operator Three Three"
CC474051			turn on event
"Set S C D On"
CC4710618011		set weekly event, Sunday, 6:01pm
"Set S C D Time Eighteen Oh One D O W One"
CC4740634			set event macro (events on)
"Set S C D Operator Three Four"
CC474061			turn on event
"Set S C D On"

To: Table of Contents Next Section