Technical data

Table Of Contents
Open Communication via Industrial Ethernet
System Software for S7-300/400 System and Standard Functions - Volume 2/2
A5E00739858-01
23-21
23.7 Establishing a Connection with FB 65 "TCON"
Use with TCP native and ISO on TCP
Both communications partners call FB 65 "TCON" to establish the communications
connection. In the parameters you specify which partner is the active
communications transmission point and which is the passive one. For information
on the number of possible connections, please refer to the technical data for your
CPU.
After the connection is established, it is automatically monitored and maintained by
the CPU.
If the connection is interrupted, such as due a line break or due to the remote
communications partner, the active partner attempts to reestablish the connection.
In this case, you do not have to call FB 65 "TCON" again.
An existing connection is terminated when FB 66 "TDISCON" is called or when the
CPU has gone into STOP mode. To reestablish the connection, you will have to
call FB 65 "TCON" again.
Use with UDP
Both communications partner call FB 65 "TCON" in order to configure their local
communications access point. A connection is configured between the user
program and the communications level of the operating system. No connection is
established to the remote partner.
The local access point is used to send and receive UDP message frames.
Function
FB 65 "TCON" is an asynchronously functioning FB, which means that its
processing extends over several FB calls. To start establishing a connection, call
FB 65 with REQ = 1.
The job status is indicated at the output parameters RET_VAL and BUSY.
STATUS corresponds to the RET_VAL output parameter of asynchronously
functioning SFCs (see also Meaning of the Parameters REQ, RET_VAL and BUSY
with Asynchronous SFCs).
The following table shows the relationships between BUSY, DONE and ERROR.
Using this table, you can determine the current status of FB 65 or when the
establishment of the connection is complete.
BUSY DONE ERROR Description
TRUE irrelevant irrelevant The job is being processed.
FALSE TRUE FALSE The job was completed successfully.
FALSE FALSE TRUE The job was ended with an error. The cause of the error can be
found in the STATUS parameter.
FALSE FALSE FALSE The FB was not assigned a (new) job.