5 - 26
MELSEC-F
COMMUNICATION PROCEDURE5
5 - 26
(2) Close processing
(a) The purpose of the close processing is to disconnect (cancel) the connection
with the external device established by open processing mentioned
previously.
(b) The close processing is used when terminating a connection with an
external device, changing an external device of a connection, changing
communication conditions, etc.
(c) Perform the close processing for connections established by open
processing using sequence programs.
(d) Determine the timing of close processing with the external device.
The examples in the following sections describe the procedures for establishing a
connection from the Ethernet module to an external device and subsequently closing
it again by open and close processing for connection number 1.
• TCP/IP Active open : See 5.6.1, "Active open processing/close processing".
• TCP/IP Passive open : See 5.6.2, "Passive open processing/close processing".
• UDP/IP Open : See 5.6.3, "UDP/IP open processing/close processing".
POINT
Except when the close processing is requested, the open completion signal
(applicable bit of BFM#20480) automatically turns off and the communication line
is closed in the following cases:
(1) When the existence confirmation function times out (see Section 5.5).
(2) When a close or RST command is received from an external device.
(3) When the Active open request is received again from the external device in
the open completion status of TCP.
After returning ACK to the external device, the Ethernet module closes the
connection when the RST command is received from the external device.
However, when receiving the Active open request again from the external
device with a different IP address or port No., the Ethernet module only sends
the RST command. (It does not close the connection.)