Siemens SINUMERIK 840D sl Programming Manual page 504

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Work preparation
3.2 Subprogram technique
Example 2: A cycle is to act like a command for a user
Initial situation: Single block machining is active.
Main program:
Program code
...
N100 G1 X10 G90 F200
N120 X-4 Y6
N130 CYCLE1
N140 G1 X0
N150 M30
Cycle CYCLE1:
Program code
N100 PROC CYCLE1 DISPLOF SBLOF
N110 R10=3*SIN(R20)+5
N120 IF (R11 <= 0)
N130
N140 ENDIF
N150 G1 G91 Z=R10 F=R11
N160 M17
The cycle CYCLE1 is processed with active single block machining. CYCLE1 is processed for
active single block machining, i.e. the Start key must be pressed once to process CYCLE1.
Example 3: An ASUB, which is started by the PLC in order to activate a modified zero offset and
tool offsets, is to be executed invisibly
Program code
N100 PROC NV SBLOF DISPLOF
N110 CASE $P_UIFRNUM OF
N120 _G54: G54 D=$P_TOOL T=$P_TOOLNO
N130 RET
N140 _G54: G55 D=$P_TOOL T=$P_TOOLNO
N150 RET
N160 _G56: G56 D=$P_TOOL T=$P_TOOLNO
N170 RET
N180 _G57: G57 D=$P_TOOL T=$P_TOOLNO
N190 RET
504
SETAL(61000)
0 GOTOF _G500
1 GOTOF _G54
2 GOTOF _G55
3 GOTOF _G56
4 GOTOF _G57
DEFAULT GOTOF END
Comment
; Suppress single block machining for the com-
plete program.
Comment
; Suppress single block machining and block
display.
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents