EasyManuals Logo

Omron SYSMAC CP2E-E D Series User Manual

Omron SYSMAC CP2E-E D Series
578 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #382 background imageLoading...
Page #382 background image
15 Ethernet
15-52
CP2E CPU Unit Software User’s Manual(W614)
Programming Example
TCP Close
TCP Passive Open
MOV(021)
#1
D16008
W0.00
W0.00
@RSET
W1.00
@SET
W2.00
MOV(021)
#1000
D16009
W2.00
W0.01
SET
A571.05
RSET
W2.01
W2.01
W0.01
SET
W1.01
W2.01
A571.05
<>(305)
D16017
#0
W0.00
RSET
W0.00
W2.00
A571.01
W0.01
@RSET
W1.01
@SET
W2.01
MOV(021)
#1
D16008
W0.01 W2.01
W0.00
SET
W1.00
W2.00
A571.01
<>(305)
D16017
#0
W0.00
SET
A571.01
RSET
W2.00
W2.00
W0.01
RSET
W0.01
W2.01
A571.05
MOV(021)
#C0A8
D16010
MOV(021)
#FA05
D16011
MOV(021)
#0
D16012
MOV(021)
#0
D16016
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 (D16017) 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.
D16008: 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 (D
160
17) 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.
D16008: 0001 Hex = UDP/TCP socket No. 1
D16009: 1000 Hex = Local UDP/TCP port No. 4096
D16010 and D16011:
C0A8 FA05 Hex =
Remote IP address 192.168.250.5
D16012: 0000 Hex = Any remote UDP/TCP port No.
D16016: 0000 Hex = No timeout time
Continued on next page.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC CP2E-E D Series and is the answer not in the manual?

Omron SYSMAC CP2E-E D Series Specifications

General IconGeneral
BrandOmron
ModelSYSMAC CP2E-E D Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals