![Moeller S40-AM-TL Manual Download Page 25](http://html1.mh-extra.com/html/moeller/s40-am-tl/s40-am-tl_manual_1819282025.webp)
Data Arrays
22
10/00 AWB27-1301-GB
Working with data arrays
The next section describes how to read or write data arrays
using the example of the send and receive data arrays of a
primary station.
Ensure that all the array indices are within the limits when
accessing data arrays. If the array index limits are exceeded,
the controller will STOP and the NOT READY LED will light
up.
The data arrays were defined as follows in the variable
declaration for the function block:
Writing data array elements
To save the constant “5” in the array element station “3”,
subaddress “0”, offset address “10” of the send data array,
proceed as follows:
VAR_INPUT
tra_dat: ARRAY[1..5, 0..0, 0..31] OF BYTE;
(*Send data array (station number,
subaddresses, offset addresses)*)
END_VAR
VAR_OUTPUT
rec_dat: ARRAY[1..5, 0..0, 0..31] OF BYTE;
(*Receive data array (station number,
subaddresses, offset addresses)*)
END_VAR
LD 5
ST Instance_name.tra_dat [3,0,10]
.
.
END_PROGRAM
Summary of Contents for S40-AM-TL
Page 7: ...10 00 AWB27 1301 GB 4 ...
Page 9: ...6 10 00 AWB27 1301 GB ...
Page 13: ...10 10 00 AWB27 1301 GB ...
Page 55: ...Basic Function Blocks 52 10 00 AWB27 1301 GB ...
Page 103: ...100 10 00 AWB27 1301 GB ...
Page 107: ...104 10 00 AWB27 1301 GB ...
Page 113: ...10 00 AWB27 1301 GB 110 ...