beautypg.com

Basic programming guide – Remote Processing BASIC for the CX-10 Modbus User Manual

Page 8

background image

BASIC PROGRAMMING GUIDE

1-5

Each variable may have up to 255 elements (0 to
254). Un-dimensioned arrays default to 11
elements, variable(0) through variable(10). Naming
conventions used for scaler variables apply to arrays.

Strings
Memory is allocated to strings using the STRING
command. There is no power up default. Up to 255
strings, identified as $(0) through $(254) are
available.

To use strings, you must first determine the
maximum length of any one string and then the
maximum number of strings. Using the formula

(bytes/string + 1) * number of strings + 1

returns the number of bytes to allocate.

The ASC and CHR commands are used to evaluate
and manipulate strings. Text assigned to a string is
enclosed in double quotation marks:

100

STRING 1000,40

110 $(0)=">03"