Levels
42
Axcess Programming Language
contain the value of the level with which it is associated. Since this association only needs to occur
once, this keyword is only allowed to appear in the DEFINE_START section of your program.
In this section, you will develop a new program that handles levels. This system contains a volume
control card to control a volume level, and a Touch Panel for the user to control the volume card.
On the Touch Panel there will be four buttons: Volume Up, Volume Down, Volume Mute, and
Volume Preset. There will also be a bargraph to display and control the volume level, as shown in
FIG. 12.
Here are some code excerpts to get started:
DEFINE_DEVICE
VOLUME = 96 (* AXB-VOL3 *)
TP = 128 (* AXU-CVA COLOR VIDEO PANEL *)
DEFINE_CONSTANT
VOL_UP = 1 (* THESE CHANNELS AFFECT VOLUME LEVELS 1+2 *)
VOL_DN = 2
VOL_MUTE = 3
DEFINE_VARIABLE
VOL_LEVEL (* LEVEL OF VOLUME CHANNEL 1 *)
VOL_PRESET (* VOLUME PRESET *)
DEFINE_START
CREATE_LEVEL VOLUME,1,VOL_LEVEL
This code defines the devices you will use, a variable in which to store the volume level value, and
the statement in the startup code to create the association between level number 1 of the volume
card and the VOL_LEVEL variable. It also defines some constants which give names to the
different channels available in the volume control card. By turning these channels on and off, the
user can raise, lower, and mute the volume levels of the card. Here is the code for the Volume Up,
Volume Down, and Volume Mute buttons on the Touch Panel:
FIG. 12
The Touch Panel layout for this section.
Summary of Contents for Axcess
Page 1: ...instruction manual Software Axcess Programming Language ...
Page 8: ...vi Axcess Programming Language Table of Contents ...
Page 12: ...Introduction 4 Axcess Programming Language ...
Page 22: ...Axcess Basics 14 Axcess Programming Language ...
Page 38: ...Channel Characteristics 30 Axcess Programming Language ...
Page 54: ...Levels 46 Axcess Programming Language ...
Page 62: ...Operators 54 Axcess Programming Language ...
Page 66: ...Variable Types and Conversions 58 Axcess Programming Language ...
Page 70: ...Two Dimensional Arrays 62 Axcess Programming Language ...
Page 80: ...While Keywords 72 Axcess Programming Language ...
Page 86: ...Using Buffers 78 Axcess Programming Language ...
Page 94: ...Waits and Timer Keywords 86 Axcess Programming Language ...
Page 102: ...Using Subroutines 94 Axcess Programming Language ...
Page 108: ...Include Files and System_Calls 100 Axcess Programming Language ...
Page 120: ...Compiler Error Messages 112 Axcess Programming Language ...
Page 124: ...The External_Control Protocol 116 Axcess Programming Language ...