Danfoss VLT5000 SyncPos Operating Instructions Manual page 115

Motion controller for danfoss vlt5000 series; danfoss vlt 5000flux series
Table of Contents

Advertisement

■ ■ ■ ■ ■ 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 NPROG
/* Subroutine testup must be defined */
SUBPROG testup
Command line 1
Command line n
R ETU R N
ENDPRO G
Program sample
GOSU B_01.M
AXEND_01.M, I NCL_01.M, STAT_01.M
114
Programmable SyncPos motion controller
■ ■ ■ ■ ■ 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
MG. 1 0.J8.02 – VLT is a registered Danfoss trade mark

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents