5 nesting, Types of nesting, Nesting depth – HEIDENHAIN iTNC 530 (340 49x-01) ISO programming User Manual
Page 421: Subprogram within a subprogram

HEIDENHAIN iTNC 530
421
9.5 Nesting
9.5 Nesting
Types of nesting
Subprograms within a subprogram
Program section repeats within a program section repeat
Subprograms repeated
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.
Maximum nesting depth for subprograms: 8
Maximum nesting depth for calling main programs: 4
You can nest program section repeats as often as desired.
Subprogram within a subprogram
Example NC blocks
%UPGMS G71 *
...
N170 L1.0 *
Subprogram at label G98 L1 is called
...
N350 G00 G40 Z+100 M2 *
Last program block of the
Main program (with M02)
N360 G98 L1 *
Beginning of subprogram 1
...
N390 L2.0 *
Subprogram at label G98 L2 is called
...
N450 G98 L0 *
End of subprogram 1
N460 G98 L2 *
Beginning of subprogram 2
...
N620 G98 L0 *
End of subprogram 2
N999999 %UPGMS G71*