Omron CS1W-ETN01 Operation Manuals page 128

Sysmac cs1 series ethernet unit
Hide thumbs Also See for CS1W-ETN01:
Table of Contents

Advertisement

Using Socket Services with Socket Service Request Switches
Programming Example
000000
000000
000200
000000
000200
000000
000200
151900
000000
000200
151900
000001
000001
000201
000001
000201
000001
000201
151905
000001
000201
151905
000002
Continued on next page.
116
SET
<>(305)
030027
#0000
@RSET
@SET
<>(305)
D30027
#0000
UDP Open
@RSET
When the UDP Open Bit (CIO 000000) turns ON, the UDP
000100
Open Error Flag (CIO 000100) is turned OFF and the UDP
Opening Flag (CIO 000200) is turned ON to initialize pro-
@SET
cessing.
000200
When the UDP Opening Flag (CIO 000200) turns ON, the
MOV(21)
following parameters are written to the parameter area for
#0001
socket number 1.
D30018
D30018: 0001 Hex = UDP/TCP socket No. 1
D30019: 1000 Hex = Local UDP/TCP port No. 4096
MOV(21)
#1000
D30019
After the parameters have been set, the UDP Open Re-
SET
quest Switch (CIO 151900) is turned ON and the UDP
Opening Flag (CIO 000200) is turned OFF.
151900
If the UDP Open Request Switch (CIO 151900) turns
RSET
OFF while the UDP Opening Flag (CIO 000200) is OFF,
000200
the contents of the response code (D30027) in the Socket
Service Parameter Area is checked, and if it is not 0000
Hex (normal end), the UDP Open Error Flag (CIO
000100
000100) is turned ON.
After the execution results have been checked, the UDP
Open Bit (CIO 000000) is turned OFF.
RSET
000000
UDP Close
When the UDP Close Bit (CIO 000001) turns ON, the UDP
Close Error Flag (CIO 000101) is turned OFF and the
000101
UDP Closing Flag (CIO 000201) is turned ON to initialize
processing.
When the UDP Closing Flag (CIO 000201) turns ON, the
000201
following parameter is written to the parameter area for
socket number 1.
D30018: 0001 Hex = UDP/TCP socket No. 1
MOV(21)
After the parameter has been set, the Close Request
#0001
Switch (CIO 151905) is turned ON and the UDP Closing
D30018
Flag (CIO 000201) is turned OFF.
SET
If the Close Request Switch (CIO 151905) turns OFF
while the UDP Opening Flag (CIO 000201) is OFF, the
151905
contents of the response code (D30027) in the Socket
Service Parameter Area is checked, and if it is not 0000
RSET
Hex (normal end), the UDP Close Error Flag (CIO
000201
000101) is turned ON.
After the execution results have been checked, the UDP
SET
Close Bit (CIO 000001) is turned OFF.
000101
RSET
000001
UDP Send
@RSET
When the UDP Send Bit (CIO 000002) turns ON, the UDP
000102
Send Error Flag (CIO 000102) is turned OFF and the UDP
Sending Flag (CIO 000202) is turned ON to initialize pro-
@SET
cessing.
000202
Section
6-2

Advertisement

Table of Contents
loading

Table of Contents