Communications Using Udp/Ip; Precautions For Udp/Ip Communications - Mitsubishi Electric MELSEC iQ-RJ71EN71 User Manual

Ethernet
Hide thumbs Also See for MELSEC iQ-RJ71EN71:
Table of Contents

Advertisement

■Precautions for Passive open
• Use 'Open completion signal' (Un\G1900000 to Un\G1900007) and 'Open request signal' (Un\G1900008 to Un\G1900015)
in the program to create an interlock circuit. The on/off timing for the open completion signal and open request signal is
shown below.
'Open completion signal'
ON
(Un\G1900000 to Un\G1900007)
OFF
ON
'Open request signal'
(Un\G1900008 to Un\G1900015)
OFF
• When the CPU module is connected to the external device with Passive open, the connected external device's IP address
or the external device's port number can be retrieved with the SP.SOCCINF instruction.
• With TCP/IP, one external device is connected to with one connection. To connect with multiple external devices with the
same own station port number, provide a connection for each external device. If more external devices than the prepared
number of connections are connected, the connection will be disconnected immediately.
• Connect from the external device after the Ethernet-equipped module enters the open standby state. The TCP/IP
connection request received from the external device between the time from CPU startup completion to open wait state
causes an error, and force close connection is returned to the external device. In this case, wait for the Ethernet-equipped
module to enter the open wait state and then retry from the external device.
• Do not execute the GP.CONCLOSE instruction or SP.SOCCLOSE instruction in the program. If the GP.CONCLOSE
instruction or SP.SOCCLOSE instruction is executed, the open completion signal and open request signal for the
corresponding connection will turn off. The close processing will be executed and send/receive will be disabled. To re-open
a closed connection, execute the GP.CONOPEN instruction or SP.SOCOPEN instruction.

Communications using UDP/IP

Communication with UDP/IP uses a simple protocol without order control or re-send control.
Check the following items before performing socket communications using UDP/IP.
• IP addresses and port numbers on external device side
• IP addresses and port numbers on the Ethernet-equipped module side

Precautions for UDP/IP communications

• Loss of data, data arrival order interchange, and others could be occur. Consider using TCP/IP if there are problems.
• Even if the communication line between the CPU module and external device is not connected because of a connected
cable disconnection and others, the data send processing may end normally. Thus, providing a communication procedure
and sending/receiving data is recommended.
• Use the SP.SOCCSET instruction to change the external device with the CPU module.
• 'Open completion signal' (Un\G1900000 to Un\G1900007) and 'Open request signal' (Un\G1900008 to Un\G1900015) for
the connection set to UDP/IP is always on.
• Do not execute the GP.CONCLOSE instruction or SP.SOCCLOSE instruction in the program. If the GP.CONCLOSE
instruction or SP.SOCCLOSE instruction is executed, the open completion signal and open request signal for the
corresponding connection will turn off. The close processing will be executed and send/receive will be disabled. To re-open
a closed connection, execute the GP.CONOPEN instruction or SP.SOCOPEN instruction.
• Even if 'Open completion signal' (Un\G1900000 to Un\G1900007) is turned on, data sending may fail. If data sending fails,
send the data again.
TCP disconnection completed by the external device
TCP connection completed by the external device
Always on
1 FUNCTIONS
1.4 Socket Communications
1
65

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents