AMX AXCESS CONTROL SYSTEM PROGRAM User manual

instruction manual
Software
Axcess
Programming Language

AMX Limited Warranty and Disclaimer
AMX Corporation warrants its products to be free of defects in material and workmanship under normal use for
three (3) years from the date of purchase from AMX Corporation, with the following exceptions:
• Electroluminescent and LCD Control Panels are warranted for three (3) years, except for the display and touch
overlay components that are warranted for a period of one (1) year.
• Disk drive mechanisms, pan/tilt heads, power supplies, MX Series products, and KC Series products are
warranted for a period of one (1) year.
• Unless otherwise specified, OEM and custom products are warranted for a period of one (1) year.
• Software is warranted for a period of ninety (90) days.
• Batteries and incandescent lamps are not covered under the warranty.
This warranty extends only to products purchased directly from AMX Corporation or an Authorized AMX Dealer.
AMX Corporation is not liable for any damages caused by its products or for the failure of its products to perform.
This includes any lost profits, lost savings, incidental damages, or consequential damages. AMX Corporation is not
liable for any claim made by a third party or by an AMX Dealer for a third party.
This limitation of liability applies whether damages are sought, or a claim is made, under this warranty or as a tort
claim (including negligence and strict product liability), a contract claim, or any other claim. This limitation of
liability cannot be waived or amended by any person. This limitation of liability will be effective even if AMX
Corporation or an authorized representative of AMX Corporation has been advised of the possibility of any such
damages. This limitation of liability, however, will not apply to claims for personal injury.
Some states do not allow a limitation of how long an implied warranty last. Some states do not allow the limitation or
exclusion of incidental or consequential damages for consumer products. In such states, the limitation or exclusion of
the Limited Warranty may not apply. This Limited Warranty gives the owner specific legal rights. The owner may
also have other rights that vary from state to state. The owner is advised to consult applicable state laws for full
determination of rights.
EXCEPT AS EXPRESSLY SET FORTH IN THIS WARRANTY, AMX CORPORATION MAKES NO
OTHER WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. AMX CORPORATION
EXPRESSLY DISCLAIMS ALL WARRANTIES NOT STATED IN THIS LIMITED WARRANTY. ANY
IMPLIED WARRANTIES THAT MAY BE IMPOSED BY LAW ARE LIMITED TO THE TERMS OF THIS
LIMITED WARRANTY.

Table of Contents
i
A
xcess Programming Language
Table of Contents
Introduction ...............................................................................................................1
Device Numbers................................................................................................................ 1
Video Monitors .................................................................................................................. 2
Connecting the System ..................................................................................................... 2
Blinking Light Status.......................................................................................................... 3
Axcess Basics ..........................................................................................................5
Format of the Programming Language ............................................................................. 5
Statements and Compound Statements ........................................................................... 5
Comments Within the Program ......................................................................................... 6
Identifiers........................................................................................................................... 7
Keywords........................................................................................................................... 7
Mainline ............................................................................................................................. 7
Definition Sections............................................................................................................. 9
Starting a new program............................................................................................................ 9
DEFINE_DEVICE..................................................................................................................... 9
DEFINE_CONSTANT ............................................................................................................ 10
DEFINE_VARIABLE .............................................................................................................. 11
DEFINE_LATCHING.............................................................................................................. 11
DEFINE_MUTUALLY_EXCLUSIVE....................................................................................... 12
DEFINE_START .................................................................................................................... 12
DEFINE_PROGRAM ............................................................................................................. 12
PROGRAM_NAME ................................................................................................................ 13
Using Input and Output ..........................................................................................15
Channels ......................................................................................................................... 15
Input Change Keywords .................................................................................................. 15
Changing the State of a Channel .................................................................................... 16
Output Change Keywords ............................................................................................... 16
Direct Assignment ........................................................................................................... 18
Putting Input and Output Together .................................................................................. 18
Channel Characteristics ........................................................................................19
Parts of an Output Channel............................................................................................. 19
The Device-Channel Concept ......................................................................................... 19
Defining Latching............................................................................................................. 19
Mutually Exclusive........................................................................................................... 20
Defining momentary mutually exclusive................................................................................. 20

ii Axcess Programming Language
Table of Contents
Defining mutually exclusive latching ...................................................................................... 21
Defining mutually exclusive toggling ...................................................................................... 21
Putting it all to work ................................................................................................................ 22
Programming Feedback.................................................................................................. 23
Grouping feedback statements .............................................................................................. 23
Device and Channel Keywords ....................................................................................... 24
Define_Combine .................................................................................................................... 25
Define_Latching ..................................................................................................................... 26
Define_Mutually_Exclusive .................................................................................................... 26
Define_Toggling..................................................................................................................... 26
The Variable Assignment Method ................................................................................... 27
Sample Program .................................................................................................................... 28
Arrays and Strings .................................................................................................31
Defining Arrays................................................................................................................ 31
Accessing and Storing Array Values............................................................................... 31
Strings ............................................................................................................................. 33
String literals .......................................................................................................................... 33
String expressions................................................................................................................. 33
Arrays as Strings............................................................................................................. 34
String Lengths ................................................................................................................. 34
Array Manipulation Keywords ......................................................................................... 36
Uppercase vs. Lowercase............................................................................................... 38
Setting uppercase and lowercase.......................................................................................... 38
Sending Strings............................................................................................................... 39
Array Keywords............................................................................................................... 39
String Keywords .............................................................................................................. 40
Levels ......................................................................................................................41
Introduction to Levels ...................................................................................................... 41
Creating Levels ............................................................................................................... 41
Level Keywords............................................................................................................... 43
Using Levels.................................................................................................................... 44
Reading Levels ...................................................................................................................... 44
Making a preset...................................................................................................................... 44
Using bargraphs..................................................................................................................... 44
Connecting levels................................................................................................................... 45
Operators ................................................................................................................47
Changing and Comparing Values ................................................................................... 47
Arithmetic Operators ....................................................................................................... 47

Table of Contents
iii
A
xcess Programming Language
Relational Operators ....................................................................................................... 47
True and false ........................................................................................................................ 48
Logical Operators ............................................................................................................ 49
Bitwise Operators ............................................................................................................ 50
Abbreviations................................................................................................................... 51
Precedence Among Operators........................................................................................ 51
Operator Keywords ......................................................................................................... 52
Bitwise Operator Keywords ............................................................................................. 53
Variable Types and Conversions ..........................................................................55
ASCII Codes.................................................................................................................... 55
Integer Arrays.................................................................................................................. 55
Conversion keywords............................................................................................................. 56
Two-Dimensional Arrays .......................................................................................59
Storing Values ................................................................................................................. 59
Retrieving values.................................................................................................................... 60
IF and the Boolean Expressions ...........................................................................63
Boolean Expressions....................................................................................................... 63
The IF Statement............................................................................................................. 64
The IF...ELSE Set of Statements ........................................................................................... 64
The IF...ELSE IF Set of Statements....................................................................................... 64
Nesting ............................................................................................................................ 64
The SELECT...ACTIVE Statement.................................................................................. 65
More Boolean operators......................................................................................................... 66
Reading a Boolean expression table ..................................................................................... 66
Boolean Keywords .......................................................................................................... 67
While Keywords ......................................................................................................69
WHILE ............................................................................................................................. 69
MEDIUM_WHILE ............................................................................................................ 69
LONG_WHILE................................................................................................................. 69
While Keywords............................................................................................................... 70
Using Buffers ..........................................................................................................73
Communicating to the Outside World.............................................................................. 73
Receiving strings.................................................................................................................... 73
Creating buffers...................................................................................................................... 73
Storing characters .................................................................................................................. 73
Retrieving characters ............................................................................................................. 74
Buffer Keywords .............................................................................................................. 76
Waits and Timer Keywords ....................................................................................79

