AMX AXCESS CONTROL SYSTEM PROGRAM User Manual
Size:
1.52 Mb
Download

instruction manual

Axcess

Programming Language

Software

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

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

Axcess Programming Language

i

 

 

 

 

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

 

ii

Axcess Programming Language

 

 

 

 

 

Table of Contents

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

Axcess Programming Language

iii

 

 

 

 

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

 

iv

Axcess Programming Language

 

 

 

 

Table of Contents

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

Axcess Programming Language

v

 

 

 

 

Table of Contents

 

vi

Axcess Programming Language

 

 

 

Introduction

Introduction

The Axcess system is a microprocessor-basedcontrol 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 IBMcompatible 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 selfexplanatory 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 # or device type

Device #

1

2

 

3

4

5

6

 

7

8

 

 

 

 

 

 

 

 

 

 

 

 

1

1

1

0

 

0

0

0

0

 

0

0

 

 

 

 

 

 

 

 

 

 

 

 

2

17

1

0

 

0

0

1

0

 

0

0

 

 

 

 

 

 

 

 

 

 

 

 

3

33

1

0

 

0

0

0

1

 

0

0

 

 

 

 

 

 

 

 

 

 

 

 

4

49

1

0

 

0

0

1

1

 

0

0

 

 

 

 

 

 

 

 

 

 

 

 

5

65

1

0

 

0

0

0

0

 

1

0

 

 

 

 

 

 

 

 

 

 

 

 

6

81

1

0

 

0

0

1

0

 

1

0

 

 

 

 

 

 

 

 

 

 

 

 

Boxes (AXB-XXX)

96

0

0

 

0

0

0

1

 

1

0

 

 

 

 

 

 

 

 

 

 

 

 

AXB-FD

127

1

1

 

1

1

1

1

 

1

0

 

 

 

 

 

 

 

 

 

 

 

 

Panels (AXT-XXXandAXM-XXX)

128

0

0

 

0

0

0

0

 

0

1

 

 

 

 

 

 

 

 

 

 

 

 

Wave system (2-wayRF)

192

0

0

 

0

0

0

0

 

0

1

 

 

 

 

 

 

 

 

 

 

 

 

Axcess Programming Language

1

 

 

 

 

Introduction

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 AXBFD (floppy disk drive) starts at 127 and decreases with eachAXB-FD.When numbering panels, start with RF and IR, then SoftWire panels such as theAXU-MSP8orAXU-SPL4,and then touch panels.Two-wayRF, 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 plasmatype 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-pinPhoenix 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 the9-pinconnector on the Central Controller.

If the Central Controller is in slot MC1, the 9-pinconnector on the back of the CardFrame can be used.

The following table lists solutions to some common communication problems.

Communications Problem Resolutions

Cause

Resolution

 

 

The baud rate of the Axcess Control System is

The Axcess Control System baud rate can be found with the

different than that of the Central Controller.

Configure... option in the Communications menu, and an

 

explanation of setting the Central Controller baud rate is in

 

the AXC-EMEnhanced Master Cardinstruction manual. Set

 

both to the same setting.

 

 

The communications port number of the Axcess

The Axcess Control System com port number can be found

Control System is different than that of the com-

with the Configure... option in the Communications menu.

munications port in which the Central Controller

Make sure it matches the correct Central Controller commu-

cable is plugged.

nications port.

 

 

The communications settings of the Axcess

The Axcess Control System communications settings can be

Control System are different than that of the

found with the Configure... option in the Communications

Central Controller.

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-EMEnhanced Master Cardinstruction manual should

 

help determine the solution.

 

 

 

2

Axcess Programming Language

 

 

 

Introduction

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:

Two blinks per second:

Indicates the system is operating normally.

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 manual.

• 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.

Axcess Programming Language

3

 

 

 

 

Introduction

 

4

Axcess Programming Language