Programming and Operating Manual (Milling) 
112  6FC5398-4DP10-0BA1, 01/2014 
If a subroutine is to be executed several times in succession, write the number of times it is to be executed in the block of 
the call after the subroutine name under the 
. A maximum of 
 are possible (P1 ... P9999). 
 
; Call subroutine L785, 3 cycles 
Subroutines can also be called from a subroutine, not only from a main program. In total, up to 
 are 
available for this type of nested call, including the main program level. 
See the following illustration for execution with 8 program levels: 
 
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 levels are not inadvertently changed 
in lower program levels. 
When working with SIEMENS cycles, up to 4 program levels are needed. 
 
Calling machining cycles 
Functionality 
Cycles are technology subroutines realizing a certain machining process generally, for example, drilling or milling. 
Adaptation to the particular problem is performed directly via supply parameters/values when calling the respective cycle. 
N10 DEF REAL RTP, RFP, SDIS, DP, DTB 
N50 CYCLE83(110, 90, 0, -80, 0, -10, 0, 0, 0, 0, 1, 0)  ; Call of cycle 83, transfer values directly, 
N70 RTP=100 RFP= 95.5 SDIS=1, DP=-5, DTB=3 
; Set transfer parameters for cycle 82 
N80 CYCLE82(RTP, RFP, SDIS, DP, , DTB) 
; Call of cycle 82, separate block