Extended instructions
9.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
411
RCVREC (I-device/I-slave receive data record)
An I-device can receive a data record from a higher-level controller. The receipt takes place
in the user program with the RCVREC instruction (receive data record).
Table 9- 91 RCVREC instruction
mode:=_int_in_,
F_ID:=_uint_in_,
mlen:=_uint_in_,
code1:=_byte_in_,
code2:=_byte_in_,
new=>_bool_out_,
status=>_dword_out_,
slot=>_uint_out_,
subslot=>_uint_out_,
index=>_uint_out_
len=>_uint_out_,
rec-
Use the RCVREC instruction to re-
ceive a data record from a higher-
level controller.
STEP 7 automatically creates the DB when you insert the instruction.
2
In the SCL example, "RCVREC_SFB_DB" is the name of the instance DB.
The instruction has the following operating modes:
● Check whether the I-device has a request for a data record receipt
● Make the data record available to the output parameters
● Send an answer to the higher-level controller
You can determine the operating mode executed by the instruction using the input parameter
MODE (see below).
The I-device must be in the RUN or STARTUP mode.
With MLEN, you specify the maximum number of bytes you want to receive. The selected
length of the target range RECORD should have at least the length of MLEN bytes.
If a data record is received (MODE = 1 or MODE = 2), the output parameter NEW indicates
that the data record is stored in RECORD. Note that RECORD has a sufficient length. The
output parameter LEN contains the actual length of the data record received in bytes.