105BCommunication processor
12.3 Point-to-Point (PtP) communication
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
537
12.3.1.4
RCV_CFG instruction
Table 12- 13 RCV_CFG (Receive Configuration) instruction
LAD / FBD
SCL
Description
"RCV_CFG_DB"(
REQ:=_bool_in_,
PORT:=_uint_in_,
CONDITIONS:=_struct_in_,
DONE=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_);
RCV_CFG performs dynamic configuration of
serial receiver parameters for a PtP
communication port. This instruction configures the
conditions that signal the start and end of a
received message. Any queued messages within a
CM or CB are discarded when RCV_CFG is
executed.
1
STEP 7 automatically creates the DB when you insert the instruction.
You can set up the initial static configuration of the communication port in the device
configuration properties, or just use the default values. You can execute the RCV_CFG
instruction in your program to change the configuration.
The RCV_CFG configuration changes are not permanently stored in the CPU. The
parameters configured in the device configuration are restored when the CPU transitions
from RUN to STOP mode and after a power cycle. See Configuring receive parameters
(Page 552) for more information.
Table 12- 14 Data types for the parameters
Parameter and type
Data type
Description
REQ
IN
Bool
Activate the configuration change on the rising edge of this input.
(Default value: False)
PORT
IN
PORT
After you install and configure a CM or CB communication device,
the port identifier appears in the parameter helper drop-list available
at the PORT box connection. The assigned CM or CB port value is
the device configuration property "hardware identifier". The port
symbolic name is assigned in the "System constants" tab of the PLC
tag table. (Default value: 0)
CONDITIONS
IN
CONDITIONS
The Conditions data structure specifies the starting and ending
message conditions as described below.
DONE
OUT
Bool
TRUE for one scan, after the last request was completed with no
error
ERROR
OUT
Bool
TRUE for one scan, after the last request was completed with an
error
STATUS
OUT
Word
Execution condition code (Default value: 0)
Start conditions for the RCV_PTP instruction
The RCV_PTP instruction uses the configuration specified by the RCV_CFG instruction to
determine the beginning and ending of point-to-point communication messages. The start of
a message is determined by the start conditions. The start of a message can be determined
by one or a combination of start conditions. If more than one start condition is specified, all
the conditions must be satisfied before the message is started.