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?
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.
|TSEND_C||The TSEND_C instruction is executed asynchronously and has the functions below:
|TRCV_C||The TRCV_C instruction is executed asynchronously and has the functions below:
The protocols below are supported for this:
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 )
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 )
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.
|STEP 7 Basic V11 SP2||57199536|
|STEP 7 Professional V11 SP2||57185407|
|SIMATIC S7-1200 Automation System||36932465|
The screens and downloads in this FAQ response were created with STEP 7 Professional V11 SP2 Update 5.