EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 387

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Extended instructions
9.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
387
Parameter and type
Data type
Description
LEN OUT (RDREC)
IN (WRREC)
UInt
Length of the fetched data record information (RDREC)
Maximum byte length of the data record to be transferred
(WRREC)
RECORD IN_OUT Variant
Target area for the fetched data record (RDREC)
Data record (WRREC)
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.
You can have up to four RDREC instructions and four WRREC instructions in use at the
same time.
Note
If you configure a DPV1 slave with a GSD file (GSD rev. 3 and higher) and
the DP interface
of the DP master is set to "S7 compatible", then you might 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 (con
figured 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 B
locks according to IEC 61131-3".
Note
If you use "RDREC" or "WRREC" to read or write a data record for PROFINET IO, then the
CPU interprets negative values in the INDEX, MLEN, and LEN parameters as unsigned 16
-
bit integers.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals