Repeating a subprogram, 4 nesting – HEIDENHAIN TNC 310 (286 140) User Manual
Page 165

153
HEIDENHAIN TNC 310
9.4 Nesting
Repeating a subprogram
Example NC blocks
0 BEGIN PGM 17 MM
...
10 LBL 1
11 CALL LBL 2
12 CALL LBL 1 REP 2/2
...
19 L Z+100 R0 FMAX M2
20 LBL 2
...
28 LBL 0
29 END PGM 17 MM
Program execution
1st step:
Main program 17 is executed up to block 11.
2nd step: Subprogram 2 is called and executed.
3rd step:
Program section between block 12 and block 10 is
repeated twice. This means that subprogram 2 is
repeated twice.
4th step:
Main program 17 is executed from block 13 to block
19. End of program.
Beginning of the program section repeat
Subprogram call
The program section between this block and LBL1
(block 10) is repeated twice
Last program block of the main program with M2
Beginning of subprogram
End of subprogram
This manual is related to the following products: