Download  Print this page

Mitsubishi Electric FX5 User Manual Page 100

Melsec iq-f series, ethernet communication.
Hide thumbs

Advertisement

■Control data
Device
Item
(s2)+0
System area
(s2)+1
Completion status
(d)+0
Target device IP address
(d)+1
(d)+2
Target device port
number
(d)+3
Host Station Port No.
(d)+4
Application setting area
*1 The "Set by" column indicates the following.
System: The CPU module stores the execution result of the SP.SOCCINF instruction.
*2 In case of execution for an unopened connection, 0H is returned.
*3 Because host station port numbers, 1 to 1023 (0001H to 03FFH), are assigned for reserved port numbers and 61440 to 65534 (F000H
to FFFEH) are used for other communication functions, using 1024 to 5548, 5570 to 61439 (0400H to 15ACH, 15C2H to EFFFH) is
recommended. Do not specify 5549 to 5569 (15ADH to 15C1H) because these ports are used by the system.
Processing details
This instruction reads connection information specified in (s1).
Operation error
Error code
Description
(SD0/SD8067)
3405H
The connection number specified by (s1) is other than 1 to 8.
2820H
The device number specified by (s2) or (d) is outside the range of the number of device points.
2822H
Device that cannot be specified is specified.
Program example
When M5000 is turned on, connection information of connection No.1 is read.
• Devices used
Device No.
D500
D5000
• Program
M5000
7 SOCKET COMMUNICATION FUNCTION
98
7.4 Socket Communication Function Instructions
Description
Completion status is stored
0000H: Completed
Other than 0000H: Failed (Error code)
Refer to Page 150 Error Codes
IP address of the target device is stored.
Port number of the target device is stored.
Port number of the host station is stored.
b15b14 b13
to
b10 b9 b8 b7
(d)+4
[3]
0
[2] [1]
[1] Communication method (protocol)
0: TCP/IP
1: UDP/IP
[2] Socket communication procedure
1: Non-protocol method
[3] Open system
00: Active open or UDP/IP
10: Unpassive open
11: Fullpassive open
Application
SP.SOCSND instruction control data
Storage location of connection information
SP.SOCCINF
Setting range
1 to 3758096382
(00000001H to
DFFFFFFEH)
1 to 65534 (0001H to
FFFEH)
1 to 5548, 5570 to 65534
(0001H to 15ACH, 15C2H to
FFFEH)
Shown on left side
to
b0
0
"U0"
K1
D500
D5000
END
*1
Set by
System
*2
*2
*2*3
*2
Execute reading connection
information of connection No.1

Advertisement

Table of Contents

Comments to this Manuals

Symbols: 0
Latest comments: