Danfoss VLT 5000 Series Manual page 95

Synchronizing and positioning option onizing and positioning option
Hide thumbs Also See for VLT 5000 Series:
Table of Contents

Advertisement

I I I I I ON ERROR GOSUB
By using the ERROR GOSUB instruction, a
subroutine will be defined, which can be called up
in case of error. If an error occurs after the
definition, then an automatic program abort will not
take place – instead, the defined subroutine will
be called up.
Within this subroutine, it is possible to target the
re-action to the error, to wait for user intervention
via ERRCLR (clear error) or, in the case of non-
correctable errors, to abort the program via the
EXIT instruction.
If the program is not aborted, then the processing
will continue from the point where the interruption
occurred.
By using the CONTINUE command, it is possible
to continue the error-interrupted motion. (Excep-
tion: synchronization commands)
Summary
Definition of an error subroutine
Syntax
ON ERROR GOSUB name
Parameter
name = name of the subroutine
Priority
Error subroutines cannot be interrupted through
any other interrupts.
Peculiarities
The ON ERROR GOSUB instruction should be at
the start of a program, so that it has validity for the
entire program.
The subroutine to be called up must be defined
within the identified SUBMAINPROG and
ENDPROG program.
The identification of an error condition and the call
up of the corresponding subroutine requires a
maximum of 2 milliseconds.
NB!
During the execution of an error routine
NOWAIT is automatically set to ON.
If the error subroutine is exited with the error still
active because e.g. ERRCLR was not carried out
or another error has occurred, then a new call
takes place.
MG.10.J4.02 – VLT is a registered Danfoss trade mark
®
VLT
5000 SyncPos option
NB!
The ON ERROR GOSUB xx routine does
not terminate the HOME and INDEX
command. This means they will be executed after
the error has been cleared. To prevent this an ON
TIME 1 can be included in the error routine.
Command group
INT
Cross Index
SUBPROG...RETURN, ERRCLR, ERRNO,
CONTINUE, EXIT
Syntax-Example
ON ERROR GOSUB errhandle
/* definition of an error subroutine */
command line 1
command line n
SUBMAINPROG
/* subroutine errhandle must be defined */
SUBPROG errhandle
command line 1
command line n
RETURN
ENDPROG
Program sample
ERROR_01.M
IF_01.M, INDEX_01.M
95

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents