×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 67196808, Entry date: 02/16/2017
(8)
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/S7-1500 CPU?

  • Entry
  • Associated product(s)
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/S7-1500 CPU.

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

InstructionDescription
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

Table 1

The following protocols 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 two ISO-on-TCP connections for data exchange between an S7-1200 CPU and an S7-1500 CPU. The connection parameters for establishing the ISO-on-TCP connection are saved in the "General Data" data block.

The document below describes the program example for the S7-1200 CPU.

 Registrierung notwendig  net_s7-1200_isoontcp_en.pdf (1016,9 KB)

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

 Registrierung notwendig  Ouc_S7-1200_S7-1500.zip (1,1 MB)

Further 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.
 

ManualEntry ID
STEP 7 Basic/Professional V15.1 and SIMATIC WinCC V15.1109755202 
SIMATIC S7 S7-1200 Automation System109741593

Table 2

Creation Environment

The screens and downloads in this FAQ response were created with STEP 7 (TIA Portal) V15.
Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.