![Danfoss VLT5000 SyncPos Скачать руководство пользователя страница 115](http://html.mh-extra.com/html/danfoss/vlt5000-syncpos/vlt5000-syncpos_operating-instructions-manual_4121908115.webp)
Programmable SyncPos motion controller
MG.10.J8.02 – VLT is a registered Danfoss trade mark
114
Software Reference
■
■
■
■
■
GOSUB
The GOSUB command will call up a subroutine,
and the accompanying program will be carried out.
The main program will be continued following the
completion of the last subroutine command
(RETU R N).
Summary
calls a subroutine
Syntax
GOSUB name
Parameter
name = subroutine name
NB!
The subroutine must be defined at the
beginning or end of a program within the
SUBMAINPROG area.
Command group
CON
Cross Index
SUBMAINPROG…ENDPROG, SUBPROG…RETURN
ON ERROR GOSUB, ON INT n GOSUB
Syntax-Example
GOSUB testup /* Call-up the subroutine testup */
Command line 1
Command line n
SUB MAI N P ROG
/* Subroutine testup must be defined */
SUBPROG testup
Command line 1
Command line n
R ETU R N
E N D P RO G
Program sample
GOSU B_01.M
AXEN D_01.M, I NCL_01.M, STAT_01.M
■
■
■
■
■
GOTO
The GOTO command enables an unconditional
jump to the indicated program position and the
program processing at this position will be carried
out.
The jumped-to position is identified with a label. A
label can consist of one or more characters and
may not be identical to a variable name or a com-
mand word. A label must also be unique, i.e. it
may not be used for different program positions.
It is therefore possible to program a continuous
loop via the GOTO command.
Summary
Jump to a program label
Syntax
GOTO label
Parameter
label = identification of program target position
NB!
The label for the program target position must
be followed by a colon (:).
Command group
CON
Cross Index
LO OP
Syntax-Example
endless:
/* Label to be jumped to */
Command line 1
Command line n
GOTO endless
/* jump command to label endless */
Program sample
G OTO_01.M
EXIT_01.M, IF_01.M