Danfoss VLT5000 SyncPos Operating Instructions Manual page 132

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

Advertisement

NB!
The instruction for ON INT GOSUB is edge
and not level triggered.
NB!
During the execution of a subroutine called
by an interrupt NOWAIT is automatically
set to ON.
Command group
INT
Cross Index
SUBPROG...R ETURN, ON ERROR GOSUB,
WAITI
Syntax-Example
ON INT 4 GOSUB posin
/* Definition of Input 4 (positive edge) */
ON INT -5 GOSUB negin
/* Definition of input 5 (negative edge) */
command line 1
command line n
subroutine must be defined
SUB MAI NPROG
SUBPROG posin
command line 1
command line n
RETURN
SUBPROG negin
command line 1
command line n
RETURN
ENDPROG
Program sample
ONINT_01.M
DELAY_01.M, GSVEL_01.M
MG.10.J8.02 – VLT is a registered Danfoss trade mark
Programmable SyncPos motion controller
■ ■ ■ ■ ■ ON MAPOS .. GOSUB
It is possible to call up a subprogram with the in-
struction ON MAPOS, if a specific master position
(MU) has been passed in positive or negative direc-
tion. For example, in order to set an output at any
point in the case of a linear drive (slave) with a
traversing range from 0 to 10000 UU.
NB!
An ON MAPOS Interrupt can be deleted with
the command ON DELETE .. GOSUB ...
Summary
Call up a subprogram when the master position xxx
(MU) is passed.
Syntax
ON sign MAPOS xxx GOSUB name
Parameter
sign =
+
when the master position xxx is
passed in positive direction
when the master position xxx is
passed in negative direction
xxx =
master position in MU
name =
name of the subprogram
100
xxx
0
<- - - - - -
- - - - - -
- - - - - -
- - - - - - positive direction
- - - - - -
- - - - - - >
- - - - - - > negative direction
- - - - - - >
- - - - - - >
- - - - - - >
Peculiarities
The subroutine to be called up must be defined
within the SUBMAINPROG and ENDPROG identified
program.
NB!
During the execution of subprograms
triggered by an interrupt, NOWAIT ON is set
automatically.
Command group
I NT
Cross index
SUBPROG...RETURN, DISABLE ENABLE, Priorities
of interrupts, ON DELETE .. GOSUB
Syntax Example
ON +MAPOS 1200 GOSUB name
// Always call up subprogram at position 1200
131

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents