Tcon, Tdiscon, Tsend, And Trcv (Tcp Communication) Instructions - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

10.2.2.6

TCON, TDISCON, TSEND, and TRCV (TCP communication) instructions

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 178).
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- 6
Interactions between the BUSY, DONE, and ERROR parameters
BUSY
DONE
TRUE
irrelevant
FALSE
TRUE
FALSE
FALSE
FALSE
FALSE
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
ERROR
Description
irrelevant
The job is being processed.
FALSE
The job successfully completed.
TRUE
The job was ended with an error. The cause of the error can be found in the
STATUS parameter.
FALSE
A new job was not assigned.
Communication
10.2 PROFINET
527

Advertisement

Table of Contents
loading

Table of Contents