
FINS/TCP Method | Section |
FINS/TCP Frame Format
•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).
The following diagram shows the structure of a TCP packet sent over an Ethernet network.
Ethernet V.2
IP
TCP
FINS/TCP header
FINS frame
FCS
TCP packet
TCP Port Number for
FINS/TCP
FINS/TCP Connection Numbers
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 (Ethernet Unit default: 1,024 bytes, with automatic adjustment for optimum values between the nodes) is split into TCP packets for transmis- sion. The split TCP data tends to be 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 appropri- ate frames are separated out automatically. When constructing applications using the TCP/IP socket interface on the host computer, processing is required to separate out the FINS frames.
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 Ethernet Unit’s 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 received frame.
The host application is normally used as the FINS/TCP client. A
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
172