9 Programming: Subprograms and Program Section Repeats
9.5 Nesting
9.5 Nesting
Types of nesting
n
Subprograms within a subprogram
n
Program section repeats within a program section repeat
n
Subprograms repeated
n
Program section repeats within a subprogram
Nesting depth
The nesting depth is the number of successive levels in which
program sections or subprograms can call further program sections or
subprograms.
n
Maximum nesting depth for subprograms: 8
n
Maximum nesting depth for calling main programs: 4
n
You can nest program section repeats as often as desired
Subprogram within a subprogram
Example NC blocks
0 BEGIN PGM SUBPGMS MM
...
17 CALL LBL 1
Calling a subprogram at LBL 1
...
35 L Z+100 R0 FMAX M2
Last program block of the
main program (with M2)
36 LBL 1
Beginning of subprogram 1
...
39 CALL LBL 2
Call the subprogram marked with LBL2
...
45 LBL 0
End of subprogram 1
46 LBL 2
Beginning of subprogram 2
...
62 LBL 0
End of subprogram 2
63 END PGM SUBPGMS 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: ......