Omron CS1W-ETN01 Operation Manuals page 133

Sysmac cs1 series ethernet unit
Hide thumbs Also See for CS1W-ETN01:
Table of Contents

Advertisement

Using Socket Services with CMND(490)
Bit
Flag
15
Socket Open Flag
Response Codes in the Command Response
Response Codes in the Results Storage Areas
Using Socket Service
1, 2, 3...
Status
Manipulated
by
ON
Unit
Turns ON when open processing has been completed (i.e., when
a connection is made).
OFF
Turns OFF when close processing has been completed. (Will
remain OFF when open processing ends in an error.)
Note The TCP socket connection status is also provided as codes in the following
words of the words allocated to the Ethernet Unit in the CPU Bus Unit Area in the
DM Area: D30000 + (100 x unit number) +9 to +16. Refer to TCP Socket Con-
nection Status on page 58 and to Appendix D TCP Status Transitions for details.
A response code is returned in the command response as a 2-byte code that
indicates the results of command execution. The response code is returned just
after the command code in the response. The first byte of the response code
provides the overall result of command execution and is called the main re-
sponse code (MRES). The second byte provides details and is called the sub-re-
sponse code (SRES).
The response code stored in the Results Storage Area is a 2-byte code that indi-
cates the processing results of the socket service requested by the command.
This response code is stored in the Results Storage Area when processing has
been completed.
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 be-
fore it can be used for socket services. Opening a TCP socket establishes a con-
nection.
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. Execute a socket service request command (MRC: 27) for the Ethernet Unit
using CMND(490).
Unit operation
CPU
User program
Socket service
CMND
Request
command
END
Section
6-3
Ethernet Unit
121

Advertisement

Table of Contents
loading

Table of Contents