
MCO 305 Design Guide
__ Software Reference __
130
MG.33.L4.02 – VLT
®
is a registered Danfoss trademark
ON COMBIT .. GOSUB
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
ON COMBIT refers to the first 32 Bits of the process data memory.
Description
The instruction ON COMBIT is used to call up a subprogram when Bit n of the
communication buffer is set.
NB!:
–
The subroutine to be called up must be defined within the SUBMAINPROG and
ENDPROG identified program.
–
During the execution of an ON COMBIT subroutine NOWAIT is set to ON.
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 after-
wards. If, during an interrupt subroutine, the same interrupt occurs (exception:
error interrupt), then it will be ignored and thus lost.
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, Priorities of Interrupts, NOWAIT
Syntax Example
ON COMBIT 5 GOSUB test
// set interrupt on field bus bit 5
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
subprogram identified by the given name. Please see sample 1.
NB!:
Only position interrupts are deleted, but no other type of interrupt.
Summary of Contents for MCO 305
Page 4: ......