Functional Description
Use the CLOSE_TCP_CNX elementary function block to close open TCP connections.
With a BMX NOE 01•0 communication module in the local rack:
The CLOSE_TCP_CNX function block is compatible with firmware greater than V3.20 only.
If the module uses firmware equal to or less than V3.20, a 16#3104 error code appears, which means the firmware of the module is not up-to-date and is not compatible with the CLOSE_TCP_CNX function block.
The CLOSE_TCP_CNX function block is not compatible with BMX P34 •0•0• M340 processors.
EFB Representation
This is the CLOSE_TCP_CNX elementary function block:

Parameter Description
The following tables describe the parameters in the CLOSE_TCP_CNX elementary function block.
Input parameters:
Parameter |
Data Type |
Description |
---|---|---|
|
|
This array contains the address of the destination entity of the data exchange as a result of the ADDM function. It indicates the module and channel that manage the connection. For example, ADDM(0.3.0) represents channel 0 of the module in slot 3 in rack 0. |
|
|
This string identifies the TCP/IP connection that is closed in this format: |
Input/output parameters:
Parameter |
Data Type |
Description |
---|---|---|
|
ARRAY [0..3] OF |
Exchange management table consisting of these words:
|
Output parameters:
Parameter |
Data Type |
Description |
---|---|---|
|
|
This word provides a detailed status of the service after it executes:
|
Using the EFB
Use the CLOSE_TCP_CNX elementary function block:
Step |
Action |
---|---|
1 |
Set the address of the communication channel that manages the connection in ADR. (Use the ADDM block to specify this address in an explicit string format.) |
2 |
Specify the connection to close in the TCPIP parameter. |
3 |
Call the function to launch the communication (with the EN input pin set to 1, if configured). |
4 |
Monitor the activity bit (in the GEST parameter) until the communication is completed (the activity bit is set to 0 by the system). Execute this function only once to retain the status values. The function is not called when the activity bit is set to 0 (by setting EN pin to 0 for instance). |
5 |
Check the CNX_STATUS word. If CNX_STATUS = 16#FFFF, check the report parameter in GEST[1]. |