TCP_CNX DFB
(Original Document)
Overview
The TCP_CNX DFB manages the connections with remote clients as well as the operating modes of the connections. A TCP_CNX DFB is informed of breaks in connections by a TCP_SEND or TCP_RECEIVE DFB via the status of the management words. Only one TCP_CNX DFB instance exists for a TSX ETY 110 WS/5103 module.
Input Parameters
Parameter
Type
Description
RST
bit
Setting this input to 1:
  • interrupts the exchanges in progress
  • closes all connections
Input/Output Parameters
Parameter
Type
Description
MANAGNT
word table
Management table common to all DBFs
Output Parameters
Parameter
Type
Description
ERROR
bit
This output bit is set to 1 if the exchange is not carried out correctly.
The status word indicates the type of error that has occurred.
Internal Public Data
Parameter
Type
Write/Read Variables
Description
DEVICE
word
W
Module number.
Number of the physical slot where the TSX ETY 110 ES/5103 module is located in the rack.
PORT
word table
W
Local port number No. i.
Table of 16 local service ports to be listened to (signed value ≥ 5010). The value 0 indicates a non-significant value.
IPACCEPT
double word
W
IP address of the remote machine No. i.
Word 4-byte IP address table from table 8. Remote machines authorized to connect to the PLC. The value 9 indicates a non-significant value.
EOM
byte
W
End of Message character.
This parameter defines the presence and the value of an End of Message character to be used in the message exchanges:
  • EOM = 0: no End of Message character
  • EOM from 0x01 to 0xFF: value of End of Message character:
    • added by the module during transmission
    • checked and deleted by the module during reception
IPCNXi
character string
R
IP address of the remote machine No. i.
Read-only character string to be used for maintenance only. Indicates the IP address of the remote machine in the format aaa.bbb.ccc.ddd connected to the port with index i in the configuration. The value 0.0.0.0 indicates that no machine is connected to this port.
ACTIVITY
bit
R
This output bit is at 1 when the DFB is in progress and needs to be maintained. It is set to 0 with a warm or cold restart or a DFB RESET.
STATUS
word
R
This word is only meaningful if the ERROR output bit is set to 1. It indicates the code of the error that occurred during the exchange. (Each word bit set to 1 indicates an error.)
Operation
The TCP_CNX DFB must be called at each turn of the PLC cycle to ensure permanent management of the TCP ports.
Listening to the configured ports starts if the RST and ACTIVITY bits are set to 0. Then, the ACTIVITY bit remains at 1 until the application allows the RST bit to return to 0.
If communication with the module is not correct, the output ERROR bit is set to 1.
At any time, setting the RST bit (priority input) to 1 enables all the connections in progress or on standby to be interrupted. The ACTIVITY bit (exchange finished) is set to 0, and the ERROR bit is set to 1. The status word <TCP_CNX instance name>.STATUS indicates the type of error.
At a cold or warm restart, the TCP_CNX DFB automatically returns to listen mode for the configured ports.