Flexible NC programming
1.25 Subprogram technique
Job planning
150 Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
Application
As in all high-level programming languages, in the NC language, subprograms are used to
swap out program sections used more than once to independent, self-contained programs.
Subprograms offer the following advantages:
● Increase the transparency and readability of programs
● Increase quality by reusing tested program parts
● Offer the possibility of creating specific machining libraries
● Save memory space
1.25.1.2 Subprogram names
Naming rules
The following rules must be observed with regard to naming subprograms:
● The first two characters must be letters (A - Z, a - z).
● The following characters can be any combination of letters, numbers (0 to 9), and
underscores ("_").
● A maximum of 31 characters may be used.
Note
The SINUMERIK NC language does not distinguish between uppercase and lowercase
letters.
Program name expansion
The program name assigned when the program is created is expanded within the control
with the addition of a prefix and a suffix.
● Prefix: _N_
● Suffix:
– Main programs: _MPF
– Subprograms: _SPF