■ ■ ■ ■ ■ 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
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.
NB!
During the execution of a subroutine called
by an interrupt NOWAIT is automatically
set to ON.
134
VLT status word
Byte 2 of the internal status:
SYNCSTAT
Programmable SyncPos motion controller
Command group
I NT
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. 1 0.J8.02 – VLT is a registered Danfoss trade mark
Need help?
Do you have a question about the VLT5000 SyncPos and is the answer not in the manual?
Questions and answers