Siemens Sinumerik 802D sl Programming Manual page 132

Iso turning
Hide thumbs Also See for Sinumerik 802D sl:
Table of Contents

Advertisement

Enhanced Level Commands
4.2 Program support functions (2)
End of subprogram code (M99)
M99 terminates the subprogram.
If M99 Pxxxx is programmed, execution resumes at block number Nxxxx on the
return jump to the main program. The block number must always begin with 'N'.
The system initially searches forwards for the block number (from the subprogram
call towards the end of the program). If a matching block number is not found, the
part program is then scanned backwards (towards the start of the program). If M99
appears without a block number (Pxxxx) in a subprogram, the subprogram is termi-
nated and the processor jumps back to the main program to the block following the
subprogram call.
If M99 appears without a block number (Pxxxx) in a main program, it is jumped
back back to the head of the main program and the program is executed again.
These M commands are not output to the PLC.
Subprogram return jump with 'RET'
In the Siemens shell cycles for stock removal (as in ISO Dialect), it is necessary
after roughing to resume program execution in the main program after the contour
definition. To achieve this, the shell cycle must contain a subprogram return jump to
the block after the end of the contour definition. The RET command has been ex-
tended with two optional parameters for skipping the blocks with the contour defini-
tion in the stock removal cycles after the subprogram call (with G71--G73).
The command RET (STRING: <sequence no./label>) is used to resume program
execution in the calling program (main program) at the block with <sequence no./
label>.
If program execution is to be resumed at the next block after <sequence no./label>,
the 2nd parameter in the RET command must be > 0; RET (<sequence no./label>,
1). If a value > 1 is programmed for the 2nd parameter, the subprogram also jumps
back to the block after the block with <sequence no./label>.
In G70--G73 cycles, the contour to be machined is stored in the main program. The
extended RET command is required in order to resume execution after the contour
definition in the main program at the end of G70 (finish cut via contour with stock
removal cycle). To jump to the next NC block after the contour definition at the end
of the shell cycle for G70, the shell cycle must be terminated with the following re-
turn syntax:
RET ('N' << $C_Q, 1)
Search direction:
The search direction for <sequence no./label> is always forwards first (towards the
end of the program) and then backwards (towards the head of program).
4-132
SINUMERIK 802D sl/840D sl840D/840Di sl/840Di/810D ISO Turning -- 04.07 Edition
© SIEMENS AG 2007 All rights reserved
04.07

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents