101BExtended instructions
8.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
S7-1200 Programmable controller
260
System Manual, 11/2011, A5E02486680-05
Table 8- 70 ENO status
ENO
Condition
OUT
1
No errors detected
Valid character position
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
0
Maximum length of IN1 or IN2 is 255
Character position is set to 0
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
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_,
record:=_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).
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.
"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_);
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.
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.