Array Definitions (Def, Set, Rep) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

Example: Program-local variables
DEF INT COUNTER
LOOP: G0 X...
COUNT=COUNT+1
IF COUNT<50 GOTOB LOOP
M30
Example: Querying existing geometry axes
DEF AXIS ABSCISSA;
IF ISAXIS(1) == FALSE GOTOF CONTINUE
ABSCISSA = $P_AXN1
CONTINUE:
Example: Indirect spindle programming
DEF AXIS SPINDLE
SPINDLE=(S1)
OVRA[SPINDLE]=80
SPINDLE=(S3)
...
1.3

Array definitions (DEF, SET, REP)

1.3
Function
An array is a memory area defined using the variable type with name and size. Arrays with
up to two dimensions can be defined.
Note
Maximum array size
When defining arrays, the maximum array size of the 1st and 2nd dimension is 32767 for the
array index [n, m].
Initialization of arrays
Initialization values can be assigned to the array elements:
• during the program execution
or
• already with the array definition.
In 2-dimensional arrays, the right array index is incremented first.
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Flexible NC programming
1.3 Array definitions (DEF, SET, REP)
;Loop
;1. geometry axis
;Spindle override = 80%
1-7

Advertisement

Table of Contents
loading

Table of Contents