Flexible NC programming
1.1 Variables
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
49
<number_array_elements>
: Number of array elements to be written with the
specified
<value>. The following apply to the
remaining array elements, dependent on the point in
time:
• Initialization when defining the array:
→ Zero is written to the remaining array elements.
• Assignment during program execution:
→ The actual values of the array elements remain
unchanged.
If the parameter is not programmed, all array
elements are written with
<value>.
If the parameter equals zero, the following apply
dependent on the point in time:
• Initializing when defining the array:
→ All elements are pre-assigned zero
• Assignment during program execution:
→ The actual values of the array elements remain
unchanged.
Array index
The implicit sequence of the array elements, e.g. in the case of value assignment using SET
or REP, is right to left due to iteration of the array index.
Example: Initialization of a 3-dimensional array with 24 array elements:
DEF INT FELD[2,3,4] = REP(1,24)
FELD[0,0,0] = 1
1st array element
FELD[0,0,1] = 1
2nd array element
FELD[0,0,2] = 1
3rd array element
FELD[0,0,3] = 1
4th array element
...
FELD[0,1,0] = 1
5th array element
FELD[0,1,1] = 1
6th array element
...
FELD[0,2,3] = 1
12th array element
FELD[1,0,0] = 1
13th array element
FELD[1,0,1] = 1
14th array element
...
FELD[1,2,3] = 1
24th array element