Parameters
The following table shows the parameters of the RCVREC instruction:
Parameter Declara-
tion
MODE
IN
F_ID
IN
MLEN
IN
CODE1
IN
CODE2
IN
NEW
OUT
STATUS
OUT
SLOT
OUT
SUBSLOT OUT
INDEX
OUT
LEN
OUT
RECORD
IN_OUT
9.3.10.3
PRVREC (I-device/I-slave make data record available)
An I-device can receive a request from a higher-level controller to make a data record
available. The I-device makes the data record available in the user program with the
PRVREC instruction (make data record available).
Table 9- 92
PRVREC instruction
LAD / FBD
STEP 7 automatically creates the DB when you insert the instruction.
1
In the SCL example, "PRVREC_SFB_DB" is the name of the instance DB.
2
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
Data type
Int
HW_SUBMODULE
Int
Byte
Byte
Bool
DWord
HW_SUBMODULE
HW_SUBMODULE
UInt
UInt
Variant
SCL
"PRVREC_SFB_DB"(
mode:=_int_in_,
F_ID:=_uint_in_,
code1:=_byte_in_,
code2:=_byte_in_,
len:=_uint_in_,
new=>_bool_out_,
status=>_dword_out_,
slot=>_uint_out_,
subslot=>_uint_out_,
index=>_uint_out_
rlen=>_uint_out_,
rec-
ord:=_variant_inout_);
9.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
Description
Mode
Subslot in the transfer area of the I-device for the data record to
be received (only relevant for MODE = 2). The high word is always
set to zero.
Maximum length of the data record to be received in bytes
Zero (for MODE = 3) and/or Error Code 1 (for MODE = 4)
Zero (for MODE = 3) and/or Error Code 2 (for MODE = 4)
MODE = 0: New data record was received
•
MODE = 1 or 2: Data record was transferred to RECORD
•
Error information. Refer to "STATUS parameter" (Page 403) for
more information.
Identical to F_ID
Identical to F_ID
Number of the data record received
Length of the data record received
Target range for the data record received
Extended instructions
Description
Use the PRVREC instruction to re-
ceive a request from a higher-level
controller to make a data record
available.
413