![background image](http://html1.mh-extra.com/html/amx/softkey-tx-sk/softkey-tx-sk_instruction-manual_2939359018.webp)
Programming
14
TX-SK+ SoftKey Transmitter
AXCESS Keywords (Cont.)
DEFINE_LATCHING
A latching channel is a channel that only changes its state once per
push. If a latching channel is activated by a TO keyword, it changes its
state; when the TO is stopped, by releasing the button that started it, the
channel does not go back to its previous state (like a momentary chan-
nel). The channel stays either on or off. The status of a latching channel
will reflect the on/off state of the channel. Here is an example:
DEFINE_LATCHING
[RELAY,SYSTEM_POWER] (* defined as latching *)
[VCR,PLAY]..[VCR,REWIND] (* defines a range of device-
channels as latching *)
VAR1 (* defined as latching *)
DEFINE_MUTUALLY_EXCLUSIVE
When a channel is turned on in a mutually exclusive set, it activates its
physical output as long as the button is pressed. When the button is
released, the physical output stops. The status, however, does not work
the same way. Even after the physical output stops, the status still indi-
cates the channel is on until another channel in the mutually exclusive
set is activated. The status is left on to indicate which channel in the set
was last activated. This is sometimes called last button pressed feed-
back. When a channel or variable in this set is activated, all the other
members of the set are turned off beforehand. This is called break before
make logic. This prevents an accidental activation of more than one
channel at the same time, which could cause serious damage to some
devices. Members of a mutually exclusive set are placed in parentheses
underneath the DEFINE_MUTUALLY_EXCLUSIVE keyword. The double
period (..) shortcut specifies a range of device-channels to be defined as
mutually exclusive. For example:
DEFINE_MUTUALLY_EXCLUSIVE
([RELAY,SCREEN_UP],[RELAY,SCREEN_DOWN]) (* defines two
channels as
mutually
exclusive *)
([RELAY,DRAPE_OPEN]..[RELAY,DRAPE_STOP])(* defines a
range of
channels
as mutually
exclusive *)
DEFINE_PROGRAM
Define_Program marks the beginning of mainline, telling the compiler
that the following statements make up the actual executing program.
Before beginning the main program, you must have the
DEFINE_PROGRAM header. This header tells Axcess you are begin-
ning the actual program at this point. It is used like this:
DEFINE_PROGRAM (* Your program starts here *)
The most important feature of mainline is that it runs in a continuous
loop. While most programming languages have a beginning and an end,
mainline is like a circle: when the Central Controller gets to the end, it
loops back to the top and passes through it again.
DEFINE_START
DEFINE_START marks the section of programming that will be executed
only once immediately following power-up or system reset. They cannot
be executed again until another Axcess power-up. The keyword TO can-
not be used in the DEFINE_START section; instead, use ON, OFF, or
PULSE. For information on these keywords, refer to Changing the State
of a Channel section on page 16.
When the Axcess Control System is turned on, the program that was last
loaded into the Central Controller is in operation, and is waiting for input
from the user. However, you can tell Axcess to run a series of statements
immediately when the system is turned on.
In your program, you may want to reset all three decks to stop (using
SYSTEM_CALLs), turn on the lights, open the drapes, and raise the
screen when Axcess is powered up.