Communication
11.2 PROFINET
S7-1200 Programmable controller
864 System Manual, V4.2, 09/2016, A5E02486680-AK
The TRCV instruction writes the received data to a receive area that is specified by the
following two variables:
● Pointer to the start of the area
● Length of the area or the value supplied at the LEN input if not 0
Note
The default setting of the LEN parameter (LEN = 0) uses the DATA parameter to
determine the length of the data being transmitted.
It is recommended that the data
transmitted by the TSEND instruction be the same size as the DATA parameter of the
TRCV instruction.
If using the default setting of the LEN parameter and it is necessary to send the data in
segments smaller than the DATA p
arameter size, the following applies. It is
recommended to keep the EN_R bit high until the corresponding TSEND transfers the
appropriate amount of data to fill the TRCV DATA parameter. If the size of the data
transmitted from TSEND does not equal the TRCV
DATA parameter size, TRCV remains
in a busy status (status code: 7002) while the EN_R bit is high until the overall size of the
data transmitted from TSEND equals the TRCV DATA parameter size. If the EN_R bit of
TRCV is pulsed, it needs to be pulsed the s
ame number of times as TSEND is executed
The TRCV DATA parameter buffer does not display the new data received until the data
size equals the DATA parameter buffer size.
As soon as all the job data has been received, TRCV transfers it to the receive area and sets
NDR to 1.
Table 11- 25 Entering the data into the receive area
Entering the data in the
receive area
Parameter
"connection_type"
Value of the LEN parameter
Value of the RCVD_LEN
parameter (bytes)
TCP Ad hoc mode B#16#11 Selected with the TRCV in-
1 to 1472
TCP Data reception with
B#16#11 0 (recommended) or 1 to
1 to 8192
ISO on TCP protocol-controlled B#16#12 0 (recommended) or 1 to
1 to 8192