3.2 Subprogram technique
3.2.1 General information
3.2.1.1 Subprogram
The term "subprogram" has its origins during the time when part programs were split strictly into
main and subprograms. Main programs were the part programs selected for processing on the
control and then launched. Subprograms were the part programs called from within the main
program.
This strict division no longer exists with today's SINUMERIK NC language. In principle, each
part program can be selected as a main program and launched or called from another part
program as a subprogram.
Accordingly, the subprogram can then be used to refer to a part program called from within
another part program.
Application
As in all high-level programming languages, in the NC language, subprograms swaps 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
Work preparation
3.2 Subprogram technique
NC programming
490 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0