103BCommunication
10.2 PROFINET
S7-1200 Programmable controller
414
System Manual, 11/2011, A5E02486680-05
Table 10- 13 Entering the data into the receive area
Protocol
variant
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
65535
1 to 1472
TCP
Data reception with
specified length
B#16#11
0 (recommended) or 1 to
8192, except 65535
1 to 8192
ISO on TCP
Ad hoc mode
B#16#12
65535
1 to 1472
ISO on TCP
protocol-controlled
B#16#12
0 (recommended) or 1 to
8192, except 65535
1 to 8192
Note
Ad hoc mode
The "ad hoc mode" exists with the TCP and ISO on TCP protocol variants. You set "ad hoc
mode" by assigning "65535" to the LEN parameter. The receive area is identical to the area
formed by DATA. The length of the received data will be output to the parameter
RCVD_LEN. Immediately after receiving a block of data, TRCV enters the data in the receive
area and sets NDR to 1.
If you store the data in an "optimized" DB (symbolic only), you can receive data only in
arrays of Byte, Char, USInt, and SInt data types.
Note
Importing of S7-300/400 STEP 7 projects containing "ad hoc mode" into the S7-1200
In S7-300/400 STEP 7 projects, "ad hoc mode" is selected by assigning "0" to the LEN
parameter. In the S7-1200, you set "ad hoc mode" by assigning "65535" to the LEN
parameter.
If you import an S7-300/400 STEP 7 project containing "ad hoc mode" into the S7-1200, you
must change the LEN parameter to "65535".
Table 10- 14 ERROR and STATUS condition codes for TSEND and TRCV
ERROR
STATUS
Description
0
0000
Send job completed without error (TSEND)
New data accepted: The current length of the received data is shown in RCVD_LEN
(TRCV).
0
7000
No job processing active (TSEND)
Block not ready to receive (TRCV)
0
7001
Start of job processing, data being sent: During this processing the operating
system accesses the data in the DATA send area (TSEND).
Block is ready to receive, receive job was activated (TRCV).