Rockwell Automation 1771-DB BASIC MODULE User Manual
Page 351

Troubleshooting
Appendix C
C –3
Occurs when:
This error
message:
BAD ARGUMENT
the argument of an operator is not within the limits of the operator
for example:
SQR(-12) generates a BAD ARGUMENT error because the value of the SQR
argument is limited to positive numbers
BAD SYNTAX
an invalid BASIC module command, statement or operator is entered and BASIC
cannot process the entry
C-STACK
•
the C-stack (control stack) pointer is forced “out of bounds”
•
you attempt to use more control stack than is available in the module
•
you execute a RETURN before a GOSUB, a WHILE or UNTIL before a DO, or
a NEXT before a FOR (See Chapter 11 for a description of these statements.)
•
you jump out of loop structures such as DO WHILE
CAN’T CONTINUE
•
you edit the program after halting execution and then enter the CONT
command
•
you enter
while in a call routine
you can halt program execution by either entering
or by
executing a STOP statement. Normally, program execution continues after
entering the CONT command. You must enter
during program
execution or you must execute a STOP statement before the CONT command
can work.
Ctrl
+
C
Ctrl
+
C
Ctrl
+
C
DIVIDE BY ZERO
you attempt to divide by zero
EXTRA IGNORED
an INPUT statement (page 11 -17) requiring numeric data, receives numeric data
followed by letters. Letters are ignored. Error also occurs from CALL 61 (page
12 -60).
MEMORY
ALLOCATION
•
user memory (RAM) is full
•
BASIC cannot determine memory bounds because the system control value
MTOP is altered
•
RAM contains an incomplete program file
•
you attempt to access STRINGS that are “outside” the defined string limits
NO DATA
a READ statement is executed and no DATA statement exists or all DATA was
read and a RESTORE instruction was not executed. (See Chapter 11 for a
description of these statements.)
the message ERROR: NO DATA - IN LINE XXX is printed to the console device.
PROGRAMMING
the BASIC module is programming an EEPROM. An error during programming
destroys the EPROM file structure. You cannot save any more programs on that
particular EEPROM once a PROGRAMMING error occurs. If the EEPROM size is
exceeded, the previously stored program may be partially altered.
Application errors such as divide by zero error, syntax error, receipt of a
Ctrl
+
C
(page 10 -4), and execution of STOP (page 11 -36) or END
(page 11 -10) statements cause the BASIC module to return to the
Command mode from Run mode. Use CALL 38 (EXPANDED ONERR)
(page 12 -36) to jump to an interrupt routine instead of returning to the
Command mode.