223
Error Handling
Section 8-2
If the alarm is canceled while the Servo ON signal (WDOG) is still ON, the
Servo Driver will start as soon as the alarm is cleared, which is dangerous. Be
sure to turn OFF the WDOG system parameter before cancelling the alarm.
■
Servo Driver Warning
If the Servo Driver detects a warning (e.g., overload warning or regenerative
overload warning), MC Unit Warning input no. 25 will be set and the code is
defined in the DRV_STATUS parameter. The Servo Driver will not be dis-
abled and operation will continue.
■
Servo Driver Communication Error
When during start-up or operation the MC Unit detects an error in the commu-
nication interface to the Servo Driver, the AXISSTATUS bit 2 is set and a
motion error is generated (if ERRORMASK bit 2 is set).
When the interface to the Servo Driver is lost, the following data and opera-
tions are invalid and therefore should not be used:
• Servo Driver analog monitor signals (AIN0, AIN1, AIN2 and AIN3)
• Servo Driver digital inputs (inputs 16 to 31)
• Commands DRV_READ and DRV_WRITE (will give BASIC error)
• Commands DRV_RESET and DRV_CLEAR
Although the MC Unit will attempt to re-establish the communication after
detecting the error during operation, it is strongly advisable to put the system
in a fail-safe halt.
When the communication is re-established, the user has the possibility to exe-
cute the DRV_RESET or DRV_CLEAR command to clear the error. However,
if the communication is still down, this will hang the program task.
Run-time BASIC Errors
Run-time BASIC errors will stop the program or will go into the error routine as
defined by BASICERROR. The following parameters are relevant when
checking a run-time error.
The table below shows a list of the different types of BASIC run-time errors
which are detected.
Parameter
Description
BASICERROR
The BASICERROR command traps the error and allows the
control of the program to go to an error handling routine
ERROR_LINE
The ERROR_LINE parameter which shows which line in the
program has encountered the error.
RUN_ERROR
The RUN_ERROR shows the identity number of the actual
error.
Error No.
Message Displayed
Error No.
Message Displayed
1
Command not recognized
42
UNTIL without previous REPEAT
2
Invalid transfer type
43
Variable expected
3
Error programming Flash
44
TO expected after FOR
4
Operand expected
45
Too many nested FOR/NEXT
5
Assignment expected
46
NEXT without FOR
6
QUOTES expected
47
UNTIL/IDLE expected after WAIT
7
Stack overflow
48
GOTO/GOSUB expected
8
Too many named variables
49
Too many nested GOSUB
9
Divide by zero
50
RETURN without GOSUB
10
Extra characters at end of line
51
LABEL must be at start of line
11
] expected in PRINT
52
Cannot nest one line IF commands
12
Cannot modify a special program
53
Label not found
13
THEN expected in IF/ELSEIF
54
LINE NUMBER cannot have decimal point