Repeating a subprogram, 5 nesting – HEIDENHAIN TNC 426 (280 476) User Manual
Page 375

348
9 Programming: Subprograms and Program Section Repeats
9.5 Nesting
Repeating a subprogram
Example NC blocks
Program execution
1
Main program SUBREP is executed up to block 11.
2
Subprogram 2 is called and executed.
3
Program section between block 12 and block 10 is repeated twice.
This means that subprogram 2 is repeated twice.
4
Main program UPGREP is executed from block 13 to block 19. End
of program.
0 BEGIN PGM SUBREP MM
...
10 LBL 1
Beginning of program section repeat 1
11 CALL LBL 2
Subprogram call
12 CALL LBL 1 REP 2/2
The program section between this block and LBL1
...
(block 10) is repeated twice
19 L Z+100 R0 FMAX M2
Last block of the main program with M2
20 LBL 2
Beginning of subprogram
...
28 LBL 0
End of subprogram
29 END PGM SUBREP MM
This manual is related to the following products: