Omron CS1W-ETN21 Receiving Flag Bit, Sending Flag Bit, Closing Flag Bit, Data Received Flag Bit

Models: CS1W-ETN21

1 285
Download 285 pages 16.7 Kb
Page 106
Image 106

CIO Area Allocations

Section 4-1

Receiving Flag (Bit 1)

Turns ON when a receive request is received either by control bit manipulation or the CMND(490) instruction, and turns OFF again when the receive pro- cessing has been completed. When CMND(490) is used, the Results Storage Error Flag (bit 14) will turn ON at the same time as the Receiving Flag turns OFF if there is an error in the Results Storage Area designation.

Sending Flag (Bit 2)

Turns ON when a send request is received either by control bit manipulation or the CMND(490) instruction, and turns OFF again when the send process- ing has been completed. When CMND(490) is used, the Results Storage Error Flag (bit 14) will turn ON at the same time as the Sending Flag turns OFF if there is an error in the Results Storage Area designation.

Closing Flag (Bit 3)

Turns ON when a close request is received either by control bit manipulation or the CMND(490) instruction, and turns OFF again when the close process- ing has been completed. When CMND(490) is used, the Results Storage Error Flag (bit 14) will turn ON at the same time as the Closing Flag turns OFF if there is an error in the Results Storage Area designation.

Data Received Flag (Bit 13)

This bit turns ON when data is received from a remote node at an open TCP socket. Linked to this flag, the number of bytes of data saved in the reception buffer is stored in Number of Bytes Received at TCP Socket in the words allo- cated in the DM Area. The bit is turned OFF when a receive request is made by either bit manipulation or the CMND(490) instruction. If any data remains in the reception buffer after the receive request processing is complete, the number of bytes is stored in Number of Bytes Received at TCP Socket and the Data Received Flag turns ON again.

The status of this flag is checked before a receive request is executed.

Results Storage Error Flag (Bit 14)

Turns ON if there is an error in the Results Storage Area for a socket service request (open, receive, send, close) made using CMND(490). This flag turns ON at the same time as the services request processing flags (bits 0 to 3) turn OFF. It remains ON until the next services request is received, and then it turns OFF again. When this flag turns ON, check the set values in the Results Storage Area.

The Results Storage Error Flag does not operate when socket services are requested by control bit manipulation.

TCP/UDP Open Flag (Bit 15)

Remains ON while a socket is open by means of control bit manipulation or the CMND(490) instruction. In the case of TCP, it indicates a connection. When the socket is closed, this flag turns OFF again. (If the socket did not close properly, the flag remains ON.)

Check to be sure that this flag is ON before executing a send or receive request.

81

Page 106
Image 106
Omron CS1W-ETN21 Receiving Flag Bit, Sending Flag Bit, Closing Flag Bit, Data Received Flag Bit, TCP/UDP Open Flag Bit