Siemens SINUMERIK 840D sl Programming Manual page 99

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

RET
<block_number/label>
<block after block with block number/label>,
<no_of_return_levels>,
<return to beg. of program>,
Example of error handling: Resumption in the main program after ASUP processing
N10010 CALL "UP1"
N11000 PROC UP1
N11010 CALL "UP2"
N10900
N10910 MCALL
N10920 G0 G60 G40 M5
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
N12000 PROC UP2
N19000 PROC ASUB
... RET("N10900", , ...
N19100 RET(N10900,,$P_STACK)
Subroutines, Macros
2.5 Parameterized subroutine return (RET)
Subroutine end
(use instead of M17)
Parameter: Block number or label as
STRING (constant or variable) of the
block at which to resume execution.
Execution is resumed in the calling
program at the block with the "Block
number/label".
Parameter of type INTEGER
If the value is greater than 0,
execution is resumed at "Block
number/label". If the value is equal
to 0, the subroutine return goes to
the block with <block number/label>.
Parameter of type INTEGER with the
permissible values 1 to 11.
Value = 1: The program is resumed in
the current program level –1 (like
RET without parameters).
Value = 2: The program is resumed in
the current program level –2,
skipping one level, etc.
Parameter of type BOOL
Value 1 or 0.
Value = 1 If the return goes to the
main program and ISO dialect mode is
active there, execution will be
resumed at the beginning of the
program.
; Program level 0 main program
; Program level 1
; Program level 2
; Program level 2 (ASUB execution)
; Program level 3
; Subroutine return
; Resumption in main program
; Deactivate modal subroutine
; Correct further modal settings
2-15

Advertisement

Table of Contents
loading

Table of Contents