![Omron CS1W-ETN01 Скачать руководство пользователя страница 106](http://html1.mh-extra.com/html/omron/cs1w-etn01/cs1w-etn01_operation-manuals_742528106.webp)
6-2
Section
Using Socket Services with Socket Service Request Switches
94
•
The Ethernet Unit TCP sockets have no KEEP ALIVE function to check that the
connection is normal if communications do not occur for a set time period
through a communications line for which a connection has been established.
The Ethernet Unit’s TCP sockets make no checks to the socket at the other
node. Checks made by the remote node, however, are received as responses,
so that it is not necessary for the user program to consider the KEEP ALIVE
function.
•
Send and reception processing can not be performed at the same time when
Socket Service Request Switches are used for socket services because there
is only one Socket Service Parameter Area for each socket. For example, if the
Send Request Switch is turned ON when data is being received, the response
code will be 110C Hex, indicating that a Request Switch was turned ON during
communications processing. (The response code for the reception will over-
write this code when processing has been completed.)
•
If more than one Request Switch is turned ON simultaneously, the response
code will be 110C Hex and all requested processing will end in an error.
•
Close processing can be performed, however, even during open, send, or re-
ceive processing. This enables emergency close processing. Also, the only
parameter required for close processing is the socket number, so a socket can
be closed even when parameters are set for another process.
6-2
Using Socket Services with Socket Service Request
Switches
Socket services can be used by setting the parameters in a Socket Service Pa-
rameter Area in the CPU Bus Unit Area and then turning ON a Socket Service
Request Switch.
When using Socket Service Request Switches, a maximum of 8 sockets can be
opened simultaneously for the UDP and TCP combined. Also, the same socket
number cannot be used simultaneously for both UDP and TCP. (There is only
one Socket Service Parameter Area for each socket, i.e., the same area must be
used for both UDP and TCP.)
An illustration of using Socket Service Request Switches to execute socket ser-
vices is provided below.
CS1-series PC
CPU Unit
Ethernet Unit
Socket Service
Request Switches
Socket Service
Parameters
Refreshed
(See Note 1.)
Refreshed
(See Note 2.)
TCP data
transfers
UDP data
transfers
Host computer or other device
System
call
User program
Sockets
Sockets
Note
1. Socket Service Request Switches in the CPU Bus Unit Area in the CIO Area
are used to send a service request from the CPU Unit to the Ethernet Unit.
2. The Socket Service Parameters in the CPU Bus Unit Area in the DM Area
are used to specify the service being requested from the Ethernet Unit. The
CPU Bus Unit Area in the DM Area is also used to receive results of process-
ing from the Ethernet Unit to the CPU Unit.
Precautions in Using
Socket Service Request
Switches