Comparison of FINS-UDP and FINS-TCP
| Item | FINS-UDP | FINS-TCP |
|---|---|---|
| Connection | Not needed | Required |
| Speed | Fast | Somewhat slow |
| Reliability | Normal | High |
| Number of connections | Unlimited | Max. 16 |
Should You Choose FINS-UDP or FINS-TCP?
On a factory LAN
For communicating with PLCs on the same LAN, FINS/UDP is common. It is fast and easy to set up.
Over a VPN or the internet
When reliability matters, FINS/TCP is suitable.
Comparison
FINS-UDP
FINS-TCP
-
Characteristics
Because it is a connectionless protocol, when the PC sends data to the PLC it sends it one-way regardless of whether the PLC is there
- Connectionless, so there is no limit on the number of connections
- Broadcast can be used
- Reliability drops when communicating across multi-level IP networks (e.g. the internet)
- No connection procedure, so the time it takes is saved (fast) -
Characteristics
Because it is a connection-oriented protocol, a connection is requested and established before the PC sends messages to the PLC
- Limited number of connections
- Broadcast cannot be used
- Reliable even across multi-level IP networks (e.g. the internet)
- The connection procedure makes processing take longer than UDP/IP
- The clients that can connect can be restricted in the server settings
-
- Frame structure
Ethernet2 IP UDP FINS FCS
-
- Frame structure
Ethernet2 IP TCP FINS/TCP
headerFINS FCS
-
UDP port number
The PLC port number defaults to 9600 (changeable)
The PC port number can be anything, but using 9600 like the PLC makes it easy to understand
-
TCP port number
← same as UDP
-
Connectionless
-
TCP connections
FINS/TCP connections on the PLC:
max. 16 (simultaneous)
-
Communication procedure
Sends FINS frames directly with no preparation
-
Communication procedure
1. Establish the TCP connection
2. Exchange FINS node address information
The PC sends with node address = 0 and receives a free FINS node address (automatically allocated FINS node address)
3. Send FINS frames using the obtained FINS node address
-
Automatically allocated FINS address
The node address is obtained with the FINS node address data send command
Send commandHeader "FINS" Length 0x0000000c Command 0x00000000 ErrorCode 0x00000000 ClientNodeAddress 0x00000000
Receive commandHeader "FINS" Length 0x00000010 Command 0x00000001 ErrorCode 0x00000000 ClientNodeAddress 0x00000001-0x000000fe ServerNodeAddress 0x00000001-0x000000fe
-
FINS/TCP header
With FINS/TCP, a FINS/TCP header is added before the FINS frame
Header "FINS" Length 0x00000014-0x000007e4 Command 0x00000002 ErrorCode 0x00000000 FINS frame Length is the number of bytes from Command to the end of the FINS frame
Frame examples
| FINS header | FINS command | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ICF | RSV | GCT | DNA | DA1 | DA2 | SNA | SA1 | SA2 | SID | MRC | SRC | TEXT | |
| (Example) | 80 | 00 | 02 | 00 | 01 | 00 | 00 | 0A | 00 | 01 | 05 | 01 | - |
| FINS/TCP header | FINS header | ||||||
|---|---|---|---|---|---|---|---|
| Header | Length | Command | ErrorCode | ICF | RSV | GCT | |
| (Example) | "FINS" | 00000014 | 00000002 | 00000000 | 80 | 00 | 02 |
| FINS header (continued) | FINS command | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| DNA | DA1 | DA2 | SNA | SA1 | SA2 | SID | MRC | SRC | TEXT | |
| 00 | 01 | 00 | 00 | 0A | 00 | 01 | 05 | 01 | - | |
Related pages
FAQ
Should I choose FINS-UDP or FINS-TCP?
For communicating with PLCs on the same LAN, FINS/UDP is common because it is fast and easy to set up. FINS/TCP is suitable when communication reliability matters, such as over a VPN or the internet.
What are the characteristics of FINS-UDP?
FINS-UDP is connectionless and fast because no connection procedure is needed. Broadcast is possible and there is no limit on the number of connections.
What are the characteristics of FINS-TCP?
FINS-TCP is connection-oriented and communicates after a connection is established. It is highly reliable and supports automatic allocation of FINS node addresses.
