Flexible NC programming
1.24 Subprogram technique
Syntax
PROC <program name>
...
RET
Example
Main program:
Program code
PROC MAIN_PROGRAM
...
N50 SUB_PROG
N60 ...
...
N100 M30
Subprogram:
Program code
PROC SUB_PROG
...
N100 RET
1.24.2.10
Parameterizable subprogram return jump (RET ...)
Function
Usually, an
was called and processing continues with the program line following the subprogram call.
However, there are also applications where the program should be resumed at another
position, e.g.:
● Resuming program execution after calling the stock removal cycles in the ISO dialect
● Return to main program from any subprogram level (even after ASUB) for error handling.
● Return jump through several program levels for special applications in compile cycles and
In cases such as these, the
parameters".
178
or
end of subprogram returns to the program from which the subprogram
RET
M17
mode (after describing the contour).
in the ISO dialect mode.
Comment
; Beginning of the program
; Subprogram call: SUB_PROG
; End of program
Comment
; Prompts return jump to block N60 in the main program.
command is programmed together with "return jump
RET
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
Job Planning