
Commissioning for PROFINET
2
0
2
0
-0
6
45
Reading and Writing I&M Data
In its standard library, SIEMENS offers system functions with which I&M data can be read and
written. A data record contains a 6 byte block header and the current I&M data record. The data
requested when reading or the data to be written only begins after the existing block header.
When writing, the block header must also be taken into account.
The following table shows the structure of a data record.
Reading I&M Records
I&M data can be read using the standard RDREC (SFB52) command block in the TIA portal.
First, the hardware identifier of the CPU is read out under "PLC Variables > System Constants."
The CPU should be displayed there as <Local> with the data type "Hw_SubModule." You spec-
ify the hardware identifier via the corresponding input parameter (ID). The I&M index (INDEX)
must also be transmitted. The return parameters indicate the length of the received I&M data
and contain a corresponding status or error message.
RESERVED
10
Read
0x00 et seq.
Table 5.18
I&M 16 ... 23 (slot 1, sub-slot 1, index 0xB000...0xB007)
Data object
Length
[byte]
Data
Type
Coding
Description
BlockType
2
Word
I&M 0: 0x0020
I&M 1: 0x0021
I&M 2: 0x0022
I&M 3: 0x0023
I&M 4: 0x0024
I&M 16...23: 0x0F00
I&M 99: 0x0F00
BlockHeader
BlockLength
2
Word
I&M 0: 0x0038
I&M 1: 0x0038
I&M 2: 0x0012
I&M 3: 0x0038
I&M 4: 0x0038
I&M 16...23: 0x0014
I&M 99: 0x000F
BlockVersionHigh
1
Byte
0x01
BlockVersionLow
1
Byte
0x00
I&M data
I&M 0:
54
I&M 1:
54
I&M 2:
16
I&M 3:
54
I&M 4:
54
I&M
16...23:
18
I&M 99:
13
Byte
I&M record
Table 5.19
Data record with BlockHeader and I&M record
Data object
Length
[byte]
Access Default value/description