41
CHAPTER 6 SOCKET COMMUNICATION FUNCTION
6
6.
1
C
o
mm
uni
cat
ion Using T
C
P
(2) Program example for Active open
The following shows a communication flow of an Active open.
(a) Parameter setting
The following parameters are set for the sample program.
Project window
[Parameter]
[PLC Parameter]
[Built-in Ethernet Port Setting]
[Open Setting]
Item
Setting
Protocol
TCP
Open System
Socket Communication
TCP Connection
Active
Host Station Port No.
1000
H
(Setting range: 0001
H
to 1387
H
, 1392
H
to FFFE
H
)
Destination IP Address
192.168.3.40 (Setting range: 0.0.0.1 to 223.255.255.254)
Destination Port No.
1000
H
(Setting range: 0001
H
to FFFE
H
)
Start
Open processing:
SP.SOCOPEN instruction
NO
Send by the SP.SOCSND
instruction, or receive by the
SP.SOCRCV or
S.SOCRCVS instruction.
Close processing:
SP.SOCCLOSE instruction
YES (Completed, or disconnected by the external device.)
Specify the port number of the external device waiting for
TCP connection and open a connection by Active open.
Was data transfer
completed?
End
Summary of Contents for MELSEC L Series
Page 1: ......
Page 2: ......
Page 19: ...17 CHAPTER 1 OVERVIEW 1 Memo ...
Page 116: ...114 Memo ...
Page 123: ......