I I I I I ON PARAM .. GOSUB
The instruction ON PARAM can be used to
respond when parameters are altered via the VLT
display and to call up a subprogram.
Summary
Call up a subprogram when a parameter is altered.
Syntax
ON PARAM n GOSUB name
Parameter
n =
701 ... 779
name = subroutine name
Priority
If, during an interrupt subroutine, the same inter-
rupt 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 identi-
fied program.
A maximum of 10 ON PARAM functions are
possible.
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-Sample
LINKAXPAR POSERR 712 „position error" 300
5000 0
ON PARAM 712 GOSUB poserr
// when position error is changed
SUBMAINPROG
SUBPROG poserr
PRINT „New position error:
RETURN
MG.10.J4.02 – VLT is a registered Danfoss trade mark
VLT
I I I I I ON PERIOD
With ON PERIOD it is possible to call up a sub-
program at regular intervals (time triggered). ON
PERIOD works like an interrupt.
Summary
calls up a subroutine at regular intervals
Syntax
ON PERIOD n GOSUB name
Parameter
n > 100 ms = time in ms, after which the
n = 0
Typically the precision is ±1 ms.
Peculiarities
The subroutine to be called up must be defined
within the SUBMAINPROG and ENDPROG
identified program.
Command group
INT
Cross Index
ON TIME, GOSUB
„, GET POSERR
®
5000 SyncPos option
subroutine is called up again
= switch off the function
NB!
The precision with which the time is kept
depends on the remaining program.
NB!
During the execution of an ON PERIOD
subroutine NOWAIT is set to ON.
97
Need help?
Do you have a question about the VLT 5000 Series and is the answer not in the manual?