![Siemens SIPROTEC PROFINET IO Manual Download Page 77](http://html.mh-extra.com/html/siemens/siprotec-profinet-io/siprotec-profinet-io_manual_1265444077.webp)
3 Parameterization
3.3 Parameterizing the IO Controller
77
SIPROTEC 4, Communication Module PROFINET IO, Communication Profile
C53000-L1840-C360-1, Edition 08.2012
3.3.2.4 Reading and Writing Acyclic Data with SFB52 and SFB53
The SIPROTEC-IO device offers acyclic datasets (see Chapter 2.8) that can be read or written with the follow-
ing system function blocks in the S7 SPS:
•
Presetting metered values and statistic values
→
writing with SFB53 ("WRREC")
•
Reading unit IDs
→
reading with SFB52 ("RDREC")
•
Reading metered-value conversion factors
→
reading with SFB52 ("RDREC")
Reading the unit IDs of an IO module "measured value 12" is illustrated using the following example.
Bear in mind that the SFB52 operates asynchronously, that is, reading the acyclic data can last several PLC
user cycles.
Define the structure of the dataset to be read in a data block, for example DB11:
Figure 3-26
Data block for reading unit IDs
SFB52 Call
The data block DB52 is required as instance DB for calling SFB52. If it does not exist yet, you are prompted
automatically whether to generate DB52 when entering the example shown below.
You can use other flags or data blocks instead of those used in the example (DB11, M10, MD21, MW25, and
MW100).
CALL SFB52, DB52
REQ := M10.3
// Triggering the read job
ID := DW#16#200
// IO module address, e.g. 512, hexadecimal
INDEX := 100
// Index of the acycl. data, see Chapter 2.4
MLEN := 26
// Length of the data to be read, see Chapter 2.8.2
VALID := M10.0
// SFB52 return value: TRUE = dataset was read
BUSY := M10.1
// SFB52 return value: TRUE = reading in process
ERROR := M10.2
// SFB52 return value: TRUE = read error
STATUS := MD21
// SFB52 return value: error code
com_profinet-io_profile_us.book Page 77 Friday, August 17, 2012 1:40 PM