iv Axcess Programming Language
Table of Contents
Controlling Time in Axcess.............................................................................................. 79
The Wait List ................................................................................................................... 79
Multiple Waits.................................................................................................................. 81
Naming Waits.................................................................................................................. 82
Canceling, Pausing, and Restarting Waits...................................................................... 82
Special Uses of Wait ....................................................................................................... 83
The Wait_Until Keyword.................................................................................................. 83
Misusing Wait_Until......................................................................................................... 83
Naming and Removing Wait_Untils ................................................................................ 84
Timer Keywords .............................................................................................................. 84
Using Time, Date, and Day ....................................................................................87
Time, Date, and Day Keywords ...................................................................................... 88
Using Subroutines .................................................................................................89
Defining a Subroutine...................................................................................................... 89
Calling subroutines................................................................................................................. 89
Local Variables and Parameters..................................................................................... 90
Local Variables....................................................................................................................... 90
Parameters............................................................................................................................. 90
Passing values back to the caller........................................................................................... 91
Local Variables and Parameter Keywords ...................................................................... 93
Include Files and System_Calls ............................................................................95
Managing Large Programs.............................................................................................. 95
Include files ............................................................................................................................ 95
System_Calls and Library files........................................................................................ 96
Factory System_Calls ..................................................................................................... 97
Pre-Processor Statements ..................................................................................101
Debugging .............................................................................................................103
Types of Errors.............................................................................................................. 103
Compilation Errors and Warnings ................................................................................. 103
Run-Time Errors............................................................................................................ 105
Using AMX BUG .................................................................................................................. 105
Tracking down your errors ............................................................................................ 106
Tracing program flow ........................................................................................................... 106
Viewing Variables.......................................................................................................... 107
Compiler Error Messages ....................................................................................109
The External_Control Protocol ...........................................................................113
Controlling Axcess from the Outside............................................................................. 113

Table of Contents
v
A
xcess Programming Language
Sending Commands...................................................................................................... 113
Responses from Axcess................................................................................................ 114
External_Control .................................................................................................................. 115
Appendix ...............................................................................................................117
Axcess Programming Standards................................................................................... 117
Axcess Keywords .......................................................................................................... 126
ASCII Code Chart.......................................................................................................... 127
Hexadecimal Chart Abbreviations ................................................................................. 128
Accessing the AMX BBS ......................................................................................129
About Worldgroup Manager .......................................................................................... 129
Installing Worldgroup Manager ..................................................................................... 129
Adding the AMX BBS to the Worldgroup Manager: ...................................................... 129

vi Axcess Programming Language
Table of Contents

Introduction
1
Axcess Programming Language
Introduction
The Axcess system is a microprocessor-based control system capable of controlling both simple
and complex devices, giving you complete control of every device in any system. Through a
flexible language, Axcess can be programmed to handle almost any task. It can automatically dim
lights, increase volume controls to preset levels, turn on video projectors, and much more. An IBM-
compatible computer is required to program the Axcess Control System, and not much memory is
needed. Even complex Axcess programs can be handled by an average laptop computer. Once the
system is programmed, the computer is needed only for diagnostic tests and for loading or saving
programs.
Axcess is designed to be user-friendly. Although there are more than 90 commands, many are self-
explanatory and take little time to master. If you make a mistake in your program, Axcess finds the
error and reports it to you. With this helpful aid, you can make both minor and major programming
changes quickly and easily in the field.
Device Numbers
One of the most fundamental concepts in Axcess programming is the device number. A device
number is a unique number from 1 to 255 designating each device connected to Axcess via AXlink.
Each device on AXlink must have a unique device number. For Axcess CardFrames, the device
number of a card is set by the slot number and the DIP switch setting on the Server Card. For box
devices, the address is set with a DIP switch on the device itself. The DIP switch on the Server Card
sets the address of the card in slot 1. For example, if the DIP switch on the Server Card is 17, then
the device number of card slot 1 will also be 17. Card slot 2's device number will be 18 (17+1); card
slot 3's is 19 (17+2), and so on. Card slot 16's device number will be 32 (17+15).
Each AXlink device has its own DIP switch to select its device number. The Touch Panel has a
keypad to enter its device number on the protected setup page. The table below shows the
recommended device numbers for Axcess CardFrames and other Axcess devices. These numbers
are only for the card in slot 1 of each CardFrame; for each consecutive device, add one to the
appropriate number.
Recommended Device Numbers
DIP Switch Settings
CardFrame#ordevicetype Device#12345678
1 1 10000000
2 17 10001000
3 33 10000100
4 49 10001100
5 65 10000010
6 81 10001010
Boxes(AXB-XXX) 96 00000110
AXB-FD 127 1 1 111110
Panels (AXT-XXX and AXM-XXX) 128 0 0 000001
Wavesystem(2-wayRF) 192 00000001

