MCO 305 Design Guide
ON PARAM .. GOSUB
Summary
Syntax
Parameter
Description
Priority
Command Group
Cross Index
Syntax Sample
ON PERIOD
Summary
Syntax
Parameter
Description
Command Group
Cross Index
136
__ Software Reference __
Call up a subprogram when a parameter is altered.
ON PARAM n GOSUB name
n =
parameter number
name =
subroutine name
The instruction ON PARAM can be used to respond when parameters are altered via
the LCP display and to call up a subprogram.
All parameters (32-xx, 33-xx) and all application parameters (19-xx) as well as
parameters of general interest (e.g. 8-02, 5-00) can be used.
NB!:
The subroutine to be called up must be defined within the SUBMAINPROG and
ENDPROG identified 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.
If, during an interrupt subroutine, the same interrupt occurs (exception: error
interrupt), then it will be ignored and thus lost.
INT
SUBPROG..RETURN, DISABLE interrupts, ENABLE interrupts, Priorities of Interrupts,
NOWAIT
ON PARAM 32-67 GOSUB poserr
SUBMAINPROG
SUBPROG poserr
PRINT "New position error:
RETURN
Calls up a subroutine at regular intervals.
ON PERIOD n GOSUB name
n > 20 ms
= time in ms, after which the subroutine is called up again
n = 0
= switch off the function
name
= subprogram name
With ON PERIOD it is possible to call up a subprogram at regular intervals (time
triggered). ON PERIOD works like an interrupt. Is checked every 20 ms.
NB!:
–
The precision with which the time is depends on the remaining program.
Typically the precision is 1 ms.
–
The subroutine to be called up must be defined within the SUBMAINPROG and
ENDPROG identified program
–
During the execution of an ON PERIOD subroutine NOWAIT is set to ON.
INT
ON TIME, GOSUB, DISABLE interrupts, ENABLE interrupts, Priorities of Interrupts,
NOWAIT
®
MG.33.L4.02 – VLT
is a registered Danfoss trademark
// when position error is changed
", GET POSERR