Siemens SINUMERIK 840D sl Programming Manual page 25

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

Advertisement

Example: Initialization of complete variable arrays
The current assignment is shown in the drawing.
N10 DEF REAL ARRAY1[10,3] = SET(0, 0, 0, 10, 11, 12, 20, 20, 20, 30, 30, 30, 40, 40,
40,)
N20 ARRAY1[0,0] = REP(100)
N30 ARRAY1[5,0] = REP(-100)
N40 ARRAY1[0,0] = SET(0, 1, 2, -10, -11, -12, -20, -20, -20, -30, , , ,
-40, -40, -50, -60, -70)
N50 ARRAY1[8,1] = SET(8.1, 8.2, 9.0, 9.1, 9.2)
Initialization with value lists for the array definition, SET
• As many array elements are assigned as initialization values are programmed.
• Array elements without values (gaps in the value list) are automatically initialized to 0.
• For variables of type AXIS, gaps in the value list are not permitted.
• Programming more values than exist in the remaining array elements triggers an alarm.
Example:
DEF REAL ARRAY[2,3]=(10, 20, 30, 40)
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Flexible NC programming
1.3 Array definitions (DEF, SET, REP)
1-11

Advertisement

Table of Contents
loading

Table of Contents