Danfoss VLT5000 SyncPos Operating Instructions Manual page 129

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

Advertisement

■ ■ ■ ■ ■ ON COMBIT .. GOSUB
The instruction ON COMBIT is used to call up a
subprogram when Bit n of the communication buffer
is set.
Summary
Call up a subprogram when Bit n of the
communication buffer is set.
Syntax
ON COMBIT n GOSUB name
Parameter
n =
Bit n of communication buffer
–32 <= n<=32, n!= 0
name =
name of subprogram
NB!
ON COMBIT refers to the first 32 Bits of the
process data memory.
Priority
If a number of interrupts occur simultaneously, the
subprogram assigned to the lowest bit is worked
through first. The other interrupts will be processed
afterwards. If, during an interrupt subroutine, the
same interrupt occurs (exception: error interrupt),
then it will be ignored and thus lost.
Peculiarities
The subroutine to be called up must be defined
within the SUBMAINPROG and ENDPROG identified
program.
NB!
During the execution of an ON COMBIT
subroutine NOWAIT is set to ON.
Portability
In the case of COMOPTGET and COMOPTSEND, the
offset of 2 Word is retained for compatibility reasons.
Command group
INT
Cross Index
SUBPROG...RETURN, COMOPTGET, COMOPTSEND
Syntax-Example
ON COMBIT 5 GOSUB test
// set interrupt on fieldbus bit 5
128
Programmable SyncPos motion controller
■ ■ ■ ■ ■ ON DELETE .. GOSUB
Summary
Deletes a position interrupt ON APOS, ON MAPOS or
ON MCPOS
Syntax
ON DELETE pos GOSUB name
Parameter
pos
= value
name = name of subprogram
Description
The command can be used to delete an ON APOS
interrupt, which is defined as follows:
ON sign APOS xxx GOSUB name
The parameter 'pos' of this command can hold any
value, e.g. 0. It is not checked and has no relevance
for the deletion of the interrupt. The main importance
belongs to the parameter 'name', which has to hold
the name of the subprogram, that was formerly
defined in the ON APOS command. So, the 'ON
DELETE pos GOSUB name' command deletes any
(!) position interrupt, which belongs to the subpro-
gram identified by the given name. Please see
sample 1.
NB!
Only position interrupts are deleted, but no
other type of interrupt.
Re-routing of an ON ... APOS ... GOSUB
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 posi-
tion 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 .
Command group
I NT
MG. 1 0.J8.02 – VLT is a registered Danfoss trade mark

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents