Sending Strings; Array Keywords - AMX AXCESS CONTROL SYSTEM PROGRAM Instruction Manual

Programming language
Table of Contents

Advertisement

Sending Strings

To send a string to the outside world, use the SEND_STRING keyword. The syntax is:
SEND_STRING device,<string, variable, or string expression>
The first value after the SEND_STRING keyword is the device number or identifier to which you
wish to send the string. Following that is a comma, then the string, variable (which can be either a
normal variable or an array), or string expression you wish to send. When an array variable is
specified, the number of transmitted array characters is determined by the array length value. Set
the length value for the array with the SET_LENGTH_STRING function.
For example, if you need to send the TEMP array to a card named RS232, you would write the
following line:
SEND_STRING RS232,"TEMP"
String literals and string expressions can also be sent using SEND_STRING. For example:
SEND_STRING RS232,'THIS IS A STRING LITERAL'
Sends the entire set of characters enclosed in the single quotes, from left to right, to the card
named RS232.
SEND_STRING RS232,"'EXPRESSION ', TEMP,$ØD,$ØA"
This statement first builds the string expression using a string literal, followed by the number
of characters from TEMP (defined by its length value), and then two numbers (expressed here
in hexadecimal). The hexadecimal numbers in the example represent the codes for carriage
return and line feed, respectively.

Array Keywords

Array keywords that you can use in the Axcess program are described in the table below
Array Keywords
FIND_STRING
LEFT_STRING
LENGTH_STRING
Axcess Programming Language
Tells Axcess to search through a string for a specified sequence of characters.
When Axcess finds the sequence, it returns to the beginning position of that
sequence.
Syntax:
result = FIND_STRING (string, sequence of characters,
starting position of search)
Returns a specified number of characters from a specified array starting from
the beginning of the array. If the length of the string is less than the number of
specified characters, LEFT_STRING will return the length of the string array.
This keyword requires that the length value of the array be greater than Ø.
Syntax:
result = LEFT_STRING (string array, number of characters)
Returns the current length value of an array.
This number is different from the storage capacity of an array, which is defined
in the DEFINE_VARIABLE section. See DEFINE_VARIABLE on page 11.
The length value of an array is used by several of the Axcess string operation
keywords; this value can change during program execution.
Syntax:
result = LENGTH_STRING (string array)
Arrays and Strings
39

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