![background image](http://html1.mh-extra.com/html/amx/softkey-tx-sk/softkey-tx-sk_instruction-manual_2939359019.webp)
Programming
15
TX-SK+ SoftKey Transmitter
AXCESS Keywords (Cont.)
DEFINE_START (Cont.)
For example:
DEFINE_START
PULSE[LIGHTS,LIGHT_FULL]
PULSE[RELAY,DRAPES_OPEN]
PULSE[RELAY,SCREEN_UP]
SYSTEM_CALL 'FUNCTION' (VCR,STOP,Ø)
SYSTEM_CALL 'FUNCTION' (CD,STOP,Ø)
SYSTEM_CALL 'FUNCTION' (CASS,STOP,Ø)
Any resetting of variable values should be done in this section. Remem-
ber, variables retain their values even if the system is powered down.
DEFINE_TOGGLING
To make a channel toggling, it must be defined as both mutually exclu-
sive and toggling. The DEFINE_TOGGLING section is usually located
directly after the DEFINE_MUTUALLY_EXCLUSIVE section. Here is an
example:
DEFINE_TOGGLING
[RELAY,SCREEN_UP]
[RELAY,SCREEN_DOWN]
DEFINE_VARIABLE
Variables are places to store data that will change as the program is exe-
cuted. Think of a variable as a random container, nearly anything can be
placed in it. For example, a variable can represent any number from 0 to
65,535; variables cannot hold a negative number. If one variable is sub-
tracted from another, the result will always be positive. If you subtract a
larger number from a smaller number, the result wraps around at 65,535.
For example, 10-20 = 65,525.
DEFINE_VARIABLE
TEMP (* Single variables *)
BUFFER[1Ø] (* Array variables *)
INTEGER CAM_PRESET[1Ø] (* Integers and variables *)
When the system is turned off, variables retain their values. Resetting
varaiables must be done manually in the DEFINE_START section.
In your first program, you will not be using variables, but keep the
DEFINE_VARIABLE header because you will be using them in the
future.
ELSE
If the corresponding IF statement is false, the program will jump to this
section of the IF...ELSE set of statements.
See
IF
for details.
GET_BUFFER_CHAR
This keyword is used to remove characters from a buffer. It has a two-
part operation:
• First, it retrieves the first character in the buffer for your own utilization.
This creates the same effect as if you retrieved the first storage
location of a normal string array.
• Second, it removes that character from the buffer, causing all the other
characters to shift up one place. The second character is now the first,
the third is now the second, and so on.
Here is the syntax:
result = GET_BUFFER_CHAR (array)
The parameter passed to GET_BUFFER_CHAR must be an array, but
does not need to be a buffer. The keyword will operate identically in
either case. Only one byte (character) will be returned, and this value
can be assigned to a variable, array, or a cell in an array.