Introduction
2Axcess Programming Language
As shown in the table above, AMX recommends that all panels, infrared (IR) receivers, and radio
frequency (RF) receivers start on device number 128, and that the number increase with each
device. All AXB-xxx (boxes) start at device number 96, and increase with each device. The AXB-
FD (floppy disk drive) starts at 127 and decreases with each AXB-FD. When numbering panels,
start with RF and IR, then SoftWire panels such as the AXU-MSP8 or AXU-SPL4, and then touch
panels. Two-way RF, wireless Wave systems should start at device number 192.
Video Monitors
The Axcess Control System automatically detects whether your monitor is color or monochrome.
However, if your monitor reports being a CGA monitor, but has no color (such as LCD or plasma-
type monitors), you must force the Axcess Control System into monochrome mode. To do this,
launch Axcess by typing:
C:\AMX DOS TOOLS \AXCESS> AXCESS /B
Connecting the System
At this point, the Axcess program should be installed on your computer. The next step is to connect
the system. To supply power to the CardFrame, plug in the power supply from the power outlet to
the Axcess Control System. The green 2-pin Phoenix connector should be plugged into the lower
right corner on the back of the CardFrame. Next, the Axcess Programming Cable must be
connected from the communications port of the computer to the 9-pin connector on the Central
Controller.
The following table lists solutions to some common communication problems.
If the Central Controller is in slot MC1, the 9-pin connector on the back of the CardFrame can be
used.
Communications Problem Resolutions
Cause Resolution
The baud rate of the Axcess Control System is
different than that of the Central Controller.
The Axcess Control System baud rate can be found with the
Configure... option in the Communications menu, and an
explanation of setting the Central Controller baud rate is in
the AXC-EM Enhanced Master Card instruction manual. Set
both to the same setting.
The communications port number of the Axcess
Control System is different than that of the com-
munications port in which the Central Controller
cable is plugged.
The Axcess Control System com port number can be found
with the Configure... option in the Communications menu.
Make sure it matches the correct Central Controller commu-
nications port.
The communications settings of the Axcess
Control System are different than that of the
Central Controller.
The Axcess Control System communications settings can be
found with the Configure... option in the Communications
menu, and an explanation of changing these settings for the
Central Controller is in the AXC-EM Enhanced Master Card
instruction manual. Both should be set to eight data bits, no
parity, and one stop bit.
The connecting cable is not made by AMX. Inspect the cable's pinout. The cable connection chart in the
AXC-EM Enhanced Master Card instruction manual should
help determine the solution.

Introduction
3
Axcess Programming Language
Blinking Light Status
The green Status LED, on the front of the Central Controller, lights when the Central Controller is
plugged in, and power is supplied to the CardFrame. The AXlink LED uses a series of different
flash patterns to indicate the status of the control system:
• One blink per second: Indicates the system is operating normally.
• Two blinks per second: Indicates the devices specified in the program do not match the
devices found on AXlink. For a full description, refer to the Compare
current devices... option in the Diagnostics Menu section of this man-
ual.
• Three blinks per second: Indicates there is an AXlink communications error, probably due to a
wiring problem. Check all the Axcess wiring, making sure each cable
is firmly connected.
• No blinks: If the AXlink LED is on but not flashing, there is no AXlink activity. The
Central Controller has no Axcess program loaded, or there is no Cen-
tral Controller connected to the AXlink bus.

Introduction
4Axcess Programming Language

Axcess Basics
5
A
xcess Programming Language
Axcess Basics
Format of the Programming Language
The Axcess programming language is in a free format, meaning that the source code is independent
of tabs and carriage returns. Utilize tabs and carriage returns in a consistent method of code
placement to make the code readable. In this manual, the following outline format is used:
IF (X = 1)
{
PUSH[PANEL,1]
{
Y = 2
Z = 3
}
}
However, the above program statement executes the same even if it looks like this:
IF(X = 1) {PUSH[PANEL,1] {Y = 2 Z = 3}}
The syntax is identical, but the spacing is different. The first method is recommended because it is
easier to read, and adheres to Axcess programming conventions.
Statements and Compound Statements
In Axcess programming, most keywords and operators require a complete statement. A keyword is
a word or series of words signifying the operation for Axcess to execute; the keyword and all its
parameters form the statement. For example, the keyword to turn a channel on is ON, and the
statement to turn on a particular channel is ON [RELAY_CARD,RELAY].
Statements can also involve mathematical or logical operations when operators are used. An
operator is a character that performs a specific mathematical or relational function. For example,
the operator used to set a variable equal to a value is '='. For example, the statement used to set
variable X to the number 5 is X = 5. The following table lists special operators.
Several different statements grouped into one is called a compound statement. Braces are used to
enclose this type of statement. Compound statements are used if several statements are to be
executed in a situation where Axcess syntax will allow just one. The statements are executed in the
sequence they are programmed.
Special Operators
Operator Name Function
{ } Braces Combine several statements into a function.
[ ] Brackets • Enclose the device-channel: [device, channel].
• Enclose the location of a storage space in an array.
• Enclose the instance number for use with a SYSTEM_CALL.
( ) Parentheses • Enclose the expression after an IF statement.
• Enclose a mutually exclusive set in the Define section.
• Enclose DEFINE_CALL parameter list.
• Group a mathematical operation.

Axcess Basics
6Axcess 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]
}

Axcess Basics
7
A
xcess Programming Language
PUSH[TP,34] (* VCR PRESET *)
{
PULSE[RELAY,SCREEN_DN]
PULSE[LIGHTS,LIGHT_OFF]
PULSE[VPROJ,VPROJ_IN_1]
}
PUSH[TP,35] (* CD PRESET *)
{
PULSE[RELAY,SCREEN_UP]
PULSE[LIGHTS,LIGHT_FULL]
PULSE[VPROJ,VPROJ_IN_2]
}
These comments will help you find the SLIDE preset, VCR preset, and the CD preset of the Touch
Panel much more quickly.
Identifiers
Identifiers are used to denote a device, constant, or variable. For example, T_PANEL could
represent an AMX Touch Panel, PLAY could represent the first channel, and CD_SELECT could
represent the current compact disc player. There are certain guidelines for identifiers:
! Identifiers must begin with a letter followed by any combination of letters, numbers, or
underscores. No spaces are allowed.
! Valid identifiers: "CD3", "TOUCH_PANEL"
! Invalid identifiers: "3VHS", "CD PLAYER", "*RGB4"
! The identifier must have fewer than 26 characters.
! Identifiers are not case-sensitive.
! Each identifier must be unique. Once you define VHS3, do not choose the same name for
a different identifier.
Keywords
Keywords are certain words reserved for Axcess functions. These are integral to the system and
cannot be redefined or used as identifiers. For example, PUSH is a keyword, and cannot be used as
an identifier.
Mainline
An Axcess program typically consists of several definition sections, such as DEFINE_DEVICE,
DEFINE_VARIABLE, and DEFINE_PROGRAM. Each definition section has a different function.
Not all definition sections are required for a complete program. However, the
DEFINE_PROGRAM section is required because it contains the program code executed by the
Central Controller. This section of program code is also known as mainline. It is executed
continuously as long as the Central Controller has power.
1. When the Central Controller is powered up, it first executes the code in the DEFINE_START
section.

