
MCO 305 Design Guide
__ Software Reference __
MG.33.L4.02 – VLT
®
is a registered Danfoss trademark
129
ON APOS .. GOSUB
Summary
Call up a subprogram when the slave position xxx is passed.
Syntax
ON sign APOS xxx GOSUB name
Parameter
sign =
+ = when the slave position xxx is passed in positive direction
– = when the slave position xxx is passed in negative direction
xxx =
slave position in UU
name =
name of the subprogram
100
xxx
0
<
positive direction
!
negative direction
Description
It is possible to call up a subprogram with the instruction ON APOS, if a specific
slave position (UU) has been passed in positive or negative direction. The instruct-
tion can be useful for positioning and synchronization controls, as well as for CAM
controls and CAM boxes. For example, in order to replace the increasing slave
position in the case of open curves after each cycle by a recurring reference point.
NB!:
– An ON APOS 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 subprograms triggered by an interrupt, NOWAIT ON is
set automatically.
Command Group
INT
Cross Index
SUBPROG .. RETURN, DISABLE, ENABLE …, Priorities of Interrupts, ON DELETE ..
GOSUB, NOWAIT
Syntax Example
ON –APOS 800 GOSUB name
// Call up the subroutine name when slave position 800
// is passed in negative direction
Sample
CSTART
ON +APOS 2000 GOSUB STOP
SUBMAINPROG
SUBPROG
STOP
CSTOP
RETURN
ENDPROG
Initial
0
175MD515
After Positioning
0
175MD516
As per the program above the drive stops once it reached the position 2000.
Summary of Contents for MCO 305
Page 4: ......