EasyManua.ls Logo

HEIDENHAIN TNC 370 - 6.1 Subprograms

HEIDENHAIN TNC 370
333 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
Loading...
6
Subprograms and Program Section Repeats
4
6 Subprograms and Program Section Repeats
Subprograms and program section repeats enable you to program a
machining sequence once and then run it as often as you wish.
Labels
Subprograms and program section repeats are marked by labels.
A label carries a number from 0 to 254. Each label number (except 0) can
only appear once in a program. Labels are assigned with the command
LABEL SET.
LABEL 0 marks the end of a subprogram.
The soft keys for defining subprograms and program section repeats are
located in the fourth soft key row.
6.1 Subprograms
Principle
The program is executed up to the block in which
the subprogram is called with CALL LBL (0).
Then the subprogram is executed from beginning to
end (LBL 0) (@I.
Finally, the main program is resumed from the
block after the subprogram call (0).
0 BEGIN PGM
I
1
9
. CALLLBL 1
0
3
0
03
LZ+lOO M2
LBL 1
. LBLO
,. ,,
END PGM
Fig. 6.1: Flow
diagram for a subprogram
@= jump, @= return jump
Operating limits
l
One main program can contain to 254 subpro-
grams.
l
Subprograms can be called in any sequence and
as often as desired.
l
A subprogram cannot call itself.
l
Subprograms should be located at the end of the
main program (after the block with M2 or M30).
l
If subprograms are located in the program before
the block with MO2 or M30, they will be execut-
ed at least once even without being called.
6-2
TNC 370

Table of Contents

Related product manuals