Before you begin, Socket interface architecture, Number and type of sockets – Rockwell Automation 1768-EWEB EtherNet/IP Web Server Module User Manual User Manual
Page 126
Publication ENET-UM527E-EN-P - October 2006
126 Socket Interface
Before You Begin
Before you use the socket interface, you should be familiar with:
• basic TCP/IP, UDP, and socket programming concepts.
• how to write socket programs in a programming language, such
as C or Visual Basic.
• how to use diagnostic tools, such as a network sniffer.
• the application protocols of the devices and applications with
which the Logix controller will communicate.
• how to write ladder logic or structured text for a Logix
controller.
Socket Interface
Architecture
The socket interface is implemented via the Socket Object in the web
server module. Logix controller programs communicate with the
Socket Object via MSG instructions. MSG requests to the Socket Object
are similar to socket API calls in most computer operating systems.
The Socket Object services let you open connections, accept incoming
connections, send data, and receive data.
To communicate with another device, you must understand the other
device’s application protocol. The web server module has no
application protocol knowledge – it simply makes the socket services
available to programs in Logix controllers.
Number and Type of Sockets
You can create as many as 20 socket instances. Each socket instance
can be one of these socket types:
• UDP socket (to send/receive UDP datagrams)
• TCP client socket (your Logix5000 program initiates the
connection)
• TCP server socket (another device initiates the connection to
your Logix5000 program)
• TCP listen socket (to listen on a specified port number for
incoming connections)
You must have a listen socket for each TCP port number that accepts
connections. Multiple TCP server sockets can share a listen socket if
the connections are made to the same port number.