Download Print this page

Danfoss MCO 305 Design Manual page 135

Hide thumbs Also See for MCO 305:

Advertisement

MCO 305 Design Guide
ON MCPOS .. GOSUB
Summary
Syntax
Parameter
Description
Command Group
Cross Index
Syntax Example
Syntax Example
__ Software Reference __
Call up a subprogram when the master position xxx (MU) is passed.
ON sign MCPOS xxx GOSUB name
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
<
positive direction
negative direction
It is possible to call up a subprogram with the instruction ON MCPOS which is
typical for CAM controls 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 depending on the position.
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.
An ON MCPOS Interrupt can be deleted with the command ON DELETE ..
GOSUB ...
The subroutine to be called up must be defined within the SUBMAINPROG and
ENDPROG identified program.
During the execution of a subroutine called by an interrupt NOWAIT is
automatically set to ON.
INT
SUBPROG .. RETURN, DISABLE ..., ENABLE ..., Priorities of Interrupts, ON DELETE ..
GOSUB, NOWAIT
ON +MCPOS 1200 GOSUB parameter
// Always call up subprogram at position 1200
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 subprogram output always on position 4500
SUBMAINPROG
SUBPROG output
OUT 3 1
RETURN
ENDPROG
®
MG.33.L4.02 – VLT
is a registered Danfoss trademark
0
// set subprogram output
// 03 on
135

Advertisement

loading