![background image](http://html1.mh-extra.com/html/omron/cs1w-etn01/cs1w-etn01_operation-manuals_742528107.webp)
6-2
Section
Using Socket Services with Socket Service Request Switches
95
After setting the required parameters in a Socket Service Parameter Area in the
CPU Bus Unit Area in the DM Area, the Socket Service Request Switches can be
used to request opening, sending, receiving, or closing for either the UDP or
TCP protocol. When requesting a send, send data at the send/receive data ad-
dresses set in the parameter area is sent. When requesting a reception, data is
received to the send/receive data addresses set in the parameter area.
6-2-1 Socket Service Parameters
The Socket Service Parameter Areas in which parameters are set to request
socket services is in the CPU Bus Unit Area in the DM Area of the CPU Unit. The
Socket Service Parameter Areas are allocated as shown in the following dia-
grams. The first word of in the DM Area allocated to the Ethernet Unit as a CPU
Bus Unit is referred to as “m” and is computed as follows:
m = (100 x unit number)
Socket Service Parameter Area 1
Socket Service Parameter Area 8
Socket Service Parameter Area 2
m+18
m+27
m+28
m+37
m+88
m+97
The configuration of each of the Socket Service Parameter Areas is shown in the
following diagram.
Offset
UDP/TCP socket number (0001 to 0008 Hex)
Local UDP/TCP port number (0000 to FFFF Hex)
Remote IP address (00000000 to FFFFFFFF Hex)
Number of bytes to send/receive (0000 to 07C0 Hex)
Send/receive data address
Timeout value (0000 to FFFF Hex)
Response code
Remote UDP/TCP port number (0000 to FFFF Hex)
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9