Danfoss VLT5000 SyncPos Operating Instructions Manual page 131

Motion controller for danfoss vlt5000 series; danfoss vlt 5000flux series
Table of Contents

Advertisement

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
130
Programmable SyncPos motion controller
■ ■ ■ ■ ■ ON INT .. GOSUB
By using the ON INT GOSUB instruction, a subrou-
tine must be defined which will be called up when
an edge is detected at the monitored input.
A maximum of one subroutine per input can be
defined. It is not possible to define an interrupt for
the falling and the rising edges of the same input
This definition can take place at any time. If, follo-
wing this definition, a corresponding interrupt occurs,
then the accompanying subroutine is called up and
processed. After the last subroutine command
(RETURN), the program will continue from the point
of interrupt.
Summary
Defining an interrupt input
Syntax
ON INT n GOSUB name
Parameter
n
= number of the input to be monitored;
(input area –8 ... 8
and VLT inputs 16 ... 33 and –33 ...–16)
positive input numbers (1 ... 8) =
reaction to the rising edge
negative input numbers (–1 ... 8) =
reaction to the falling edge
name
= subroutine name
Priority
If a number of interrupts occur simultaneously, the
subprogram assigned to the lowest bit is worked
through first. The other interrupts will be processed
afterwards. If, during an interrupt subroutine, the
same interrupt occurs (exception: error interrupt),
then it will be ignored and thus lost.
Peculiarities
The ON INT GOSUB instruction should be at the
start of the program, so that it has validity for the
entire program.
The subroutine to be called up must be defined
within the SUBMAINPROG and ENDPROG identified
program.
The identification of an interrupt and the call up of
the corresponding subroutine requires a maximum
of 2 milliseconds. Interrupt from VLT input add addi-
tional 2 ms, in worst case.
A minimal signal length of 1 msec is necessary for
the sure identification of a level change! The chapter
input/output terminal contain more information con-
cerning the input circuit and input technical data.
MG. 1 0.J8.02 – VLT is a registered Danfoss trade mark

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents