User Guide

Axcess Basics
6
Axcess Programming Language
The number of open and closed braces must be the same in your program. After compiling, Axcess
will list an error if the numbers are different.
PUSH[DEVICE, CHANNEL] (*Input request*)
{
ON [DEVICE, CHANNEL] (*Output command*)
X = 5
}
In this example, when button 1 on PANEL is pressed, relay 5 on RELAY_CARD is turned on. Also,
the variable X is assigned the value of 5. The open brace indicates the beginning of the compound
statement, and the close brace ends it.
If you only need the relay to be turned on, the statement could have been written like this:
PUSH[PANEL,1]
ON [RELAY_CARD,5]
Since there is only one statement after the line PUSH[PANEL,1], braces are not necessary, but can
be used.
PUSH[PANEL,1]
{
ON [RELAY_CARD,5]
}
Comments Within the Program
Axcess allows you to place helpful comments inside your program. A comment is a description or
remark not considered part of the actual program. Comments are strictly for the benefit of the
programmer, to be used as navigational and organizational aids. Any text placed between an open
parenthesis and asterisk and the inverse, an asterisk and closed parenthesis will not be compiled,
even if the text is separated over several lines. For example:
(* This is a comment. *)
Comments are especially helpful in long programs, where you can label different sections for future
reference. You can place any number of comments in your program, the compiler will pass over
them. For example:
(* This section will define all the devices used. *)
DEFINE_DEVICE
VCR = 1 (* AXC-IR/S: VCR *)
CD = 2 (* AXC-IR/S: CD PLAYER *)
VPROJ = 3 (* AXC-IR/S: VIDEO PROJECTOR *)
RELAY = 7 (* AXC-IR/S: SCREEN *)
LIGHTS = 8 (* AXC-IR/S: LIGHTS *)
TP = 128 (* AXU-CA1Ø COLOR VIDEO PANEL *)
Comments can also be used to label statements or lines of code, for your reference. As illustrated in
the next example, descriptions of PUSH statements can be useful:
DEFINE_PROGRAM
PUSH[TP,33] (* SLIDE PRESET *)
{
PULSE[RELAY,SCREEN_DN]
PULSE[LIGHTS,LIGHT_LOW]
PULSE[VPROJ,VPROJ_IN_4]
}