Danfoss VLT 5000 Series Manual page 98

Synchronizing and positioning option onizing and positioning option
Hide thumbs Also See for VLT 5000 Series:
Table of Contents

Advertisement

I I I I I ON STATBIT .. GOSUB
The instruction ON STATBIT is used to call up a
subprogram when bit n of the VLT status is set.
These 32 bits of the VLT status consist of the VLT
status word, the byte 2 of the internal status (e.g.
MOVING) and the bit n of SYNCSTAT.
Summary
Call up a subprogram when bit n of the VLT status
is set.
Syntax
ON STATBIT n GOSUB name
Parameter
n =
Bit n of the VLT status
Bit 1...16
Bit 17...24
status:
Bit 17 = MOVING
Bit 18 = Overflow Slave Encoder
Bit 19 = Overflow Master Encoder
Bit 20 = POSFLOAT active *)
Bit 25...32
Bit 25 = SYNCREADY
Bit 26 = SYNCFAULT
Bit 27 = SYNCACCURACY
Bit 28 = SYNCMMHIT
Bit 29 = SYNCSMHIT
Bit 30 = SYNCMMERR
Bit 31 = SYNCSMERR
name =
subroutine name
*) Explanation: i.e. the axis is within the tolerance
range of the control window REGWINMAX /
REGWINMIN. As soon as the control window is
set, the axis controller is switched on again.
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.
98
VLT status word
Byte 2 of the internal
SYNCSTAT
VLT
®
5000 SyncPos option
NB!
During the execution of a subroutine called
by an interrupt NOWAIT is automatically set
to ON.
Command group
INT
Cross Index
SUBPROG...RETURN
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
MG.10.J4.02 – VLT is a registered Danfoss trade mark

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents