Axcess Basics
11
Axcess 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
Страница 1: ...instruction manual Software Axcess Programming Language ...
Страница 8: ...vi Axcess Programming Language Table of Contents ...
Страница 12: ...Introduction 4 Axcess Programming Language ...
Страница 22: ...Axcess Basics 14 Axcess Programming Language ...
Страница 38: ...Channel Characteristics 30 Axcess Programming Language ...
Страница 54: ...Levels 46 Axcess Programming Language ...
Страница 62: ...Operators 54 Axcess Programming Language ...
Страница 66: ...Variable Types and Conversions 58 Axcess Programming Language ...
Страница 70: ...Two Dimensional Arrays 62 Axcess Programming Language ...
Страница 80: ...While Keywords 72 Axcess Programming Language ...
Страница 86: ...Using Buffers 78 Axcess Programming Language ...
Страница 94: ...Waits and Timer Keywords 86 Axcess Programming Language ...
Страница 102: ...Using Subroutines 94 Axcess Programming Language ...
Страница 108: ...Include Files and System_Calls 100 Axcess Programming Language ...
Страница 120: ...Compiler Error Messages 112 Axcess Programming Language ...
Страница 124: ...The External_Control Protocol 116 Axcess Programming Language ...
Страница 143: ...Index 135 Axcess Programming Language ...