
Overview of Socket Communications from Ethernet Units | Section |
6-1 Overview of Socket Communications from Ethernet Units
6-1-1 What are Sockets?
Sockets are interfaces that allow TCP and UDP protocols to be used directly from the user program. With personal computers, socket are provided as C language interface libraries, which allow TCP or UDP protocols to be programming using library functions. With UNIX computers, socket interfaces are supported in the form of system calls.
The
Socket communications services can be used to transfer arbitrary data between a PLC and a host computer or between two PLCs. The Ethernet supports two socket services: a UDP socket service and a TCP socket service.
■Using Sockets with the Ethernet Unit
The Ethernet Unit supports up to 16 simultaneous socket connections for the socket services, 8 each for UDP and TCP sockets.
Socket numbers 1 to 8 are assigned to sockets for both UDP and TCP sockets. Sockets are managed from the
Socket ports are assigned to socket
UDP socketnumbers. port 1
UDP socket 1
Sockets
UDP open request
Socket services
TCP socket 8
TCP socket port 65535
6-1-2 Socket Port Numbers
Port numbers up to 1023 on a UNIX workstation can be used by the superuser only. Port numbers 0 to 255 are reserved for
Some port numbers over 1024 may be reserved on some workstations (for example, the
The setting status of the UNIX workstation port numbers can be checked in / etc/services.
99