Application Procedure - Omron CS1W-ETN01 Operation Manuals

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

Advertisement

Using Socket Services with Socket Service Request Switches

6-2-5 Application Procedure

Procedure
1, 2, 3...
CPU Bus Unit Area in the CIO Area
Socket Service
Request Switches 2
Socket Service
Request Switches 8
106
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.
1. Set the socket service parameters in the CPU Bus Unit Area in the DM Area.
m = D30000 + (100 x unit number)
CPU Bus Unit Area in the DM Area
15
m+18
Socket Service Parameter Area 1
m+28
Socket Service Parameter Area 2
m+88
Socket Service Parameter Area 8
2. Turn ON the Socket Service Request Bits in the CPU Bus Unit Area in the
CIO Area.
Socket Service
Request Switches 1
Close Request
Switch
Receive Request Switch
Socket Service
Send Request Switch
Request Switches 7
3. When a send or receive request is made, the data will be automatically sent
or received according to the send/receive data address in the Socket Ser-
vice Parameter Area. When processing has been completed, a response
code will be automatically stored in the Socket Service Parameters.
Number of bytes to send/receive
Send/receive data address
Precautions
A Socket Service Parameter Area cannot be used for other sockets once open
processing has been successfully completed for it. Check the socket status be-
fore attempting to open a socket. TCP socket status is provided in words m+9 to
m+16 in the DM Area for sockets 1 to 8.
TCP Connection Status
The TCP connection status is provided for ports for which TCP sockets have
been opened. When a port is closed, the previous status will remain in the DM
0
UDP Open Request Switch
TCP Passive Open Request Switch
TCP Active Open Request Switch
I/O memory
Response code
Stored
Section
Parameters
UDP/TCP socket No.
Local UDP/TCP port No.
Remote IP address
Remote UDP/TCP port No.
Number of bytes to send/receive
Send/Receive data address
Time out time
Response code
Send
or
Receive
6-2

Advertisement

Table of Contents
loading

Table of Contents