Omron CJ1W-ETN21 operation manual 183

Models: CJ1W-ETN21

1 242
Download 242 pages 30.9 Kb
Page 207
Image 207

FINS/TCP Method

Section 7-4

Recovery Connection Sequence when Host Computer (WS) is Stopped by an Error

Client

Server

send

A

B

 

ACK

recv

 

C

send

acceptaccept

recv

D

ACK

Power

interruption E

connect SYN

ACK

F

send

I

RST

K

recv

FIN

close

ACK

SYN, ACK

G

ACK

H

send

close

J

FIN

recv

Connection error check

send

close

L connect

Connection is closed using TCP/IP protocol procedure.

ACK

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.

183

Page 207
Image 207
Omron CJ1W-ETN21 operation manual 183