1100
8 BUILT-IN ETHERNET FUNCTION INSTRUCTIONS
8.2 Socket Communications Instructions
■Control data
Reads the connection information of the connection specified by (s1).
When completed with an error, an error code is stored in the completion status (s2)+1.
For the error code stored in the completion status (s2)+1, refer to the following.
MELSEC iQ-R Ethernet User's Manual (Application)
Operand: (s2)
Device Item Description Setting range Set by
+0 System area
+1 Completion status The completion status is stored upon completion of the instruction.
• 0000H: Completed successfully
• Other than 0000H: Completed with an error (error code)
System
Operand: (d)
Device Item Description Setting range Set by
+0
+1
IP address of external
device
Store the IP address of an external device. 00000001H to
FFFFFFFFH
00000000H: No
communication
destination
(FFFFFFFFH:
simultaneous
broadcast)
System
+2 Destination port
number
Store the destination port number of an external device. 0001H to FFFFH
(FFFFH:
Simultaneous
broadcast)
System
+3 Own station port
number.
Store the own station port number. 0001H to 1387H
1392H to FFFEH
System
+4 Connection use
application
Store the usage of a connection.
(1) Communication method (protocol) (b8)
• 0: TCP/IP
• 1: UDP/IP
(2) Socket communications function procedure (b9)
• 1: No procedure (fixed)
(3) Open method (b15, b14)
• 00: Active open or UDP/IP
• 10: Unpassive open
• 11: Fullpassive open
System
Error code
(SD0)
Description
3405H The connection number specified by (s1) is a value other than 1 to 16.
b15 b14 b9 b8
0 (1)
(2) 0
b0
……
(3)
(d)+4