16 ETHERNET INSTRUCTIONS
16.1 Open/Close Processing Instructions
1543
16
■Control data
*1 When the TCP/IP protocol is used, the alive check method is fixed to KeepAlive. (When UDP/IP is used, it is fixed to Ping.)
*2 This item can be set when the connection number set in (s1) is one from 1 to 7 and 9 to 15.
*3 Settings are ignored if the open method (bits 14 and 15) specified by (s2)+2 is "10: Unpassive open".
Operand: (s2)
Device Item Description Setting range Set by
+0 Execution type/End
type
Specify whether to use the parameter value set by the engineering tool or the value
set in (s2)+2 to (s2)+6 of control data for opening a connection.
• 0000H: Performs open processing according to the "external device connection
configuration" set by the engineering tool.
• 8000H: Performs open processing according to the setting in (s2)+2 to (s2)+6 of
control data.
0000H
8000H
User
+1 Completion status The completion status is stored upon completion of the instruction.
• 0: Completed successfully
• Other than 0: Completed with an error (error code)
System
+2 Application setting area Specify the application of a connection.
(1) Application of fixed buffer (b0)
• 0: For sending
• 1: For receiving
(2) Target station alive check (b1)
• 0: Disable the alive check.
• 1: Alive check
*1
(3) Pairing open (b7)
• 0: Disable pairing open.
• 1: Enable pairing open.
*2
(4) Protocol (b8)
• 0: TCP/IP
• 1: UDP/IP
(5) Fixed buffer communications with/without procedure (b9 and b10)
• 00: With procedure
• 01: Without procedure
• 10: Communication protocol
(6) Opening method (b14 and b15)
• 00: Active open or UDP/IP
• 10: Unpassive open
• 11: Fullpassive open
Left User
+3 Own station port
number.
Specify the port number of the own station.
(Port numbers 5000 to 5009 is reserved for the system and cannot be used.)
1024 to 4999,
5010 to 65534
(0400H to 1387H,
1392H to FFFEH)
User
+4 to +5 IP address of external
device
*3
Specify the IP address (IPv4) of an external device.
• The IP address is stored in (s2)+4 and (s2)+5.
• To enable broadcast, specify FFFFFFFFH.
00000001H to
FFFFFFFFH
User
+6 Destination port
number
*3
Specify the destination port number.
When receiving data from all port numbers, specify FFFFH.
1 to 65534, 65535
(0001H to FFFEH,
FFFFH)
User
+7 to +9 System area
b15b14 b13 b11 b10 b9 b8 b7 b6 b2 b1
00(4) (3)(5)(6)
b0
……
(1)
(2)