3. <target block> = "N220", <number of return jump levels> = 2
1
5(71
PD[SURJUDPOHYHOV
6XE
SURJU
6XE
SURJU
6XS
SURJU
0DLQ
SURJU
5HWXUQMXPS
5HWXUQMXPS
After the RET command, two program levels are jumped through and program execution is
continued with block N220.
3.2.2.11 Parameterizable subprogram return jump (RETB ...)
Generally, a return jump is made from a subprogram into the calling program using the RETB
command. Processing is then continued with the program line following the subprogram call.
The following options are available if program processing is to be continued at another location:
● Resume program execution after calling the stock removal cycles in the ISO dialect mode
(after describing the contour).
● Return to main program from any subprogram level (even after ASUB) for error handling.
● Return jump across several program levels for special applications in compile cycles and in
the ISO dialect mode.
To achieve this, the RETB command should be programmed with additional parameters.
Search direction
When specifying parameter <target block>, a return jump is first made to the block after the
calling block. A search is then made for the target in the direction of the beginning of the
program into which a return jump is made. A search is made toward the end of the program if
the search was not successful.
Syntax
RETB("<target block>")
RETB("<target block>",<block after target block>)
RETB("<target block>",<block after target block> <number of return
jump levels>)
RETB("<target block>", ,<number of return jump levels>)
Work preparation
3.2 Subprogram technique
NC programming
518 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0