Initialization Of Array Variables (Set, Rep) - Siemens SINUMERIK 828D Programming Manual

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

Motion synchronous actions
10.4 Actions in synchronized actions
10.4.24

Initialization of array variables (SET, REP)

Function
Array variables can be initialized or described with particular values in synchronized actions.
Note
Only variables that can be described in synchronized actions are possible. Machine data
cannot therefore be initialized. Axis variables cannot be specified using the NO_AXIS value.
Syntax
DO ARRAY[n,m]=SET(<value1>,<value2>,...)
DO ARRAY[n,m]=REP(<value>)
Significance
ARRAY[n,m]
SET(<value1>,<value2>,...)
REP(<value>)
Example
Program code
WHEN TRUE DO SYG_IS[0]=REP(0)
WHEN TRUE DO SYG_IS[1]=SET(3,4,5)
610
Programmed array indices set
Initialization starts at the programmed array indexes.
For 2D arrays, the second index is incremented first.
This is not done with axis indices.
Initialization with value lists
The array is described from the programmed array
indices onwards using the
array elements are assigned as values are
programmed. If more values than exist in the remaining
array elements are programmed, an alarm is triggered.
Initialization with the same values
The array is described from the programmed array
indices to the end of the array and repeated using the
parameter
) of
<value>
Comments
;
Result:
;
SYG_IS[0]=0
SYG_IS[1]=3
SYG_IS[2]=4
SYG_IS[3]=5
SYG_IS[4]=0
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
parameters. As many
SET
.
REP
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents