SEND/RECEIVE Interface in the User Program
3.4Additional Information
3.4.1Programming Data Transfer on TCP Connections
Purpose of TCP Connections
TCP connections should be used above all for connections to systems of a different type if they do not support RFC1006.
For communication between devices of the SIMATIC family, you should use the more convenient
Special Features
SBlock types (FC calls)
Use only the following functions (FCs) for data transmission:
–With the
–With the latest
SFrame length
On the TCP connections, the protocol contains no information about the end of a message and start of a new message.
The receiving station must therefore know how many bytes belong to a message and transfer an ANY pointer corresponding exactly to this length when FC AG_LRECV is called. (Example: if 100 bytes of data are always transferred, the ANY pointer could appear as: P#DB100.DBX 0.0 Byte 100)
If you want to receive data with a variable length, follow the steps below:
Include information on the length of the user data in the frame before the actual user data. In the receiving station, you evaluate only the length information and then fetch the appropriate amount of data in a further receive job. Fetch the appropriate length of user data in another receive job by specifying an ANY pointer of the required length on the FC interface for fetching the actual user data.
80 | SIMATIC NET NCM S7 for Industrial Ethernet |