Distributed I/O (Profinet, Profibus, Or As-I); Rdrec And Wrrec - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

101BExtended instructions

8.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)

Table 8- 70
ENO status
ENO
Condition
1
No errors detected
0
IN2 is larger than IN1
Current length of IN1 exceeds maximum length of IN1, or current length
of IN2 exceeds maximum length of IN2 (invalid string)
Maximum length of IN1 or IN2 does not fit within allocated memory
range
Maximum length of IN1 or IN2 is 255
8.3
Distributed I/O (PROFINET, PROFIBUS, or AS-i)
8.3.1

RDREC and WRREC

You can use the RDREC (Read record) and WRREC (Write record) instructions with
PROFINET, PROFIBUS, and AS-i.
Table 8- 71
RDREC and WRREC instructions
LAD / FBD
STEP 7 automatically creates the DB when you insert the instruction.
1
In the SCL examples, "RDREC_DB" and "WRREC_DB" are the names of the instance DBs.
2
260
SCL
"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_,
record:=_variant_inout_);
"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_,
record:=_variant_inout_);
OUT
Valid character position
Character position is set to 0
Description
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).
Assign 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.
Use the WRREC instruction to transfer a
data RECORD with the record number
INDEX to a DP slave/PROFINET IO
device component addressed by ID, such
as a module in the central rack or a
distributed 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,
therefore, have at least the length of LEN
bytes.
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents