Communications Using Tcp/Ip; Tcp/Ip Connection Operation; Active Open; Passive Open - Mitsubishi Electric MELSEC iQ-RJ71EN71 User Manual

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

Advertisement

Communications using TCP/IP

TCP/IP protocol establishes a connection between the external device's port number for reliable data exchange.
Check the following items before performing socket communications using TCP/IP.
• IP addresses and port numbers on external device side
• IP addresses and port numbers on the Ethernet-equipped module side
• Which side, the external device side or Ethernet-equipped module side, will open a connection (Active open or Passive
open)

TCP/IP connection operation

TCP/IP connection includes Active open and Passive open.
First, the side with the TCP/IP connection executes Passive open with the specified port number
The side with TCP/IP connection specifies the port number waiting in the Passive open side, and executes Active open.
This enables the TCP/IP connection, the connection is established, and data can be exchanged.
For details on Active open and Passive open, refer to the following.
( Page 378 TCP/IP communications)
The Active open and Passive open expression may differ according to the external device.
• Active open: TCP/IP connection side, client side, connect side, and others
• Passive open: TCP/IP connection wait side, server side, listen side, and others

■Active open

The following figure shows the flow of data exchange using Active open.
Open processing
Was data transfer
Send by the SOCSND instruction, or receive by
the SOCRCV or SOCRCVS instruction.

■Passive open

The following figure shows the flow of data exchange using Passive open.
Send or receive?
Send by the SOCSND instruction, or receive by
the SOCRCV or SOCRCVS instruction.
1 FUNCTIONS
62
1.4 Socket Communications
Start
completed?
NO
Start
YES
⋅⋅⋅
Specify the port number of the external device waiting for
TCP connection and open a connection by Active open.
YES
(Completed, or disconnected by the external device.)
Close processing
End
⋅⋅⋅
Waiting for TCP connection in Passive open state.
NO

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents