![background image](http://html1.mh-extra.com/html/amx/softkey-tx-sk/softkey-tx-sk_instruction-manual_2939359023.webp)
Programming
19
TX-SK+ SoftKey Transmitter
AXCESS Keywords (Cont.)
TO (Cont.)
The channel or variable will act under the rules set by
DEFINE_LATCHING, DEFINE_MUTUALLY_EXCLUSIVE, and
DEFINE_TOGGLING. For more information, refer to the Channel Char-
acteristics section. You will learn about these definitions later, when you
add more to your program.
WAIT
The WAIT keyword is used to activate functions after a specified delay
time has elapsed. When a WAIT is encountered, Axcess places the
WAIT statement into a list in memory and continues on with the rest of
the program.
After each pass through mainline, the Central Controller scans this wait
list, and if any WAITS have come due, Axcess executes the statement or
compound statement immediately following the expired WAIT keyword.
• Up to 50 WAITS are allowed in the list at a time.
• Time is measured in tenths of a second.
WHILE
Axcess checks to see if the condition following it is true, then either exe-
cutes statements within the WHILE statement, or continues to the next
statements in the code.
Example:
DEFINE_VARIABLE
RELAY_INDEX (* FOR TURNING ON RELAYS *)
DEFINE_PROGRAM
RELAY_INDEX = 1
WHILE (RELAY_INDEX <= 14)
{
ON[RELAY,RELAY_INDEX]
RELAY_INDEX = RELAY 1
}
In this example, the variable RELAY_INDEX is first set to 1. Next, the
WHILE statement checks to see if RELAY_INDEX is less than or equal to
14. Since it is (making the statement true), Axcess executes the com-
pound statement directly following the WHILE. Since RELAY_INDEX
equals 1, the device-channel referenced by [RELAY,1] is turned on, and
RELAY_INDEX is incremented by one. Then the program loops back to
the WHILE statement. This loop continues until RELAY_INDEX becomes
15; in this case the compound statement following the WHILE is not exe-
cuted, and Axcess continues to the rest of the program. This block of
code effectively turns on the first 14 channels of device RELAY.