209
Socket Services
Section 6-6
Programming Example
TCP Close
TCP Passive Open
MOV(021)
#1
D32408
W0.00
W0.00
@RSET
W1.00
@SET
W2.00
MOV(021)
#1000
D32409
W2.00
W0.01
SET
A571.05
RSET
W2.01
W2.01
W0.01
SET
W1.01
W2.01 A571.05
<>(305)
D32417
#0
W0.00
RSET
W0.00
W2.00 A571.01
W0.01
@RSET
W1.01
@SET
W2.01
MOV(021)
#1
D32408
W0.01
W2.01
W0.00
SET
W1.00
W2.00 A571.01
<>(305)
D32417
#0
W0.00
SET
A571.01
RSET
W2.00
W2.00
W0.01
RSET
W0.01
W2.01 A571.05
MOV(021)
#C0A8
D32410
MOV(021)
#FA05
D32411
MOV(021)
#0
D32412
MOV(021)
#0
D32416
When the TCP Open Bit (W0.00) turns ON, the TCP
Open Error Flag (W1.00) is turned OFF and the TCP
Opening Flag (W2.00) is turned ON to initialize
processing.
After the execution results have been checked, the
TCP Close Bit (W0.01) is turned OFF.
If the Close Request Switch (A571.05) turns OFF
while the TCP Opening Flag (W2.01) 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 Close Error
Flag (W1.01) is turned ON.
After the parameter has been set, the Close Request
Switch (A571.05) is turned ON and the TCP Closing
Flag (W2.01) is turned OFF.
When the TCP Closing Flag (W2.01) turns ON, the
following parameter is written to the parameter area for
socket number 1.
D32408: 0001 Hex = UDP/TCP socket No. 1
When the TCP Close Bit (W0.01) turns ON, the TCP
Close Error Flag (W1.01) is turned OFF and the TCP
Closing Flag (W2.01) is turned ON to initialize
processing.
After the parameters have been set, the TCP Passive
Open Request Switch (A571.01) is turned ON and the
TCP Opening Flag (W2.00) is turned OFF.
If the TCP Passive Open Request Switch (A571.01)
turns OFF while the TCP Opening Flag (W2.00) 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 Open Error Flag
(W1.00) is turned ON.
After the execution results have been checked, the
TCP Open Bit (W0.00) is turned OFF.
When the TCP Opening Flag (W2.00) turns ON, the
following parameters are written to the parameter
area for socket number 1.
D32408: 0001 Hex = UDP/TCP socket No. 1
D32409: 1000 Hex = Local UDP/TCP port No. 4096
D32410 and D32411:
C0A8 FA05 Hex =
Remote IP address 192.168.250.5
D32412: 0000 Hex = Any remote UDP/TCP port No.
D32416: 0000 Hex = No timeout time
Continued on next page.
Содержание CP1L-EL20DR-D
Страница 3: ...CP1L EL20D CP1L EM30D CP1L EM40D CP1L EL EM CPU Unit Operation Manual Produced July 2017...
Страница 4: ...iv...
Страница 10: ...x...
Страница 22: ...xxii...
Страница 34: ...xxxiv Software Licenses and Copyrights 7...
Страница 178: ...144 Connecting the CX Programmer Section 5 1 Click the Connect button to connect and then connection online is completed...
Страница 192: ...158 Trial Operation and Debugging Section 5 3...
Страница 250: ...216 Automatic Clock Adjustment and Specifying Servers by Host Name Section 6 7...
Страница 666: ...632 Trouble Shooting Section 11 7...
Страница 696: ...662 Standard Models Appendix A...
Страница 805: ...771 Connections to Serial Communications Option Boards Appendix F Connecting to Unit...
Страница 806: ...772 Connections to Serial Communications Option Boards Appendix F...
Страница 836: ...802 PLC Setup Appendix G...
Страница 838: ...804 TCP Status Transitions Appendix H...
Страница 840: ...806 Ethernet Network Parameters Appendix I...
Страница 842: ...808 Buffer Configuration CP1L EL EM Appendix J...
Страница 844: ...810 Ethernet Specifications Appendix K...
Страница 851: ...Index 817 work words 118 write protection 447...
Страница 852: ...818 Index...
Страница 854: ...820 Revision History...
Страница 855: ......