Define_Variable; Define_Latching - AMX AXCESS CONTROL SYSTEM PROGRAM Instruction Manual

Programming language
Table of Contents

Advertisement

LIGHT_FULL
LIGHT_MED
LIGHT_LOW
LIGHT_OFF
VPROJ_IN_1
VPROJ_IN_2
VPROJ_IN_3
VPROJ_IN_4
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
BUFFER[1Ø]
INTEGER CAM_PRESET[1Ø]
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]
[VCR,PLAY]..[VCR,REWIND]
VAR1
Axcess Programming Language
= 1
(* LOW VOLTAGE LIGHTING PRESETS *)
= 2
= 3
= 4
= 11
= 12
= 13
= 14
(* Single variables *)
(* Array variables *)
(* Integers and variables *)
(* defined as latching *)
(* defines a range of device-channels as
latching *)
(* defined as latching *)
Axcess Basics
11

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AXCESS CONTROL SYSTEM PROGRAM and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Axcess

Table of Contents