Omron CJ1W-ETN21 Network Card User Manual


 
183
FINS/TCP Method Section 7-4
Recovery Connection
Sequence when Host
Computer (WS) is Stopped
by an Error
1,2,3... In steps 1 to 4 the FINS message send and receive processing is performed
using the FINS FRAME SEND command.
5. This example assumes that the host computer’s power is unexpectedly in-
terrupted. The normal close processing cannot be performed at the host
computer, and an attempt is made to establish a TCP connection at startup
of the application after the power is turned ON again.
6. After establishing a TCP connection, the client sends the client node ad-
dress to the server using the FINS NODE ADDRESS DATA SEND (CLI-
ENT TO SERVER) command.
7. From the received command, the client’s node address is confirmed. At
this time, the server determines that an attempt is being made to establish
a connection with the same node address (see note), and detects a con-
nection error.
8. The server sends a CONNECTION CONFIRMATION command to the cli-
ent.
9. The client has lost the connection information from before the power inter-
ruption, so sends a response with an RST frame in the TCP layer. The
server that received the RST response closes the connection.
10. The server sends the error code (00000021 hexadecimal: Specified node
is already connected) to the client using the FINS NODE ADDRESS DATA
SEND (SERVER TO CLIENT) command.
11. The error code in the received command is also decoded by the client, and
the TCP/IP port is closed.
recv
send
send
recv
recv
send
ACK
ACK
connect
send
recv
send
SYN
SYN, ACK
ACK
ACK
accept
RST
FIN
FIN
ACK
close
close
close
Connection error check
accept
connect
ACK
Client
Server
Power
interruption
Connection is closed using TCP/IP protocol procedure.
A
B
C
D
E
F
G
H
I
J
K
L