EasyManuals Logo

Siemens SINUMERIK 840D Programming Guide

Siemens SINUMERIK 840D
598 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #27 background imageLoading...
Page #27 background image
1
04.00 Flexible NC Programming
1.2 Variable definition
1
840D
NCU 571
840D
NCU 572
NCU 573
FM-NC 810D 840Di
ï›™
Siemens AG 2000. All rights reserved
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA)
−
04.00 Edition
1-27
If a value is not assigned to a variable when it is
defined, the system initializes it with zero.
Variables must be defined at the beginning of the
program before use. The definition must be made in
a separate block; only one variable type can be
defined per block.
Explanation
INT
Variable type Integer, i.e. whole number
REAL
Variable type Real, i.e. fraction with decimal point
BOOL
Variable type Bool, i.e. 1 or 0 (TRUE or FALSE)
CHAR
Variable type Char, i.e. ASCII character specified by the code 0 to 255
STRING
Variable type String, i.e. character string
AXIS
Variable type Axis, i.e. axis addresses and spindles
FRAME
Variable type Frame, i.e. geometrical parameters
name
Variable name
Programming examples
Variable type INT
DEF INT NUMBER
A variable of type INTEGER is created with
the name NUMBER.
The system initializes the variable with zero.
DEF INT NUMBER=7
A variable of type INTEGER is created
with the name NUMBER. The variable is
initialized with the value 7.
Variable type REAL
DEF REAL DEPTH
A variable of type REAL is created with the
name DEPTH.
The system initializes the variable with
zero (0.0).
DEF REAL DEPTH=6.25
A variable of type REAL is created with the
name DEPTH. The initial value is 6.25.
DEF REAL DEPTH=3.1,LENGTH=2,QUANTITY
It is also possible to define several variables
in a single line.

Table of Contents

Other manuals for Siemens SINUMERIK 840D

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK 840D and is the answer not in the manual?

Siemens SINUMERIK 840D Specifications

General IconGeneral
SeriesSINUMERIK 840D
AxesUp to 31
ChannelsUp to 10
Operating SystemWindows-based
Power Supply24 V DC
Control Unit TypeCNC
InterfaceEthernet, PROFIBUS
DisplayTFT color display
InterpolationSpline
PLCIntegrated PLC
Data StorageCompactFlash, USB

Related product manuals