Variables, Variables -4, Backplane conversion data – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual
Page 20

Publication 1746-RM001A-US-P
2-4 Data Types
Backplane Conversion Data
The module communicates with the local processor through the SLC 500 I/O
backplane. All data communicated to and from the SLC 500 is in SLC 500 format.
The SLC 500 formats are:
•
16-bit signed integer (–32768 to 32767)
•
16-bit binary (0000000000000000 to 1111111111111111)
Variables
Variables that include a single-dimension expression [exp] are dimensioned or
arrayed variables. Variables that contain a letter or a letter and a number are scalar
variables. Any variables entered in lower case are changed to upper case. Variables
are shown as:
[var]
The module allocates variables in a static manner, which means the first time a
variable is used, the module allocates a portion of memory (8 bytes) specifically for
that variable. This memory cannot be de-allocated on a variable to variable basis.
This means that if you execute a statement (example: >10 Q - 3), you cannot tell
the module that the variable Q no longer exists to free up the 8 bytes of memory
that belong to Q. You can clear the memory allocated to variables by executing a
CLEAR statement. The CLEAR statement frees all memory allocated to variables.
Variables may be set aside for reuse to save memory.
IMPORTANT
Any integer larger than 32767 is interpreted as a negative number
by the SLC 500 processor
IMPORTANT
The module requires less time to find a scalar variable because
there is no expression to evaluate. To run a program as fast as
possible, use single-dimension variables only when necessary. Use
scalar variables for intermediate variables and assign the final
result to a dimensioned variable. Also, put the most frequently
used variables first. Variables defined first require the least
amount of time to locate.