Subprograms and Repetition of Program Sections
11.1
Use of subprograms
Function
In principle, a subprogram has the same structure as a parts program. It consists of NC
blocks with traversing and switching commands. Basically, there is no difference between a
main program and a subprogram. The subprogram contains either machining operations or
sequences of operations that are to be performed several times.
Parameters
M17
RET
M30
Fundamentals
Programming Manual, 10.2004 Edition, 6FC5 298-7AB00-0BP1
End of subprogram, return to the calling program.
Subprogram end if continuous-path mode should not be
interrupted by retraction. RET must be programmed in a
separate block.
The program end M30 set in the main program is evaluated
like M17 in the subprogram. This, therefore, enables a main
program to be called as a subprogram.
11
11-1