![Omron CP1L-EL20DR-D Operation Manual Download Page 244](http://html1.mh-extra.com/html/omron/cp1l-el20dr-d/cp1l-el20dr-d_operation-manual_743755244.webp)
210
Socket Services
Section 6-6
Note
When using the above programming example, change the bit and word
addresses as necessary to avoid using the same areas used by other parts of
the user program or the CPU Bus Unit.
TCP Receive
TCP Send
MOV(021)
#1
D32408
W0.02
MOV(021)
#64
D32413
W2.02
W0.03
SET
A571.04
RSET
W2.03
W2.03
W0.03
SET
W1.03
W2.03
A571.04
<>(305)
D32417
#0
W0.02
RSET
W0.02
W2.02
A571.03
W0.03
@RSET
W1.03
@SET
W2.03
W0.02
@SET
W1.02
W2.02
A571.03
<>(305)
D32417
#0
W0.02
SET
A571.03
RSET
W2.02
W2.02
W0.03
RSET
W0.03
W2.03
A571.04
MOV(021)
#8200
D32414
MOV(021)
#0
D32415
MOV(021)
#1
D32408
W0.03
MOV(021)
#64
D32413
W2.03
MOV(021)
#8200
D32414
MOV(021)
#0
D32415
MOV(021)
#0
D32416
W0.02
@RSET
W1.02
@SET
W2.02
A567.13
=(300)
D32400
&100
When the TCP Send Bit (W0.02) turns ON, the TCP Send Error
Flag (W1.02) is turned OFF and the TCP Sending Flag (W2.02) is
turned ON to initialize processing.
When the TCP Sending Flag (W2.02) turns ON, the following
parameters are written to the parameter area for socket number 1
D32408: 0001 Hex = UDP/TCP socket No. 1
D32413: 0064 Hex = No. of send/receive bytes is 100
D32414 and D32415:
8200 0000 Hex =
Send/receive data address D00000
After the parameters have been set, the Send Request Switch
(A571.03) is turned ON and the TCP Sending Flag (W2.02) is
turned OFF.
If the Send Request Switch (A571.03) turns OFF while the TCP
Sending Flag (W2.02) is OFF, the contents of the response code
(D32417) in the Socket Service Pa-rameter Area is checked, and
if it is not 0000 Hex (normal end), the TCP Send Error Flag
(W1.02) is turned ON.
After the execution results have been checked, the TCP
Send Bit (W0.02) is turned OFF.
When the TCP Receive Bit (W0.03) turns ON, the TCP Receive
Error Flag (W1.03) is turned OFF and the TCP Data
Received/Requested Flag (
A567.13), and the Number of Bytes
Received at TCP Socket (D33400) are checked. If the data is stored
in the buffer, the TCP Receiving Flag (W2.03) turns ON.
When the
TCP Receiving Flag (W2.03) turns ON, the following parameters
are written to the parameter area for socket number 1.
D32408: 0001 Hex = UDP/TCP socket No. 1
D32413: 0064 Hex = No. of send/receive bytes is 100
D32414 and D32415:
8203 E800 Hex =
Send/receive data address D01000
D32416: 0000 Hex = No timeout time.
After the parameter has been set, the Receive Request Switch
(A571.04) is turned ON and the TCP Receiving Flag (W2.03) is
turned OFF.
If the Receive Request Switch (A571.04) turns OFF while the TCP
Receiving Flag (W2.03) is OFF, the contents of the response code
(D32417) in the Socket Service Parameter Area is checked, and if it
is not 0000 Hex (normal end), the TCP Receive Error Flag (W1.03)
is turned ON.
After the execution results have been checked, the TCP Receive Bit
(W0.03) is turned OFF.
Continued from previous page.
Summary of Contents for CP1L-EL20DR-D
Page 3: ...CP1L EL20D CP1L EM30D CP1L EM40D CP1L EL EM CPU Unit Operation Manual Produced July 2017...
Page 4: ...iv...
Page 10: ...x...
Page 22: ...xxii...
Page 34: ...xxxiv Software Licenses and Copyrights 7...
Page 192: ...158 Trial Operation and Debugging Section 5 3...
Page 250: ...216 Automatic Clock Adjustment and Specifying Servers by Host Name Section 6 7...
Page 666: ...632 Trouble Shooting Section 11 7...
Page 696: ...662 Standard Models Appendix A...
Page 805: ...771 Connections to Serial Communications Option Boards Appendix F Connecting to Unit...
Page 806: ...772 Connections to Serial Communications Option Boards Appendix F...
Page 836: ...802 PLC Setup Appendix G...
Page 838: ...804 TCP Status Transitions Appendix H...
Page 840: ...806 Ethernet Network Parameters Appendix I...
Page 842: ...808 Buffer Configuration CP1L EL EM Appendix J...
Page 844: ...810 Ethernet Specifications Appendix K...
Page 851: ...Index 817 work words 118 write protection 447...
Page 852: ...818 Index...
Page 854: ...820 Revision History...
Page 855: ......