Communication Using Tcp - Mitsubishi L02CPU User Manual

Melsec-l series
Hide thumbs Also See for L02CPU:
Table of Contents

Advertisement

7.1

Communication Using TCP

TCP (Transmission Control Protocol) establishes a connection to a device with a port number, and performs reliable
data communications.
To perform socket communication using TCP, confirm the following in advance.
• IP address and port number of the target device
• IP address and port number of the CPU module
• Which side will open a connection, the target device or CPU module? (Active open or Passive open)
(1) TCP connection
There are two types of open operation for TCP connection: Active open and Passive open.
Firstly, the device waiting for a TCP connection performs a Passive open at the specified port.
The other device performs an Active open by specifying the port number of the device which is waiting in Passive
open state.
Through the above process, a TCP connection is established and communication is available.
(a) Active open
Active open is a TCP connection method, which actively opens a connection to the device that is passively
waiting for a TCP connection.
(b) Passive open
The following two types of Passive open methods are available for TCP connection.
TCP connection
method
Unpassive
Fullpassive
Remark
The expressions of Active and Passive opens may vary according to the device.
• Active open: TCP connection initiating device, client, connecting side, etc.
• Passive open: TCP connection waiting device, server, listening side, etc.
66
Allows a connection regardless of the IP address and port number of the connected device. (The
IP address and port number of the device connected can be acquired using the SP.SOCCINF
instruction.)
Allows a connection to the device only when the specified IP address and port number are met. A
connection made by another device that does not have the specified IP address and port number
is automatically disconnected before communication.
Description

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents