EasyManua.ls Logo

Siemens SIMATIC S7-1200

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
385
9.3.2
RDREC and WRREC (Read/write data record)
You can use the RDREC (Read data record) and WRREC (Write data record) instructions
with PROFINET, PROFIBUS, and AS-i.
Table 9- 75 RDREC and WRREC instructions
LAD / FBD
SCL
Description
"RDREC_DB"(
req:=_bool_in_,
ID:=_word_in_,
index:=_dint_in_,
mlen:=_uint_in_,
valid=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_dword_out_,
len=>_uint_out_,
rec-
ord:=_variant_inout_);
Use the RDREC instruction to read a data
record with the number INDEX from the
component addressed by the ID, such as
a central rack or a distributed component
(PROFIBUS DP or PROFINET IO). As-
sign the maximum number of bytes to
read in MLEN. The selected length of the
target area RECORD should have at
least the length of MLEN bytes.
"WRREC_DB"(
req:=_bool_in_,
ID:=_word_in_,
index:=_dint_in_,
len:=_uint_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_dword_out_,
rec-
ord:=_variant_inout_);
Use the WRREC instruction to transfer a
data RECORD with the record number
INDEX to a DP slave/PROFINET IO de-
vice component addressed by ID, such as
a module in the central rack or a distrib-
uted component (PROFIBUS DP or
PROFINET IO).
Assign the byte length of the data record
to be transmitted. The selected length of
the source area RECORD should, there-
fore, have at least the length of LEN
bytes.
1
STEP 7 automatically creates the DB when you insert the instruction.
2
In the SCL examples, "RDREC_DB" and "WRREC_DB" are the names of the instance DBs.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals