Communications Instructions; Open Ethernet Communication - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Programming instructions
6.2 Extended instructions
6.2.5

Communications instructions

6.2.5.1

Open Ethernet Communication

Open Ethernet communication with automatic connect/disconnect (TSEND_C and TRCV_C)
Note
The processing of the TSEND_C and TRCV_C instructions can take an undetermined
amount of time. To ensure that these instructions are processed in every scan cycle, always
call them from within the main program cycle scan, such as from a program cycle OB or from
a code block that is called from the program cycle scan. Do not call these instructions from a
hardware interrupt OB, a time-delay interrupt OB, a cyclic interrupt OB, an error interrupt OB,
or a startup OB.
For information transferring data with these instructions, see the section on data consistency
(Page 86).
TSEND_C description
TSEND_C establishes a TCP or ISO on TCP communication connection to a partner station,
sends data, and can terminate the connection. After the connection is set up and
established, it is automatically maintained and monitored by the CPU. TSEND_C combines
the functions of TCON, TDISCON and TSEND.
The minimum size of data that you can transmit with the TSEND_C instruction is a byte.
Note
The default setting of the LEN parameter (LEN = 0) uses the DATA parameter to determine
the length of the data being transmitted. Ensure that the DATA transmitted by the TSEND_C
instruction is the same size as the as the DATA parameter of the TRCV_C instruction.
The following functions describe the operation of the TSEND_C instruction:
● To establish a connection, execute TSEND_C with CONT = 1.
● After successful establishing of the connection, TSEND_C sets the DONE parameter for
● To terminate the communication connection, execute TSEND_C with CONT = 0. The
● To send data over an established connection, execute TSEND_C with a rising edge on
● To establish a connection and send data, execute TSEND_C with CONT =1 and REQ =
154
one cycle.
connection will be aborted immediately. This also affects the receiving station. The
connection will be closed there and data inside the receive buffer could be lost.
REQ. After a successful send operation, TSEND_C sets the DONE parameter for one
cycle.
1. After a successful send operation, TSEND_C sets the DONE parameter for one cycle.
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents