EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 853

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Communication
11.2 PROFINET
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
853
TRCV_C operations
The following functions describe the operation of the TRCV_C instruction:
To establish a connection, execute TRCV_C with parameter CONT = 1.
To receive data, execute TRCV_C with parameter EN_R = 1. TRCV_C receives the data
continuously when parameters EN_R = 1 and CONT = 1.
To terminate the connection, execute TRCV_C with parameter CONT = 0. The
connection will be aborted immediately, and data could be lost.
TRCV_C handles the same receive modes as the TRCV instruction. The following table
shows how data is entered in the receive area:
Table 11- 17 Entering the data into the receive area
Protocol vari-
ant
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 param
eter. 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.
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 of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals