Repeating subprograms -12 – HEIDENHAIN TNC 360 ISO Programming User Manual
Page 135
![background image](https://www.manualsdir.com/files/815326/content/doc135.png)
6
Subprograms and Program Section Repeats
TNC 360
6-12
6.4
Nesting
5
2
2x
3
4
1
.
.
.
.
.
.
.
.
.
Repeating subprograms
Program layout
% UPGREP G71 *
e.g.
N10
G98 L1 *
N11
L2,0 * ................................................... Subprogram call
N12
L1,2 * ................................................... Program section repeat
e.g.
N19
G00 G40 Z+100 M2 * .......................... Last program block of main program with M2
N20
G98 L2 * .............................................. Beginning of subprogram
e.g.
N28
G98 L0 * .............................................. End of subprogram
N9999 % UPGREP G71 * ............................... End of main program
Sequence of program execution
Step 1:
Main program UPGREP is executed to block 11.
Step 2:
Subprogram 2 is called and executed.
Step 3:
Program section between block 12 and block 10 is repeated
twice: subprogram 2 is repeated twice.
Step 4:
Main program UPGREP is executed from block 13 to
block 19. End of program.