
MCO 305 Design Guide
__ Software Reference __
MG.33.L4.02 – VLT
®
is a registered Danfoss trademark
137
ON STATBIT .. GOSUB
Summary
Call up a subprogram when bit n of the FC 300 status is set.
Syntax
ON STATBIT n GOSUB name
Parameter
n =
Bit n of the status word
Byte 1
Status byte of the FC 300
Bit 1,2,4-7
no meaning
Bit 3
1 = moving finished
Bit 8
1 = FC 300 switched off
Byte
2
Bit 9
1 = MOVING
Bit 10
1 = Overflow Slave Encoder
Bit 11
1 = Overflow Master Encoder
Bit 12
1 = POSFLOAT active *)
Byte 3
not used
Byte
4
SYNCSTAT
Bit 25
1 = SYNCREADY
Bit 26
1 = SYNCFAULT
Bit 27
1 = SYNCACCURACY
Bit 28
1 = SYNCMMHIT
Bit 29
1 = SYNCSMHIT
Bit 30
1 = SYNCMMERR
Bit 31
1 = SYNCSMERR
name = subroutine name
*) Explanation: i.e. the axis is within the tolerance range of the control window par.
32-71 REGWMAX / par. 32-72 REGWMIN. As soon as the control window is set, the
axis controller is switched on again.
Description
The instruction ON STATBIT is used to call up a subprogram when bit n of FC 300
status is set. These 32 bits of the FC 300 status consist of the FC 300 status word,
the byte 2 of the internal status (e.g. MOVING) and the bit n of SYNCSTAT.
NB!:
–
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.
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.
Command Group
INT
Cross Index
SUBPROG ..RETURN, DISABLE interrupts, ENABLE interrupts, Priorities of
Interrupts
Syntax Example
ON STATBIT 30 GOSUB markererror
/* Interrupt, if error flag Master */
SUBMAINPROG
SUBPROG
markererror
SYNCSTATCLR 32
/* clear error flag SYNCMMERR */
/* use value 32 of Parameter SYNCSTATCLR, not the bit-number! */
RETURN
ENDPROG
Summary of Contents for MCO 305
Page 4: ......