103BCommunication
10.2 PROFINET
S7-1200 Programmable controller
408
System Manual, 11/2011, A5E02486680-05
TCON, TDISCON, TSEND, AND TRCV
Ethernet communication using TCP and ISO on TCP protocols
Note
TSEND_C and TRCV_C instructions
To help simplify the programming of PROFINET/Ethernet communication, the TSEND_C
instruction and the TRCV_C instruction combine the functionality of the TCON, TDISCON.
TSEND and TRCV instructions:
TSEND_C combines the TCON, TDISCON and TSEND instructions.
TRCV_C combines the TCON, TDISCON and TRCV instructions.
The following instructions control the communication process:
●
TCON establishes the TCP/IP connection between the client and server (CPU) PC.
●
TSEND and TRCV send and receive data.
●
TDISCON breaks the connection.
The minimum size of data that you can transmit (TSEND) or receive (TRCV) is one byte; the
maximum size is 8192 bytes. TSEND does not support the transmission of data from
boolean locations, and TRCV will not receive data into boolean locations. For information
transferring data with these instructions, see the section on data consistency (Page 143).
TCON, TDISCON, TSEND, and TRCV operate asynchronously, which means that the job
processing extends over multiple instruction executions. For example, you start a job for
setting up and establishing a connection by executing an instruction TCON with parameter
REQ = 1. Then you use additional TCON executions to monitor the job progress and test for
job completion with parameter DONE.
The following table shows the relationships between BUSY, DONE, and ERROR. Use the
table to determine the current job status.
Table 10- 7 Interactions between the BUSY, DONE, and ERROR parameters
BUSY
DONE
ERROR
Description
TRUE
irrelevant
irrelevant
The job is being processed.
FALSE
TRUE
FALSE
The job successfully completed.
FALSE
FALSE
TRUE
The job was ended with an error. The cause of the error can be found in the
STATUS parameter.
FALSE
FALSE
FALSE
A new job was not assigned.