59
CHAPTER 6 SOCKET COMMUNICATION FUNCTION
6
6.
4
S
o
ck
et
Comm
unicat
ion F
unct
ion
In
st
ru
ct
ions
6.
4.
1
Es
ta
blishing
a c
onnect
ion
(S
P.
SO
CO
PE
N)
(2) Control data
*3
The "Set by" column indicates the following.
User: The data must be set before executing the SP.SOCOPEN instruction.
System: The CPU module stores the execution result of the SP.SOCOPEN instruction.
*4
For the Unpassive open, the IP address and port number of the target device are ignored.
Using port number 400
H
or higher is recommended because 1
H
to 3FF
H
are generally reserved (WELL KNOWN PORT
NUMBERS).
Device
Item
Description
Setting range
Set by
*3
+0
Execution/
completion type
Specify which settings are used to open a
connection, parameter settings configured by a
programming tool or control data settings
+2
to +9.
0000
H
:
Connection is opened according to the settings
set in "Open settings" of PLC parameter.
8000
H
:
Connection is opened according to the values
specified for control data
+2 to
+9.
0000
H
8000
H
User
+1
Completion
status
Completion status is stored
0000
H
: Completed
Other than 0000
H
: Failed (Error code)
-
System
+2
Application
setting area
[1] Communication method (protocol)
0: TCP/IP
1: UDP/IP
[2] Socket communication procedure
1: Nonprocedural (fixed)
[3] Open system
00: Active open or UDP/IP
10: Unpassive open
11: Fullpassive open
-
User
+3
Host station port
number
Specify the port number of the host station.
1
H
to 1387
H
1392
H
to FFFE
H
(400
H
or higher is
recommended.)
+4
+5
Target device IP
address
*4
Specify the IP address of the target device.
1
H
to FFFFFFFF
H
(FFFFFFFF
H
:
Simultaneous
broadcast)
+6
Target device
port number
*4
Specify the port number of the target device.
1
H
to FFFF
H
(FFFF
H
:
Simultaneous
broadcast)
+7
to
+9
-
Use prohibited
-
System
S2
S2
S2
S2
S2
S2
S2
[3]
S2 +2
b15 b14 b13
b10 b9 b8 b7
b0
to
to
0
0
[2] [1]
S2
S2
S2
S2
S2
S2
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: ......