Initialization Of Array Variables (Set, Rep) - Siemens Sinumerik 840D sl Programming Manual

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

Advertisement

10.4.25

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>,...) Initialization with value lists
REP(<value>)
Example
Program code
WHEN TRUE DO SYG_IS[0]=REP(0)
WHEN TRUE DO SYG_IS[1]=SET(3,4,5)
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
10.4 Actions in synchronized actions
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.
The array is described from the programmed array
indices onwards using the SET parameters. As many
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 <value>) of REP.
Comments
; Result:
SYG_IS[0]=0
;
SYG_IS[1]=3
SYG_IS[2]=4
SYG_IS[3]=5
SYG_IS[4]=0
Motion synchronous actions
627

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents