Siemens SINUMERIK 840D sl Programming Manual page 18

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

Advertisement

Flexible NC programming
1.2 Variable definition (DEF user-defined variables LUD, GUD, PUD)
Note
If a variable is not assigned a value on definition, the system sets zero as the default.
Variables must be defined at the beginning of the program before they are used. The
definition must be made in a separate block; only one variable type can be defined per block.
Parameters
INT
REAL
BOOL
CHAR
STRING
AXIS
FRAME
Example
Variable type
INT
DEF INT NUMBER
DEF INT NUMBER=7
REAL
DEF REAL DEPTH
DEF REAL DEPTH=6.25
DEF REAL DEPTH=3.1,LENGTH=2,NUMBER
1-4
Variable type integer, i.e. whole number
Variable type real, i.e. factional number with decimal
point
Variable type Boolean, i.e. 1 or 0 (TRUE or FALSE)
Variable type char, i.e. ASCII-coded character
(0 to 255)
Variable type string, i.e. character string
Variable type axis, i.e. axis addresses and spindles
Variable type frame, i.e. geometric data
Meaning
This creates a variable of type integer with the
name NUMBER.
System initializes with zero.
This creates a variable of type integer with the
name NUMBER. The system initializes the
variable with 7.
This creates a variable of type real with the name
DEPTH.
System initializes with zero (0.0).
This creates a variable of type real with the name
DEPTH. The variable is initialized with 6.25.
More than one variable can be defined in a line.
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Job planning

Advertisement

Table of Contents
loading

Table of Contents