beautypg.com

Error messages from basic – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 350

background image

Troubleshooting

Appendix C

C –2

When BASIC is in Run mode the format of the error messages is:

Error:

XXX - IN LINE YYY

YYY BASIC STATEMENT

-------X

Where:

XXX

is the error type. The

X

shows approximately where the error

occurred in the line number. The specific location of the

X

may be off by

one or two characters or expressions depending on the type of error and
where the error occurred in the program. If an error occurs in the
command mode only the error type is printed out, not the line number.

YYY

is the line number of the program in which the error occurred. For

example,

ERROR: BAD SYNTAX - IN LINE 10

10 PRINT 34*21*

--------X

Here are the BASIC module’s error messages:

This error
message:

Occurs when:

A-STACK

the A-stack (argument stack) pointer is forced “out of bounds.” An “out of
bounds” condition occurs if:

you overflow the argument stack by PUSHing too many expressions onto the
stack, or

you attempt to POP data off the stack when no data is present

ARITH.
OVERFLOW

an arithmetic operation exceeds the upper limit of a module floating point number.
The largest floating point number in the BASIC Module is +/-.99999999E+127.

for example: 1E+70*1E+70 causes an ARITH. OVERFLOW error.

ARITH.
UNDERFLOW

an arithmetic operation exceeds the lower limit of a module floating point number.
The smallest floating point number in the BASIC Module is +/-1E-127.

for example: 1E-80/1E+80 causes an ARITH. UNDERFLOW error.

ARRAY SIZE

an array is dimensioned by a DIM statement and you attempt to access a variable
that is outside of the dimensioned bounds

for example:

>DIM A (10)
>PRINT A(11)

ERROR: ARRAY SIZE
READY
>

Error Messages from BASIC