15 Ethernet
15-52
CP2E CPU Unit Software User’s Manual(W614)
Programming Example
TCP Clo
s
e
TCP Pa
ss
ive Open
MOV(021)
#1
D16008
W0.00
W0.00
@R
S
ET
W1.00
@
S
ET
W2.00
MOV(021)
#1000
D16009
W2.00
W0.01
S
ET
A571.05
R
S
ET
W2.01
W2.01
W0.01
S
ET
W1.01
W2.01 A571.05
<>(305)
D16017
#0
W0.00
R
S
ET
W0.00
W2.00 A571.01
W0.01
@R
S
ET
W1.01
@
S
ET
W2.01
MOV(021)
#1
D16008
W0.01
W2.01
W0.00
S
ET
W1.00
W2.00 A571.01
<>(305)
D16017
#0
W0.00
S
ET
A571.01
R
S
ET
W2.00
W2.00
W0.01
R
S
ET
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) t
u
rn
s
ON, the TCP
Open Error Fl
a
g (W1.00) i
s
t
u
rned OFF
a
nd the TCP
Opening Fl
a
g (W2.00) i
s
t
u
rned ON to initi
a
lize
proce
ss
ing.
After the exec
u
tion re
su
lt
s
h
a
ve
b
een checked, the
TCP Clo
s
e Bit (W0.01) i
s
t
u
rned OFF.
If the Clo
s
e Re
qu
e
s
t
S
witch (A571.05) t
u
rn
s
OFF
while the TCP Opening Fl
a
g (W2.01) i
s
OFF, the
content
s
of the re
s
pon
s
e code (D16017) in the
S
ocket
S
ervice P
a
r
a
meter Are
a
i
s
checked,
a
nd if it
i
s
not 0000 Hex (norm
a
l end), the TCP Clo
s
e Error
Fl
a
g (W1.01) i
s
t
u
rned ON.
After the p
a
r
a
meter h
as
b
een
s
et, the Clo
s
e Re
qu
e
s
t
S
witch (A571.05) i
s
t
u
rned ON
a
nd the TCP Clo
s
ing
Fl
a
g (W2.01) i
s
t
u
rned OFF.
When the TCP Clo
s
ing Fl
a
g (W2.01) t
u
rn
s
ON, the
following p
a
r
a
meter i
s
written to the p
a
r
a
meter
a
re
a
for
s
ocket n
u
m
b
er 1.
D16008: 0001 Hex = UDP/TCP
s
ocket No. 1
When the TCP Clo
s
e Bit (W0.01) t
u
rn
s
ON, the TCP
Clo
s
e Error Fl
a
g (W1.01) i
s
t
u
rned OFF
a
nd the TCP
Clo
s
ing Fl
a
g (W2.01) i
s
t
u
rned ON to initi
a
lize
proce
ss
ing.
After the p
a
r
a
meter
s
h
a
ve
b
een
s
et, the TCP P
ass
ive
Open Re
qu
e
s
t
S
witch (A571.01) i
s
t
u
rned ON
a
nd the
TCP Opening Fl
a
g (W2.00) i
s
t
u
rned OFF.
If the TCP P
ass
ive Open Re
qu
e
s
t
S
witch (A571.01)
t
u
rn
s
OFF while the TCP Opening Fl
a
g (W2.00) i
s
OFF,
the content
s
of the re
s
pon
s
e code (D16017) in the
S
ocket
S
ervice P
a
r
a
meter Are
a
i
s
checked,
a
nd if it i
s
not 0000 Hex (norm
a
l end), the TCP Open Error Fl
a
g
(W1.00) i
s
t
u
rned ON.
After the exec
u
tion re
su
lt
s
h
a
ve
b
een checked, the
TCP Open Bit (W0.00) i
s
t
u
rned OFF.
When the TCP Opening Fl
a
g (W2.00) t
u
rn
s
ON, the
following p
a
r
a
meter
s
a
re written to the p
a
r
a
meter
a
re
a
for
s
ocket n
u
m
b
er 1.
D16008: 0001 Hex = UDP/TCP
s
ocket No. 1
D16009: 1000 Hex = Loc
a
l UDP/TCP port No. 4096
D16010
a
nd D16011:
C0A8 FA05 Hex =
Remote
IP
a
ddre
ss
192.168.250.5
D16012: 0000 Hex = Any remote UDP/TCP port No.
D16016: 0000 Hex = No timeo
u
t time
Contin
u
ed on next p
a
ge.
Содержание SYSMAC CP Series
Страница 1: ...USER S MANUAL Cat No W614 E1 01 SYSMAC CP Series CP2E E D CP2E S D CP2E N D CP2E CPU Unit Software ...
Страница 3: ......
Страница 32: ...1 Overview 1 4 CP2E CPU Unit Software User s Manual W614 ...
Страница 44: ...3 CPU Unit Operation 3 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 116: ...6 I O Allocation 6 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 144: ...7 PLC Setup 7 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 170: ...10 Interrupts 10 14 CP2E CPU Unit Software User s Manual W614 ...
Страница 200: ...11 High speed Counters 11 30 CP2E CPU Unit Software User s Manual W614 ...
Страница 272: ...12 Pulse Outputs 12 72 CP2E CPU Unit Software User s Manual W614 ...
Страница 278: ...13 PWM Outputs 13 6 CP2E CPU Unit Software User s Manual W614 ...
Страница 460: ...18 Programming Device Operations 18 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 576: ...Revision 2 CP2E CPU Unit Software User s Manual W614 ...
Страница 577: ......