6-2
Section
Using Socket Services with Socket Service Request Switches
108
The flow is similar for other socket services. Replace the names of the appropri-
ate flags in the flowchart to adapt it to other socket services.
Check Socket Open Flag.
Start UDP Open
OFF?
The specified UDP socket is
already open.
Program Flow
Is Bit 15 (Open Flag) in the socket status word for
the socket being used OFF?
(Checks to see if the socket is open before com-
munications and close processing.)
YES
Error Evaluation
UDP socket opened
NO
Turn ON UDP Open Request Switch.
This Socket Service Request Switch is used to request
opening of a UDP socket to the Ethernet Unit.
Confirm end of processing
0000?
YES
NO
ON/OFF?
OFF
This Socket Service Request Switch that was turned
ON will be turned OFF by the Ethernet Unit when
processing has been completed.
Check response code.
Is the response code 0000, indicating a normal end?
An error occurred. The specified
socket could not be opened.
6-2-7 Timing Charts
The timing of flags for socket services (Opening, Receiving, Sending, or Closing
Flag) when the Request Switches are used and the changes in the response
code are shown in the following chart.
Request
Switch
Response
code
Flag
Response code stored
Request Switch
turned ON.
Request
accepted.
Not synced with
Request Switch.
The Close Request Switch or Force-close Switch can be used to close a socket
even when open, receive, or send processing is being executed. Closing is the
only other process that is possible during other processes.
Closing during Other
Processes