EasyManuals Logo

Danfoss VLT 5000 Series Manual

Danfoss VLT 5000 Series
176 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #109 background imageLoading...
Page #109 background image
109
MG.10.J4.02 – VLT is a registered Danfoss trade mark
VLT
®
5000 SyncPos option
Software Reference
SUBMAINPROG .. ENDPROG
The code word SUBMAINPROG begins the sub-
routine section, and the code word ENDPROG
ends this specific program. The term subroutine
means command sequences that, via the GOSUB
instructions, can be called up and executed from
various program positions.
All necessary subroutines must be contained within
the subroutine section. It is possible to insert a
subroutine anywhere within a main program; how-
ever, for reasons of clarity, it is advisable to insert it
either at the beginning or end of a program.
Summary
Subroutine section definition
Syntax
SUBMAINPROG
ENDPROG
NB!
Only one subroutine area may be inserted
within a program.
Command group
CON
Cross Index
SUBPROG …RETURN,
GOSUB, ON ERROR GOSUB, ON INT n GOSUB
Syntax-Example
SUBMAINPROG
/* Begin the subroutine section */
subroutine 1
subroutine n
ENDPROG /* End the subroutine section */
Program sample
GOSUB_01.M
AXEND_01.M, ERROR_01.M, INCL_01.M,
STAT_01.M
SUBPROG name .. RETURN
The instruction SUBPROG identifies the beginning
of a subroutine. The name of the subroutine must
directly follow SUBPROG code word. The name
can be made up of one or more characters, and
must be unique, i.e. only one subroutine may have
that name.
A subroutine can be called up and executed at
any time by use of the GOSUB instruction.
A subroutine can have any number of command
lines and can refer to all program variables. The
last command in each subroutine must be the
RETURN instruction, which permits exiting the
subroutine and continuing the program with the
command following the GOSUB instruction.
Summary
Subroutine definition
Syntax
SUBPROG name
RETURN
Parameter
name = subroutine name
NB!
All subroutines must be contained within the
SUBMAINPROG and ENDPROG defined
areas. It is not admissible to declare a second
subroutine within an existing subroutine.
Command group
CON
Cross Index
SUBMAINPROG … ENDPROG,
GOSUB, ON ERROR GOSUB, ON INT n GOSUB
Syntax-Example
SUBMAINPROG /* begin SP-section */
SUBPROG sp1 /* begin sp1 */
command line 1
command line n
RETURN /* end sp1 */
ENDPROG /* end SP-section */
Program sample
GOSUB_01.M, AXEND_01.M, ERROR_01.M,
IF_01.M, STAT_01.M

Table of Contents

Other manuals for Danfoss VLT 5000 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Danfoss VLT 5000 Series and is the answer not in the manual?

Danfoss VLT 5000 Series Specifications

General IconGeneral
Frequency50/60 Hz
Cooling MethodForced Air Cooling
EnclosureIP20
Protection FeaturesOvercurrent, Overvoltage, Undervoltage, Overtemperature, Short Circuit
Communication InterfacesRS-485, Profibus
Enclosure RatingIP20

Related product manuals