Control via PROFINET IO
Asynchronous
Reading
of data (PROFINET Read Services):
CALL SFB 52 , DBx
REQ :=BOOL
(Input)
ID :=DWORD
(Input)
INDEX :=INT
(Input)
MLEN :=INT
(Input)
VALID :=BOOL
(Output)
BUSY :=BOOL
(Output)
ERROR :=BOOL
(Output)
STATUS:=DWORD
(Output)
LEN :=INT
(Output)
RECORD:=ANY
(I/O)
To the function block SFB52 a data block (DBx here) has to be added. The data block is
automatically generated when the function block is called.
Parameter Meaning
REQ
=1: a read operation is started
ID
Logical address of the PROFINET IO component (module or submodule).
For an output unit bit 15 has to be set (e.g. for address 5: ID:=DW#16#8005).
For a combination module (input and output) the lower of both addresses has to be
specified (e.g.: transmit SDO to CANopen unit in slot 3, then the corresponding I/O-
address of this slot has to be selected)
INDEX
Index
as described in the respective chapters (6.1.1 - 6.1.17).
MLEN
minimum length of the bytes to be read
e.g. for „Get Version“ 28 bytes
The actually received length of the data is returned in
LEN
VALID
= 1: this read operation is completed successfully
BUSY
= 1: this read operation is still in process
ERROR
= 1: an error occurred during the read operation, see parameter
STATUS
for a
detailed error description (error number)
STATUS
Error description
LEN
Number of the received bytes
RECORD
Transmitted data according to the corresponding index tables
The received length is of these data is specified in
LEN
Note “REQ”:
Please refer to the S7 documentation about this data blocks. In particular, the „REQ“-
input is not edge-triggered. If the input is not reset accordingly, the operation will be
repeated permanently!
Note “ID”:
In Step 7 5.x usually the input address of the CANopen Manager module has to be
used. In the TIA portal (e.g. when using S7-1500) the HW identifier of the CANopen
Manager has to be used instead.
Page 56 of 105
Manual • Doc. No.: C.2921.21 / Rev. 1.6
CANopen-PN