3 program section repeats – HEIDENHAIN TNC 310 (286 140) User Manual
Page 161
149
HEIDENHAIN TNC 310
9.3 Program Section Repeats
Programming a subprogram
ú
To mark the beginning, press the LBL SET key and
enter a label number.
ú
Enter the subprogram.
ú
To mark the end, press the LBL SET key and enter
the label number “0”.
Calling a subprogram
ú
To call a subprogram, press the LBL CALL key.
ú
Label number: Enter the label number of the
program you wish to call.
ú
Repeat REP: Ignore the dialog question with the
NO ENT key. Repeat REP is used only for program
section repeats.
CALL LBL 0 is not permitted (label 0 is only used to mark
the end of a subprogram).
9.3 Program Section Repeats
The beginning of a program section repeat is marked by the label
LBL. The end of a program section repeat is identified by
CALL LBL /REP.
Operating sequence
1 The TNC executes the part program up to the end of the labeled
program section, i.e. to the block with CALL LBL /REP.
2 Then the program section between the called LBL and the label
call is repeated the number of times entered after REP.
3 The TNC then resumes the part program after the last repetition.
Programming notes
■
You can repeat a program section up to 65 534 times in
succession.
■
The number behind the slash after REP indicates the number of
repetitions remaining to be run.
■
The total number of times the program section is executed is
always one more than the programmed number of repeats.
0 BEGIN PGM ...
LBL1
CALL LBL1 REP 2/2
END PGM ...