Siemens SINUMERIK 840D sl Programming Manual page 63

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

Advertisement

Example 4: Indirectly programming an axis
Direct programming:
Program code
X1=100 X2=200
Indirect programming:
Program code
DEF AXIS AXVAR1 AXVAR2
AXVAR1=(X1) AXVAR2=(X2)
AX[AXVAR1]=100 AX[AXVAR2]=200
Example 5: Indirectly programming an axis
Direct programming:
Program code
G2 X100 I20
Indirect programming:
Program code
DEF AXIS AXVAR1=X
G2 X100 IP[AXVAR1]=20
Example 6: Indirectly programming array elements
Direct programming:
Program code
DEF INT ARRAY1[4,5]
Indirect programming:
Program code
DEFINE DIM1 AS 4
DEFINE DIM2 AS 5
DEF INT ARRAY[DIM1,DIM2]
ARRAY[DIM1-1,DIM2-1]=5
Job Planning
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
Comment
; Defining two type AXIS variables.
; Assigning the axis names.
; Traversing the axes whose address names are
saved in the variables with the names
AXVAR1 and AXVAR2
Comment
; Defining a variable, type AXIS and value
assignment.
; Indirect programming the center point data for
the axis, whose address name is saved in the
variable with the name AXVAR1.
Comment
; Defining array 1
Comment
; For array dimensions, array sizes must be
specified as fixed values.
Flexible NC programming
1.2 Indirect programming
63

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents