Open Tcp/Ip Communication - Siemens SIMATIC S7-CPs Manual

Industrial ethernet
Table of Contents

Advertisement

8.12.4

Open TCP/IP communication

Use
To allow the user program to exchange data with other TCP/IP-compliant
communication partners, STEP 7 provides a UDT for the connection parameter
assignment and four FBs.
S UDT 65 "TCON_PAR" with the data structure for connection parameter
assignment
S FB65 "TCON" for connection establishment
S FB66 "TDISCON" for connection termination
S FB63 "TSEND" for sending data
S FB64 "TRCV" for receiving data
TCP/IP communication is connection-oriented. Data can be transmitted only when
a connection has been established to the communication partner. The CPU can
use several connections to a communications partner at the same time.
The following protocol variants are supported:
S ISO on TCP according to RFC 1006
Programming
Make the following parameter settings in the connection description (UDT 65):
S local_tsap_id: Byte 1 = 0xE0 (value mandatory for correct functionality)
S local_tsap_id: Byte 2 = Rack/slot number
S remote_tsap_id: Byte 1 = 0xE0 (value mandatory for correct functionality)
S remote_tsap_id: Byte 2 = Rack/slot number
Note: The TSAPs can be 2−16 bytes long. The first two bytes must be occupied as
described, you can use the other bytes to suit your task.
Notice
Note that the number of dynamically established connections also depends on the
number of configured, statically established connections.
You will obtain appropriate condition codes on the call interface of the FBs.
Please refer to the documentation of the FBs in the online help and in the
documentation for STEP 7. There, you will also find examples of parameter
assignment!
CP 443-1 for Industrial Ethernet / Manual Part B
Release 07/2010
C79000-G8976-C223−06
8 Further Notes on Operation
B−49

Advertisement

Table of Contents
loading

Table of Contents