Subprograms and Repetition of Program Sections
11.2 Subprogram call
Fundamentals
11-4 Programming Manual, 10.2004 Edition, 6FC5 298-7AB00-0BP1
5HWXUQ
5HWXUQ
0DLQ
3URJU
6XE
3URJU
6XE
3URJU
6XE
3URJU
5HWXUQ
3URJUDPOHYHOV
PD[
Note
If you are working with SIEMENS machining and measuring cycles, then three levels are
required. If a cycle is to be called from a subprogram, this call cannot be issued from beyond
level 9.
11.2 Subprogram call
Function
You call the subprogram in the main program either with address L and the subprogram
number or by specifying the subprogram name.
Example
...
N120 L100
;Subprogram call
;"L100.SPF":
N10 MSG (DIN subprogram")
N20 G1 G91...
...
N60 M17 ;End of subprogram
N160 M30 ;End of main program