Using Socket Services by Manipulating Dedicated Control Bits

Section 6-7

 

 

 

Start UDP Open.

 

 

 

 

 

 

Program Flow

 

 

 

 

 

 

 

 

 

Check TCP Connection/UDP Open Flag.

 

 

OFF?

 

 

 

 

 

 

NO

Is Bit 15 (Open Flag) in the socket status word for

YES

 

the socket being used OFF?

 

 

 

(Checks to see if the socket is open before com-

 

 

 

munications and close processing.)

 

 

 

 

 

 

 

 

 

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.

 

ON/OFF?

 

 

 

 

 

This Socket Service Request Switch that was turned

OFF

ON will be turned OFF by the Ethernet Unit when

 

 

 

 

processing has been completed.

 

 

 

 

 

0000?

 

 

Check response code.

 

NO

 

 

 

 

 

 

 

Is the response code 0000, indicating a normal end?

YES

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

UDP socket opened.

 

 

 

 

 

 

 

 

Error Evaluation

The specified UDP socket is already open.

An error occurred. The specified socket could not be opened.

114

Page 138
Image 138
Omron CJ1W-ETN21 operation manual Program Flow, Error Evaluation