Additional Information; Programming Data Transfer On Tcp Connections - Siemens SIMATIC NET S7-300 Manual

Cps for industrial ethernet
Hide thumbs Also See for SIMATIC NET S7-300:
Table of Contents

Advertisement

4.4

Additional Information

4.4.1

Programming 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 ISO-on-TCP connections! The following sections explain certain
special points to note.
Special Features
S Block types (FC calls)
Use only the following functions (FCs) for data transmission:
- With the older S7-CPs for S7-300, you must use FCs AG_LSEND (FC 50)
and AG_LRECV (FC 60) on TCP connections!
- With the latest S7-CPs for S7-300, you also use FCs AG_SEND (FC 5) and
AG_RECV (FC 6) for TCP connections.
S Frame 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. Initially, you should only evaluate the length information on the
receiving station. 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.
S7-CPs for Industrial Ethernet Configuring and Commissioning
Release 01/2007
C79000-G8976-C182-07
4 SEND/RECEIVE Interface in the User Program
A -97

Advertisement

Table of Contents
loading

Table of Contents