Siemens S7-1200 System Manual page 241

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Table 7- 67
Data types for parameters
Parameter and type
Index
Input
Member
Input
1
Value
Out
1
The data type of the array element specified by the MEMBER parameter and the VALUE parameter must have the
1
same data type.
The enable output ENO = 0, if one of the following conditions applies:
● The EN input has signal state "0"
● The array element specified at the INDEX parameter is not defined in the array
● Errors such as an overflow occur during processing
Accessing data by array indexing
To access elements of an array with a variable, simply use the variable as an array index in
your program logic. For example, the network below sets an output based on the Boolean
value of an array of Booleans in "Data_block_1" referenced by the PLC tag "Index".
The logic with the variable array index is equivalent to the former method using the
FieldRead instruction:
FieldWrite and FieldRead instructions can be replaced with variable array indexing logic.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Data type
DInt
Array element types:
Bool, Byte, Word, DWord,
Char, SInt, Int, DInt, USInt,
UInt, UDInt, Real, LReal
Bool, Byte, Word, DWord,
Char, SInt, Int, DInt, USInt,
UInt, UDInt, Real, LReal
referenced at MEMBER parameter
Description
The index number of the array element to be read or
written to
Location of the first element in a one- dimension
array defined in a global data block or block
interface.
For example: If the array index is specified as [-2..4],
then the index of the first element is -2 and not 0.
Location to which the specified array element is
copied (FieldRead)
Location of the value that is copied to the specified
array element (FieldWrite)
Basic instructions
7.6 Move operations
241

Advertisement

Table of Contents
loading

Table of Contents