Axcess Basics
8Axcess Programming Language
2. Then, it starts at the beginning of mainline, the first line of program code after the
DEFINE_PROGRAM header. While executing mainline, the Central Controller processes the
statements in the program, taking whatever actions are defined by the program.
3. At the end of mainline, the Central Controller does some internal processing, then returns to
the top of mainline to start another loop (FIG. 1).
During this time, the Central Controller operations include:
! Checking the WAIT and WAIT_UNTIL lists
! Turning off expired PULSEs
! Handling Central Controller RS-232 communications
! Updating the AXlink communications bus
After the Central Controller handles these tasks, it executes mainline again:
1. First, the Central Controller scans the wait list for any expired WAITs, then checks the
WAIT_UNTIL list for any WAIT_UNTIL statement whose conditions have become true. If
one of these events has occurred, the Central Controller immediately goes back into the
program and executes the statement or compound statement directly following the WAIT or
WAIT_UNTIL statement.
2. Next, the Central Controller checks to see if any channels activated by the PULSE keyword
need to be turned off. If so, the Central Controller turns them off.
3. Next, the Central Controller handles RS-232 communications. It checks for incoming
characters, executes valid commands typed by the user, and sends out any pending
information.
4. Finally, the Central Controller updates the AXlink bus. During this time, the Central Controller
blinks the green LEDs on all Axcess bus devices, reads pending input changes, and updates all
levels and bargraphs. This action must be done frequently or the AXlink bus will stop
operating, causing the system to stop working.
FIG. 1 Mainline execution and internal processing

Axcess Basics
9
A
xcess Programming Language
Definition Sections
Starting a new program
When you begin a new program with the New option in the File menu, there are several definition
headings indicating what should be defined in each section:
! DEFINE_DEVICE
! DEFINE_CONSTANT
! DEFINE_VARIABLE
! DEFINE_LATCHING
! DEFINE_MUTUALLY_EXCLUSIVE
! DEFINE_START
! DEFINE_PROGRAM
The program will not operate differently if you do not have any statements under a heading.
However, you should keep the headings for reference.
Although the definition sections are not used in the main program, they create the materials the
main program needs to run. For example, devices and their channels are given names; channels are
given different characteristics, and variables are formed in the definition sections. Even the
immediate startup procedures of the Axcess Control System are contained in a definition section. If
you develop a good understanding of the DEFINE statements, you can build an excellent
foundation for the main part of your program.
DEFINE_DEVICE
When you start writing a program, label each device in the system. Each device on AXlink must
have a unique device number. For example, card 1 may have device number 1, and card 2 may have
device number 2. Whenever you use this device name in your program, Axcess will automatically
use the corresponding device number to reference the device. This is the function of the
DEFINE_DEVICE section. It is placed at the beginning of the program, and allows you to name the
devices.
However, with a long list of devices connected to AXlink, these numbers can be difficult to
remember. Assigning actual names to these devices is much easier.
The first step in writing a program is defining the devices in your system. For example, you have a
VCR, a CD player, and a cassette deck, and you are controlling them with the first three cards in
your CardFrame. These cards have device numbers 1, 2, and 3. You also need to control a
projection screen, some drapes, and lights. Two relay cards, one in slot 4 and one in slot 5, will
handle these (the first card handles both the screen and drapes). A Touch Panel will be used to
control all of these devices. Your DEFINE_DEVICE section should look like this:
The devices included in this code are used for example purposes only. It is not a
specific recommendation or endorsement.

Axcess Basics
10 Axcess Programming Language
DEFINE_DEVICE
VCR = 1 (* AXC-IR/S: VCR *)
CD = 2 (* AXC-IR/S: CD PLAYER *)
CASS = 3 (* AXC-REL8: VCR *)
RELAY = 4 (* AXC-REL8: SCREENS AND DRAPES *)
LIGHTS = 5 (* AXC-REL8: LOW VOLTAGE LIGHTING *)
VPROJ = 6 (* AXC-IR/S: PROJECTOR *)
TP = 128 (* AXU-CVA COLOR VIDEO PANEL *)
From this point on, you can reference device 1 with the name VCR, device 2 with the name CD,
and so on.
The Push window at the bottom of the screen is changed. If the devices in the previous example are
on AXlink, Axcess modifies the window to use the given device name instead of the device's
number. This provides a quick reference tool for future programming.
There is one more reason for using DEFINE_DEVICE. When you compare devices using the
Compare Current Devices... option in the Diagnostics menu, Axcess checks all the devices listed
under DEFINE_DEVICE. Next, it checks which devices are on AXlink. Axcess then tells you the
devices that you did not define in your program. These devices cannot be used or referenced until
they are defined, so check that all devices are under this heading.
AMX encourages the practice of starting control panel device numbers at device 128. This includes
radio frequency (RF) receivers, touch panels, softwire panels, and all other control panels and
receivers.
DEFINE_CONSTANT
Constants are identifiers whose values remain unchanged throughout the entire program. The
process of defining them is very similar to defining devices. Assigning a value to an identifier in
this section locks that value to the identifier for the entire program, making it possible to use
descriptive names instead of just numbers in your program.
In your system, the VCR, CD player, and cassette deck devices have channels that activate the
various transport functions, such as Play and Stop. As a general rule, Play is usually channel 1 and
Stop is channel 2. You could define these channel numbers as constants in your program to make it
more readable.
DEFINE_CONSTANT
PLAY = 1 (* VCR, CD AND CASS CONSTANTS *)
STOP = 2
PAUSE = 3
FFWD = 4
REW = 5
FSRCH = 6
RSRCH = 7
REC = 8
SCREEN_UP = 1 (* RELAY CONSTANTS *)
SCREEN_DN = 2
SYSTEM_POWER = 3
DRAPES_OPEN = 4
DRAPES_CLOSE = 5
DRAPES_STOP = 6
AMP_POWER = 7

Axcess Basics
11
A
xcess Programming Language
LIGHT_FULL = 1 (* LOW VOLTAGE LIGHTING PRESETS *)
LIGHT_MED = 2
LIGHT_LOW = 3
LIGHT_OFF = 4
VPROJ_IN_1 = 11
VPROJ_IN_2 = 12
VPROJ_IN_3 = 13
VPROJ_IN_4 = 14
The value of the constant PLAY is now set to 1. Also, STOP has a value of 2. Both of these values
cannot be changed anywhere in the program. With these constants set, if you need to activate the
play function of the VCR later in your program, use the constant PLAY, and Axcess knows to use
channel 1.
More than one constant can have the same number. For example, PLAY and FWD can both equal 1.
You may see this if two cards do not have the same channels for the same functions. For example,
PLAY on the VCR control card might be channel 1, and FWD on the slide control card could also
be channel 1.
By definition, the same constant cannot reference more than one number. This might seem obvious,
but this type of error could work its way into larger programs. If you make this mistake, Axcess
notifies you with a DUPLICATE SYMBOL error message upon compiling.
DEFINE_VARIABLE
Variables are places to store data that will change as the program is executed. 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 subtracted
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.
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 channel). 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 *)

Axcess Basics
12 Axcess Programming Language
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 indicates 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
feedback. 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_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 cannot 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. 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. Remember, variables retain their
values even if the system is powered down.
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 beginning 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
This manual suits for next models
1
Table of contents
Other AMX Control System manuals
Popular Control System manuals by other brands

Altecnic
Altecnic Matrix Midi 135D Installation, operation & maintenance instructions

iO HVAC Controls
iO HVAC Controls ZP6-ESP-PRO installation guide

Trio
Trio UNIPLAY HMI quick start guide

THOMSON
THOMSON Grass Valley Kalypso Classic Reference manual

resideo
resideo VR8205 installation instructions

Belimo
Belimo AFRB24-SR-S Technical data