Omron CS1W-ETN21 Network Card User Manual


 
136
Using Socket Services with CMND(490) Section 6-8
6-8 Using Socket Services with CMND(490)
6-8-1 Using Socket Service
Each Ethernet Unit has eight TCP sockets and eight UDP sockets. Open,
close, send, and receive processes are available for communications with
sockets.
Open
Enables communications on a specified socket. A socket must be opened
before it can be used for socket services. Opening a TCP socket establishes a
connection.
Close
Ends use of the socket. Breaks the connection for a TCP socket.
Send
Sends data from a specified open socket.
Receive
Specifies an open socket and receives data from that socket.
These processes are carried out by sending FINS commands to the Ethernet
Unit. The process from sending a request for processing to completion is
shown in the following illustrations.
1,2,3... 1. Execute a socket service request command (MRC: 27) for the Ethernet
Unit using CMND(490).
2. CMND(490) ends normally when the socket service request command is
received and a response is returned (response code: 0000).
3. The Ethernet Unit starts the process requested by the parameters in the
socket service request command.
Socket service
Request
command
CPU
User program
Ethernet Unit
CMND
END
Ethernet Unit
Response
CPU
User program
CMND
END