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
Summary of Contents for TNC 426
Page 3: ......
Page 4: ......
Page 8: ...IV...
Page 10: ...VI...
Page 26: ......
Page 27: ...1 Introduction...
Page 41: ...2 Manual Operation and Setup...
Page 54: ......
Page 55: ...3 Positioning with Manual Data Input MDI...
Page 59: ...4 Programming Fundamentals of NC File Management Programming Aids Pallet Management...
Page 122: ......
Page 123: ...5 Programming Tools...
Page 153: ...6 Programming Programming Contours...
Page 201: ...7 Programming Miscellaneous functions...
Page 226: ......
Page 227: ...8 Programming Cycles...
Page 366: ......
Page 367: ...9 Programming Subprograms and Program Section Repeats...
Page 381: ...10 Programming Q Parameters...
Page 424: ......
Page 425: ...11 Test run and Program Run...
Page 443: ...12 MOD Functions...
Page 472: ......
Page 473: ...13 Tables and Overviews...
Page 496: ......