Siemens SINUMERIK 840D sl Programming Manual page 26

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

Advertisement

Flexible NC programming
1.3 Array definitions (DEF, SET, REP)
Initialization with value lists in the program execution, SET
• Initialization is the same as in array definition.
• Expressions are possible values in this case too.
• Initialization starts at the programmed array indexes. Values can also be assigned
Example: Assignment of expressions
DEF INT ARRAY[5, 5]
ARRAY[0,0] = SET(1, 2, 3, 4, 5)
ARRAY[2,3] = SET(VARIABLE, 4*5.6)
The axis index of axis variables is not traversed:
Example: Initialization in one line
$MA_AX_VELO_LIMIT[1, AX1] = SET(1.1, 2.2, 3.3)
Is equivalent to:
$MA_AX_VELO_LIMIT[1,AX1] = 1.1
$MA_AX_VELO_LIMIT[2,AX1] = 2.2
$MA_AX_VELO_LIMIT[3,AX1] = 3.3
Initialization with the same values for the array definition, REP
All array elements are assigned the same value (constant).
Variables of type FRAME cannot be initialized.
Example:
DEF REAL ARRAY5[10,3] = REP(9.9)
Initialization with the same values in the program execution
• Expressions are possible values in this case too.
• All array elements are initialized to the same value.
• Initialization starts at the programmed array indexes. Values can also be assigned
Example: Initialization of all elements with one value
DEF FRAME FRM[10]
FRM[5] = REP(CTRANS (X,5))
1-12
selectively to subarrays.
selectively to subarrays.
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Job planning

Advertisement

Table of Contents
loading

Table of Contents