![background image](http://html1.mh-extra.com/html/omron/cs1w-etn01/cs1w-etn01_operation-manuals_742528129.webp)
6-2
Section
Using Socket Services with Socket Service Request Switches
117
UDP Receive
When the UDP Receive Bit (CIO 000003) turns ON, the
UDP Receive Error Flag (CIO 000103) is turned OFF and
the UDP Receiving Flag (CIO 000203) is turned ON to
initialize processing.
If the Send Request Switch (CIO 151903) turns OFF while
the UDP Sending Flag (CIO 000200) is OFF, the contents
of the response code (D30027) in the Socket Service Pa-
rameter Area is checked, and if it is not 0000 Hex (normal
end), the UDP Send Error Flag (CIO 000102) is turned ON.
After the execution results have been checked, the UDP
Send Bit (CIO 000002) is turned OFF.
After the parameters have been set, the Send Request
Switch (CIO 151903) is turned ON and the UDP Sending
Flag (CIO 000202) is turned OFF.
Continued from previous page.
MOV(21)
#0001
D30018
000002
000202
MOV(21)
#C424
D30020
MOV(21)
#2037
D30021
MOV(21)
#1000
D30022
SET
151903
000002
RSET
000202
000202
@RSET
000103
000003
@SET
000203
SET
000102
000002
000202
151903
<>(305)
D30027
#0000
RSET
000002
000002
000202
151903
Continued on next page.
MOV(21)
#0064
D30023
MOV(21)
#8200
D30024
MOV(21)
#0000
D30025
When the UDP Sending Flag (CIO 000202) turns ON, the
following parameters are written to the parameter area for
socket number 1.
D30018: 0001 Hex = UDP/TCP socket No. 1
D30020 and D30021:
C424 2037 Hex =
Remote IP address 196.36.32.55
D30022: 1000 Hex = Remote UDP/TCP port No. 4096
D30023: 0064 Hex = No. of send/receive bytes is 100
D30024 and D30025:
8200 0000 Hex =
Send/receive data address D00000