beautypg.com

Omron CS1W-ETN21 User Manual

Page 144

background image

119

FINS/TCP Method

Section 6-3

• Once a FINS/TCP connection (connection number, remote IP address)

has been set in the Unit Setup, it can be dynamically changed from the
ladder program using a FINS command (i.e., FINS/TCP CONNECTION
REMOTE NODE CHANGE REQUEST).

FINS/TCP Frame Format

The following diagram shows the structure of a TCP packet sent over an
Ethernet network.

As the diagram shows, a nested structure is used with the FINS/TCP method,
i.e., Ethernet Ver. 2, IP frame, TCP frame, FINS/TCP header frame, and FINS
frame. A TCP data section (FINS/TCP header + FINS frame) that exceeds the
segment size (default: 1,024 bytes, with automatic adjustment for optimum
values between the nodes) is split into TCP packets for transmission. The split
TCP data is then joined automatically at the remote node's TCP/IP protocol
layer. The TCP/IP protocol layer, however, cannot determine where the data
has been split, so the TCP data sections from multiple packets are all joined
together. Therefore, when using the FINS/TCP method, FINS/TCP headers
must be added at the beginning of FINS frames in order to serve as FINS
frame delimiters. The length of the data in the following FINS frame is stored
in the header, allowing the frame to be separated out by the remote node.
With the Ethernet Unit and FinsGateway Ver. 2003 the appropriate frames are
separated out automatically, so there is normally no need to be pay attention
to it at the application layer.

TCP Port Number for
FINS/TCP

The TCP port number is the number for TCP to identify the application layer
(i.e., the FINS communications service in this case). When communications
are executed using TCP/IP, this port number must be allocated for the com-
munications service.

The default setting for the FINS/TCP local TCP port number (i.e., the Ethernet
Unit's TCP port number) is 9600. To set another number, make the setting for
the FINS/TCP port using the Setup Tab in the Unit Setup.

The FINS/TCP port number set in the Unit Setup is used by the FINS/TCP
server's TCP socket. The FINS/TCP client's TCP socket uses any TCP port
number that can be used at that node. (With the Ethernet Unit and FinsGate-
way Ver. 2003, an unused TCP port is automatically detected and utilized.)

At the Ethernet Unit, a TCP/IP frame that is received is recognized as a FINS
frame, according to the remote TCP port number in the frame.

FINS/TCP Connection
Numbers

FINS/TCP allows up to 16 FINS/TCP connections to be established simulta-
neously, and these 16 connections are managed at the Ethernet Unit by con-
nection numbers. When setting connections by means of the FINS/TCP
settings in the CX-Programmer's Unit Setup, set them individually using these
connection numbers.

Ethernet Ver. 2

IP

TCP

FINS frame

FCS

FINS/TCP header

TCP packet