Siemens SINUMERIK 840D sl Programming Manual page 28

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

Advertisement

Flexible NC programming
1.1 Variables
Example 2: Program-global and program-local user variables (PUD/LUD)
Program code
PROC MAIN
DEF INT VAR1
...
SUB2
...
M30
Program code
PROC SUB2
DEF INT VAR2
...
IF (VAR1==1)
VAR1=VAR1+1
VAR2=1
ENDIF
SUB3
...
M17
Program code
PROC SUB3
...
IF (VAR1==1)
VAR1=VAR1+1
VAR2=1
ENDIF
...
M17
Example 3: Definition and use of user variables of data type AXIS
Program code
DEF AXIS ABSCISSA
DEF AXIS SPINDLE
...
IF ISAXIS(1) == FALSE GOTOF CONTINUE
ABSCISSA = $P_AXN1
CONTINUE:
...
SPINDLE=(S1)
28
Comment
;
Main program
;
PUD definition
;
Subprogram call
Comment
;
Subprogram SUB2
;
LUD DEFINITION
;
Read PUD
;
Read and write PUD
;
Write LUD
;
Subprogram call
Comment
;
Subprogram SUB3
;
Read PUD
;
Read and write PUD
;
Error: LUD from SUB2 not known
Comment
;
1st geometry axis
;
Spindle
1st spindle
Programming Manual, 06/2009, 6FC5398-2BP20-0BA0
Job Planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents