1538
16 ETHERNET INSTRUCTIONS
16.1 Open/Close Processing Instructions
*1 When the execution type is set to 0, the device areas in (s2)+4 to (s2)+14 are used by the system and the user must not use the areas.
*2 This item can be set when the connection number in (s1) is one from 1 to 7 and 9 to 15.
*3 This specification is enabled when UDP/IP is specified for the communication method (protocol).
Data cannot be sent through the connection for which 65535 (FFFFH) is specified. Specify a value from 1 to 65534 to send data.
*4 This specification is enabled when TCP/IP is specified for the communication method (protocol).
*5 This specification is enabled when UDP/IP is specified for the communication method (protocol).
*6 Settings are ignored if the open method (bits 10 and 11) specified by (s2)+4 is "10: Unpassive open".
The GP.CONOPEN instruction is used for socket communications or fixed buffer communications.
For the combinations of available settings for connection opening, refer to the following.
MELSEC iQ-R Ethernet User's Manual (Application)
The following figure shows an IP address setting example.
Example: IP address "10.97.24.200 (0A.61.18.C8)"
[Program example]
or
[Execution result]
(1) The data is stored from the lower byte.
+5 Own node port number Specify the port number of the own node.
(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
+6
+7
IP address of external
device
*6
Specify the IP address (IPv4) of an external device.
• The IP address is stored in (s2)+6 and (s2)+7.
• To enable broadcast, store FFFFFFFFH.
00000001H to
FFFFFFFFH
User
+8 to +13 System area
+14 Destination port
number
*6
Specify the destination port number.
When receiving data from all port numbers, store FFFFH.
*3
1024 to 65535
(0400H to FFFFH)
User
Error code
((s2)+1)
Description
C000H to CFFFH MELSEC iQ-R Ethernet User's Manual (Application)
Operand: (s2)
Device Item Description Setting range Set by
MOV H18C8 D206
MOV H0A61 D207
[Program example]
DMOV H0A6118C8 D206
D206
D207
18C8H
0A. 61. 18. C8
0A61H
(1)