Danfoss VLT5000 SyncPos Operating Instructions Manual page 133

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

Advertisement

■ ■ ■ ■ ■ ON MCPOS .. GOSUB
It is possible to call up a subprogram with the
instruction ON MCPOS which is typical for cam con-
trols if a specific master position (MU) has been
passed in positive or negative direction. This allows
not only the realization of cam boxes, but also the
execution of tasks that are much more complex. For
example, one could change parameters online de-
pending on the position.
Summary
Call up a subprogram when the master position xxx
(MU) is passed.
Syntax
ON sign MCPOS 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
NB!
A DEFMCPOS or a SETCURVE must always
be placed in front of the command ON
MCPOS .. GOSUB, since otherwise the curve position
is not known.
NB!
An ON MCPOS Interrupt can be deleted with
the command ON DELETE .. GOSUB ...
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
INT
132
Programmable SyncPos motion controller
Cross index
SUBPROG...RETURN, DISABLE ENABLE, Priorities
of interrupts, ON DELETE... GOSUB
Syntax Example
Cardboard boxes are transported irregularly on a
conveyor belt. By setting an output, the slave will
always be started when the position xxx is reached.
ON +MCPOS 4500 GOSUB output
// call subprogramm output
// always on position 4500
SUBMAINPROG
// set subprogram output
SUBPROG output
OUT 3 1
// 03 on
RETURN
ENDPROG
ON +MCPOS 4500 GOSUB output
// call subprogramm output
// always on position 4500
MG. 1 0.J8.02 – VLT is a registered Danfoss trade mark

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents