Repeating a subprogram, 5 nestin g – HEIDENHAIN TNC 410 ISO Programming User Manual
Page 348

322
9 Programming: Subprograms and Program Section Repeats
9.5 Nestin
g
Repeating a subprogram
Example NC blocks
Program execution
1
Main program UPGREP is executed up to block N110.
2
Subprogram 2 is called and executed.
3
Program section between block N120 and block N100 is repeated
twice. Subprogram 2 is repeated twice.
4
Main program SUBPGREP is executed once from block N130 to
block N190. End of program.
%SUBPGREP G71 *
...
N100 G98 L1 *
Beginning of program section repeat 1
N110 L2.0 *
Subprogram call
N120 L1.2 *
The program section between this block and G98 L1
...
(block N100) is repeated twice.
N190 G00 G40 Z+100 M2 *
Last block of the main program with M2
N200 G98 L2 *
Beginning of subprogram
...
N280 G98 L0 *
End of subprogram
N999999 %SUBPGREP G71 *