Siemens Sinumerik 840D sl Programming Manual page 53

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

Advertisement

Further information (REP)
initialization during definition
All or the optionally specified number of array elements are initialized with the specified
value (constant).
Variables of the FRAME data type cannot be initialized.
Example:
Program code
DEF REAL varName[10]=REP(3.5,4)
Value assignment in program execution
In the case of value assignment in program execution, the rules described above for definition
apply. The following options are also supported:
Expressions are also permitted as elements in the value list.
Value assignment starts with the programmed array index. Values can be assigned
selectively to subarrays.
Examples:
Program code
DEF REAL varName[10]
varName[5]=REP(4.5,3)
R10=REP(2.4,3)
DEF FRAME FRM[10]
FRM[5] = REP(CTRANS (X,5))
Further information (general)
Value assignments to axial machine data
In principle axial machine data have an array index of the AXIS data type. In the case of value
assignments to an axial item of machine data using SET or REP, this array index is ignored or
not processed.
Example: Value assignment to machine data MD36200 $MA_AX_VELO_LIMIT
$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
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Comments
; Initialize array definition and array
elements [0] to [3] with value 3.5.
Comments
; Array definition
; Array elements [5] to [7] = 4.5
; R-parameters R10 to R12 = 2.4
; Array definition
; Array elements [5] to [9] = CTRANS(X,5)
Flexible NC programming
1.1 Variables
53

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents