10 | More on PROFINET?
STOBER
44
11/2019 | ID 442710.03
10.3.2.1
RDREC and WRREC: Input and output parameters
In order to transfer acyclical parameter channel data, PROFINET offers the
Read record
and
Write record
functions. The
associated interfaces are controlled using the RDREC (read record) and WRREC (write record) SIMANTIC system function
blocks that operate asynchronously.
RDREC and WRREC contain special input and output parameters in a defined sequence. Both blocks communicate with the
IO devices in the network using the input and output parameters described below.
RDREC: Input and output parameters
The RDREC block reads a RECORD out of a hardware component addressed in the
ID
parameter.
REQ
STATUS
ID
LEN
BUSY
ERROR
INDEX
MLEN
VALID
= B02E hex
RECORD
EN
ENO
RDREC
Data
Header “Response”
Fig. 9: RDREC system function block: Input and output parameters
Parameters
Data type
Declaration
EN
BOOL
IN
Release input
REQ
BOOL
IN
Transfer record (REQ = 1: Start transfer)
ID
HW_IO
IN
Hardware ID for an IO device; is issued automatically and can be
read out using
TIA Hardware Manager
>
Device
>
Properties
, for
example
INDEX
DINT
IN
Record number (the associated value must always be
B02E hex
)
MLEN
UINT
IN
Maximum length of the record to be transferred
ENO
BOOL
OUT
Release output
VALID
BOOL
OUT
Record was received and is valid
BUSY
BOOL
OUT
Status of the reading (BUSY = 1: still not finished)
ERROR
BOOL
OUT
Status of the reading (ERROR = 1: faulty)
STATUS
DWORD
OUT
Status of the RDREC block or error information
LEN
UINT
OUT
Length of the record that was read
RECORD
Variant
IN/OUT
Record (consisting of data, see the chapter
)
Tab. 9: Parameters of the RDREC system function block