Siemens S7-1200 System Manual page 317

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Parameter and type
LEN
OUT (RDREC)
IN (WRREC)
RECORD
IN_OUT
The RDREC and WRREC instructions operate asynchronously, that is, processing covers
multiple instruction calls. Start the job by calling RDREC or WRREC with REQ = 1.
The job status is displayed via output parameter BUSY and the two central bytes of output
parameter STATUS. The transfer of the data record is complete when the output parameter
BUSY has been set to FALSE
A value of TRUE (only for one scan) on the output parameter VALID (RDREC) or DONE
(WRREC) verifies that the data record has been successfully transferred into the target area
RECORD (RDREC) or to the target device (WRREC). In the case of the RDREC, the output
parameter LEN contains the length of the fetched data in bytes.
The output parameter ERROR (only for one scan when ERROR = TRUE) indicates that a
data record transmission error has occurred. In this case, the output parameter STATUS
(only for the one scan when ERROR = TRUE) contains the error information.
Data records are defined by the hardware device manufacturer. Refer to the hardware
manufacturer's device documentation for details about a data record.
Note
If a DPV1 slave is configured via GSD file (GSD rev. 3 and higher) and the DP interface of
the DP master is set to "S7 compatible", then you may not read any data records from the
I/O modules in the user program with "RDREC" or write to the I/O modules with "WRREC".
In this case, the DP master addresses the wrong slot (configured slot + 3).
Remedy: set the interface of the DP master to "DPV1".
Note
The interfaces of the "RDREC" and "WRREC" instructions are identical to the "RDREC" and
"WRREC" FBs defined in "PROFIBUS Guideline PROFIBUS Communication and Proxy
Function Blocks according to IEC 61131-3".
Note
If you use "RDREC" or "WRREC" to read or write a data record for PROFINET IO, then
negative values in the INDEX, MLEN, and LEN parameters will be interpreted as an
unsigned 16-bit integer.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Data type
UInt
Variant
8.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
Description
Length of the fetched data record information (RDREC)
Maximum byte length of the data record to be transferred
(WRREC)
Target area for the fetched data record (RDREC)
Data record (WRREC)
Extended instructions
317

Advertisement

Table of Contents
loading

Table of Contents