Basic instructions
7.6 Move operations
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
241
Table 7- 67 Data types for parameters
Index Input DInt The i
ndex number of the array element to be read or
written to
Member
1
Input Array element types:
Bool, Byte, Word, DWord,
Char, SInt, Int, DInt, USInt,
UInt, UDInt, Real, LReal
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.
Value
1
Out Bool, Byte, Word, DWord,
Char, SInt, Int, DInt, USInt,
UInt, UDInt, Real, LReal
Location to which the specified array element is
copied (FieldRead)
Location of the value that is copied to the specified
array element (FieldWrite)
The data type of the array element specified by the MEMBER parameter and the VALUE parameter must have the
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
referenced at MEMBER parameter
● 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.