Programming
8.9 Subroutine technique
8-185
SINUMERIK 802D sl Operation and Programming Nibbling (BP-N), 06/2006 Edition
6FC5 398-3CP10-0BA0
Example:
N10 L785 P3 ; Call of subroutine L785, 3 cycles
Nesting depth
Subroutines can also be called from a subroutine, not only from a main program. In total, up
to 8 program levels are available for this type of nested call, including the main program
level.
1st level 2nd level 3rd level 8th level
Main program
Subroutine
Subroutine
Subroutine
...
...
Fig. 8-36 Execution with 8 program levels
Information
Modal G functions can be changed in the subroutine, e.g. G90 –> G91. When returning to
the calling program, ensure that all modal functions are set the way you need them to be.
Please make sure that the values of your arithmetic parameters used in upper program lev-
els are not inadvertently changed in lower program levels.