Download Print this page

Danfoss MCO 305 Design Manual page 131

Hide thumbs Also See for MCO 305:

Advertisement

MCO 305 Design Guide
Re-routing of an
ON ... APOS ...
GOSUB
Command Group
Cross Index
Syntax Example 1
Syntax Example 2
__ Software Reference __
It is possible to 're-route' a position interrupt to another subprogram. This does not
define a new interrupt, but just modifies the subprogram, which has to be
executed in case of interrupt detection.
The command syntax is the same like for the ON APOS command:
ON sign APOS xxx GOSUB newname
The parameters 'sign' and 'xxx' have to be exactly the same like within the original
definition. The position which is concerned is identified by these two parameters.
The parameter 'newname' has to hold the updated name of the subprogram, which
has to be called up in case of the interrupt, takes place. Please see sample 2.
NB!:
Only position interrupts can be re-routed, but no other type of interrupt .
INT
ON APOS .., ON MAPOS .., ON MCPOS .., ON INT ..
ON – APOS 20000
ON – APOS 10000
ON + APOS 10000
ON + APOS 0
ON – APOS 0
ON INT 3
...
ON DELETE 0 GOSUB hitinfo
...
ON + APOS 99999 GOSUB hitinfo
Result:
All the position interrupts (#1, #2, #3) belonging to the subprog hitinfo are
deleted as soon as 'ON DELETE 0 GOSUB hitinfo' is executed. These interrupts
don't count anymore for the maximum number of available interrupts and can not
be enabled or disabled anymore. All other non-position interrupts, even the ones
belonging to the same subprogram (e.g. ON INT 3) are still valid!
As soon as the command line 'ON + APOS 99999 GOSUB hitinfo' is executed, this
defines a new position interrupt, which is "linked" to the given subprogram (that
has been already in use before).
ON – APOS 10000 GOSUB hitinfo
ON + APOS 10000 GOSUB hitinfo
...
ON + APOS 10000 GOSUB hitposdir
Result:
As soon as the second definition of the 'ON + APOS 10000 ...' is executed, the
interrupt #2 is "re-routed" to the newly defined subprogram 'hitposdir'. It is still
the same interrupt (i.e. not an additional one), which calls up another subprogram
now. The "old" definition of interrupt #1 'ON – APOS 10000 GOSUB hitinfo' is still
valid without any modification.
®
MG.33.L4.02 – VLT
is a registered Danfoss trademark
GOSUB hitinfo
// Interrupt #1
GOSUB hitinfo
// Interrupt #2
GOSUB hitinfo
// Interrupt #3
GOSUB hitzero
// Interrupt #4
GOSUB hitzero
// Interrupt #5
GOSUB hitinfo
// Interrupt #6
// New defined position interrupt
// Interrupt #1
// Interrupt #2
// Re-routed interrupt #2
131

Advertisement

loading