Entry type: FAQ, Entry ID: 67196808, Entry date: 01/29/2013
(1)
Rate

How do you program the TSEND_C and TRCV_C instructions for open user communication over the integrated PROFINET interface of the S7-1200 CPU?

  • Entry
  • Associated product(s)

Description
You can use the open communication by means of the TSEND_C and TRCV_C instructions for data exchange over the integrated PROFINET interface of the S7-1200 CPU.

In STEP 7 V11 SP2 (TIA Portal) you will find the TSEND_C and TRECV_C instructions in the "Instructions" task card in the "Communication > Open User Communication" palette.
 

Instruction Description
TSEND_C The TSEND_C instruction is executed asynchronously and has the functions below:
  • Configure and establish communication connection
  • Send data through the existing communication connection
  • Disconnect communication connection
TRCV_C The TRCV_C instruction is executed asynchronously and has the functions below:
  • Configure and establish communication connection
  • Receive data through the existing communication connection
  • Disconnect communication connection

The protocols below are supported for this:

  • ISO-on-TCP
  • TCP
  • UDP

Description of the sample program
The S7 program contains the call of the "TSEND_C" and "TRCV_C" instructions and the parameterization of an ISO-on-TCP connection for data exchange between two S7-1200 CPUs. The connection parameters for establishing the ISO-on-TCP connection are saved in the DB2 "CONNECT" data block.

The document below describes the sample program.

NET_S7-1200_ISOonTCP_en.pdf ( 1186 KB )

Download
The download includes the "T_COMMUNICATION_S7-1200.zip" project.
Copy the "T_COMMUNICATION_S7-1200.zip" file into a separate directory and then start the file with a double-click. You can then use STEP 7 to open and process the extracted project data.

T_COMMUNICATION_S7-1200.zip ( 2324 KB )

Additional Information
Detailed information about the TSEND_C and TRCV_C instructions and about the parameterization of the communication connection for open user communication is available in the manuals below.
 

Manual Entry ID
STEP 7 Basic V11 SP2 57199536
STEP 7 Professional V11 SP2 57185407
SIMATIC S7-1200 Automation System 36932465

Creation environment
The screens and downloads in this FAQ response were created with STEP 7 Professional V11 SP2 Update 5.