CN111506013A - P L C device remote data communication implementation method based on virtual serial port - Google Patents
P L C device remote data communication implementation method based on virtual serial port Download PDFInfo
- Publication number
- CN111506013A CN111506013A CN202010270023.XA CN202010270023A CN111506013A CN 111506013 A CN111506013 A CN 111506013A CN 202010270023 A CN202010270023 A CN 202010270023A CN 111506013 A CN111506013 A CN 111506013A
- Authority
- CN
- China
- Prior art keywords
- serial port
- dtu
- channel
- equipment
- udp
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000006854 communication Effects 0.000 title claims abstract description 66
- 238000004891 communication Methods 0.000 title claims abstract description 65
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000035515 penetration Effects 0.000 description 13
- 230000005540 biological transmission Effects 0.000 description 3
- 230000000149 penetrating effect Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000006855 networking Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
- G05B19/058—Safety, monitoring
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2517—Translation of Internet protocol [IP] addresses using port numbers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/10—Plc systems
- G05B2219/14—Plc safety
- G05B2219/14006—Safety, monitoring in general
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a method for realizing remote data communication of P L C equipment based on a virtual serial port, which comprises the following steps that a link request is sent to DTU equipment by an industrial personal computer end through a server, the DTU equipment enters a preparation state after receiving the request and replies the request to enable the DTU equipment to enter the preparation state to be known by the industrial personal computer end, a UDP channel is established at any end of the industrial personal computer end or the DTU equipment end and enable UDP channel information to be known by the other end, a UDP channel is established at the other end of the UDP channel information and is replied by the UDP channel to enable one end of the established channel to be known, two ends of the established UDP channel successfully send and receive signals through the UDP channel and establish a P2P channel, data communicated between serial port P L C equipment and the industrial personal computer are transmitted on the P2P channel, the equipment which can only be originally linked by the serial port is remoted, and can be extended to be outside a wide area network without being limited by any distance.
Description
Technical Field
The invention relates to the technical field of P L C control, in particular to a method for realizing remote data communication of P L C equipment based on a virtual serial port.
Background
The internet of things revolution enables more traditional serial port P L C (programmable logic controller) devices to be connected to the Internet and the cloud in the modes of Ethernet, WiFi and 4G/5G, however, for most serial port P L C devices (such as Mitsubishi, Siemens, Pan-shot, L G) and the like, P L C programming software on terminal computers of the serial port P L C devices is developed by the companies independently, is not universal and is not developed and modified, and networking transformation of the P L C is limited.
Because a large amount of serial ports P L C are in the stock market at present, and the equipment cost is low, the serial ports P L C equipment is much cheaper than the P L C of the network port, therefore, a serial port P L C remote monitoring method is urgently needed under the premise that the serial port P L C and the current monitoring software are not changed.
Disclosure of Invention
In view of the above existing disadvantages, the present invention provides a method for implementing remote data communication of a P L C device based on a virtual serial port, which can implement a data communication process of remote monitoring and big data transmission of a serial port P L C on the premise that a serial port P L C and current monitoring software are not changed.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
a method for realizing remote data communication of P L C equipment based on a virtual serial port is applied to a scene comprising an industrial Personal Computer (PC), a Digital Television Unit (DTU) equipment and a serial port P L C equipment, virtual serial port management software is operated at the end of the industrial PC, and the serial port P L C equipment is connected with an external network through the DTU equipment, and the method comprises the following steps:
the industrial Personal Computer (PC) end sends a link request to the DTU equipment through the server;
after receiving the request, the DTU equipment enters a preparation state and replies the request to enable the DTU equipment to be informed by the industrial PC terminal that the DTU equipment enters the preparation state;
creating a UDP channel at any one of an industrial PC end or a DTU equipment end, and acquiring UDP channel information by the other end;
the other end which acquires the UDP channel information also creates a UDP channel and replies through the UDP channel to enable the UDP channel to be acquired by one end of the created channel;
establishing a P2P channel after two ends of the UDP channel successfully send and receive signals through the UDP channel;
data communicated between the serial port P L C device and the industrial PC are transmitted on a P2P channel.
In accordance with one aspect of the invention, the method comprises: the DTU equipment and virtual serial port management software running on the industrial personal computer are respectively connected with a server in a stable TCP mode, and the server is an NAT penetration server.
According to one aspect of the invention, the sending of the link request to the DTU device by the industrial PC side through the server comprises: and the user sends a link request through the virtual serial port management software, the link request is sent to the NAT penetration server through a TCP channel, and the link request data is provided with the DTU equipment ID.
In accordance with one aspect of the invention, the method further comprises: and after receiving the link request, the server finds the TCP link of the DTU equipment according to the ID of the DTU equipment and forwards the link request to the corresponding DTU gateway.
According to an aspect of the present invention, after receiving the request, the DTU device enters the ready state and replies to the request to make the DTU device enter the ready state and be known by the PC side of the industrial control device, including: and the DTU equipment replies the request and informs the NAT traversal server that the NAT traversal server is in a ready state, and the NAT traversal server forwards the reply of the DTU to the virtual serial port management software.
In accordance with an aspect of the present invention, the UDP channel information includes: UDP maps port numbers and IP addresses on the extranet.
In accordance with one aspect of the invention, the method comprises: protocols for reliable communication are added over the P2P tunnel to ensure data integrity.
In accordance with an aspect of the invention, the protocol for reliable communication is the KCP communication protocol.
In accordance with one aspect of the invention, the protocol for reliable communication includes:
a sending data packet of the data sending end consists of a lead code, a protocol serial number and data content in sequence;
wherein: the lead code is used for ensuring the validity of data and indicating to distinguish a data packet or a management packet; the protocol sequence number is 2 bytes from 0x 0000-0 xFFFF, and for all datagrams, the field must be continuous and the sequence number cannot be jumped;
the data receiving end judges whether packet loss occurs or not according to the protocol sequence number, if the packet loss occurs normally, the data receiving end replies ACK of the sequence number, otherwise, the data receiving end replies NAK of the lost data sequence number;
and the data sending end judges whether the data needs to be retransmitted or not according to the received ACK or NAK signal.
In accordance with an aspect of the present invention, the P2P path is established when data communication is required.
The method for realizing the remote data communication of the P L C device based on the virtual serial port has the advantages that the method for realizing the remote data communication of the P L C device based on the virtual serial port comprises the following steps that a link request is sent to a DTU device through a server, the DTU device enters a preparation state after receiving the request and replies the request to enable the DTU device to enter the preparation state to be known by the industrial PC device, a UDP channel is established at any end of the industrial PC device or the DTU device and enables UDP channel information to be known by the other end of the DTU device, a UDP channel is established at the other end of the DTU device and enables one end of the established channel to be known by replying the UDP channel through the UDP channel, a P2P channel is established after two ends of the UDP channel successfully send and receive signals through the UDP channel, data communicated between a serial port P L C device and the industrial PC are transmitted on the P P channel, the original device only capable of being linked with the serial port P2 is remoter, the device is capable of being remotely controlled to be capable of prolonging to a wide area network and realizing the remote communication function by a mode of realizing the remote communication through the serial port P L C channel, the remote communication, the mode of using the serial port P2C channel, the serial port P L C channel, the serial port P and the TCP 2C, the serial port P1, the serial port P2C, the serial port P1 and the serial port P2C, the serial port P1 and the serial port P2C, the serial port P19C, the serial port P2 TCP data communication, the serial port P2C communication, the serial port P1 and the serial port P communication, the serial port P communication is capable of reducing the serial port, the serial port P communication, the serial port P1, the serial port P19C data transmission of reducing the serial port P communication, the serial port P communication, the serial port P communication, the serial port.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating a method for implementing remote data communication of a P L C device based on a virtual serial port according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of a method for implementing remote data communication of a P L C device based on a virtual serial port according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
The original serial port P L C equipment and P L C monitoring software running on an industrial PC (personal computer) can only be used together and are connected through a serial port (RS485) interface.
The embodiment provides a method for realizing remote data communication of P L C equipment based on a virtual serial port, which is applied to a scene comprising an industrial Personal Computer (PC), DTU equipment and serial port P L C equipment, wherein the industrial PC runs virtual serial port management software, the serial port P L C equipment is connected with an external network through the DTU equipment, the P L C connected DTU equipment is used as a gateway, the industrial personal computer and the DTU equipment are both positioned in a local area network and are 2 different local area networks, an NAT penetration server in figure 1 is used for assisting the establishment of a P2P channel between the industrial personal computer and the DTU, a P2P channel is a channel based on a User Datagram Protocol (UDP), once the P2P channel is established, all communication data are completed by the P2P channel, the DTU, the virtual serial port management software running on the industrial personal computer and the NAT penetration server always establish stable TCP connection, the key point of the connection is stable, the data volume is small, so that the TCP connection is more suitable, the P2 channel is the P2P channel between the DTU and the virtual serial port management software, the channel is established when data communication is needed, the remote data communication is realized, and the remote.
The method is realized by the following steps:
1. and the user sends a link request through the virtual serial port management software, the request is sent to the NAT penetration server through a TCP channel, and the request data is provided with the DTU equipment ID.
2. After receiving the request, the server finds the TCP link of the DTU according to the DTU equipment ID and forwards the link request to the corresponding DTU gateway;
the DTU replies the request to inform the NAT that the penetrating server is in a preparation state;
the NAT traversal server forwards the reply of the DTU to the virtual serial port management software;
5. the virtual serial port management software creates a UDP channel special for P2P and sends a reply to the server through the UDP, so that the server can acquire the port number mapped on the external network by the UDP.
6. And after receiving the reply of the virtual serial port management software, the server sends the acquired external network IP address and the external network UDP port number to the DTU.
The DTU creates a UDP link for P2P and sends a Hello signal over the link to the extranet IP and extranet port number of the virtual serial port management software.
8. After receiving the Hello signal sent from the DTU, the virtual serial port management software replies, so that the P2P channel is established.
After the P2P channel is established, data communicated by all P L C devices and the P L C monitoring software can be transmitted on the P2P channel, however, due to the UDP protocol used by the P2P channel, the UDP protocol is characterized by small data delay but easy data loss or sequence error, and according to the characteristic of UDP, a certain protocol is required on the P2P channel to ensure the integrity of data communication.
The P2P lane data protocol is as follows:
and (3) sending data:
lead code | Protocol sequence number | Data of |
Wherein: the lead code is used for ensuring the validity of data and indicating to distinguish a data packet or a management packet; the protocol sequence number is 2 bytes from 0x 0000-0 xFFFF, and for all datagrams, the field must be continuous and cannot jump sequence numbers.
And the receiving end of the data judges whether packet loss occurs or not according to the protocol sequence number, if the packet loss occurs normally, the receiving end replies ACK of the sequence number, and if not, the receiving end replies NAK of the lost data sequence number.
And the data sending end judges whether the data needs to be sent from the beginning or not according to the received ACK or NAK signal.As shown in fig. 1, wherein the numbering means as follows:
① user initiates connection request through Hanfeng virtual serial software;
② the NAT traversal server forwards the request to the DTU;
③ DTU replies to the request to inform the NAT traversal server that it is ready;
④ the NAT penetration server forwards the DTU reply to the virtual serial port management software;
⑤ virtual serial port management software creates UDP special for P2P, and sends reply to the server through the UDP channel, so that the server knows the port number of the UDP mapped on the external network;
⑥ NAT penetration server sends IP address and UDP port of virtual serial port management software outer net to DTU;
⑦ the DTU creates a UDP channel special for P2P and sends a Hello signal to the virtual serial port management software through the UDP;
⑧ after receiving the Hello signal, the virtual serial port management software sends a reply to the DTU, and the connection is successfully established;
after the connection is successful, the DTU and the virtual serial port management software can intercommunicate data.
Example two
The original serial port P L C equipment and P L C monitoring software running on an industrial PC (personal computer) can only be used together and are connected through a serial port (RS485) interface.
The embodiment provides a method for realizing remote data communication of P L C equipment based on a virtual serial port, which is applied to a scene comprising an industrial Personal Computer (PC), DTU equipment and serial port P L C equipment, wherein the industrial PC runs virtual serial port management software, the serial port P L C equipment is connected with an external network through the DTU equipment, the P L C connected DTU equipment is used as a gateway, the industrial personal computer and the DTU equipment are both positioned in a local area network and are 2 different local area networks, an NAT penetration server in figure 2 is used for assisting the establishment of a P2P channel between the industrial personal computer and the DTU, a P2P channel is a channel based on a User Datagram Protocol (UDP), once the P2P channel is established, all communication data are completed by the P2P channel, the DTU, the virtual serial port management software running on the industrial personal computer and the NAT penetration server always establish stable TCP connection, the key point of the connection is stable, the data volume is small, so that the TCP connection is more suitable, the P2 channel is the P2P channel between the DTU and the virtual serial port management software, the channel is established when data communication is needed, the remote data communication is realized, and the remote.
The specific implementation process is as follows:
1. a user sends a link request through Hanfeng virtual serial port management software, the request is sent to an NAT penetration server through a TCP channel, and request data is provided with a DTU equipment ID.
2. After receiving the request, the server finds the TCP link of the DTU according to the DTU equipment ID and forwards the link request to the corresponding DTU gateway;
the DTU creates a UDP special for the P2P, replies to the request, informs the NAT that the penetrating server is in a ready state, and enables the server to know the port number of the UDP mapping on the external network;
4, the NAT penetration server forwards the external network IP and the port number of the DTU to the virtual serial port management software;
5. the virtual serial port management software creates a UDP channel special for P2P and sends a reply to the server through the UDP, so that the server can acquire the port number mapped on the external network by the UDP.
6. And after receiving the reply of the virtual serial port management software, the server sends the acquired external network IP address and the external network UDP port number to the DTU.
And 7, the DTU sends a Hello signal to the virtual serial port management software through a UDP channel special for P2P, and meanwhile, the virtual serial port management software also sends the Hello signal to the DTU.
And 8, replying a Hello RSP signal after the DTU and the virtual serial port management software receive the Hello signal, and successfully establishing the P2P channel after the DTU and the virtual serial port management software can both receive the Hello RSP of the other party.
After the P2P channel is established, all data communicated by the P L C devices and the P L C monitoring software can be transmitted on the P2P channel, however, the P2P channel is based on the UDP protocol, which is characterized by small data delay but easy data loss or sequence error.
As shown in fig. 2, wherein the numbering means as follows:
① user initiates connection request through virtual serial software;
② the NAT traversal server forwards the request to the DTU;
③ the DTU creates UDP specific to P2P, replies to the request, informs the NAT that the penetrating server is ready, and makes the server know the port number of the UDP mapping on the external network;
④ NAT penetration server forwards external network IP and port number of DTU to virtual serial port management software;
⑤ virtual serial port management software creates UDP special for P2P, and sends reply to the server through the UDP channel, so that the server knows the port number of the UDP mapped on the external network;
⑥ NAT penetration server sends IP address and UDP port of virtual serial port management software outer net to DTU;
⑦ the DTU sends a Hello signal to the virtual serial port management software through a UDP channel special for P2P, and the virtual serial port management software also sends the Hello signal to the DTU;
⑧ the DTU and the virtual serial port management software reply the Hello RSP signal after receiving the Hello signal, when the DTU and the virtual serial port management software can both receive the Hello RSP of the other side, the P2P channel is successfully established;
after the P2P channel is successfully established, a reliable communication protocol is added based on UDP, for example, the scheme adopts a KCP communication protocol.
The method for realizing the remote data communication of the P L C device based on the virtual serial port has the advantages that the method for realizing the remote data communication of the P L C device based on the virtual serial port comprises the following steps that a link request is sent to a DTU device through a server, the DTU device enters a preparation state after receiving the request and replies the request to enable the DTU device to enter the preparation state to be known by the industrial PC device, a UDP channel is established at any end of the industrial PC device or the DTU device and enables UDP channel information to be known by the other end of the DTU device, a UDP channel is established at the other end of the DTU device and enables one end of the established channel to be known by replying the UDP channel through the UDP channel, a P2P channel is established after two ends of the UDP channel successfully send and receive signals through the UDP channel, data communicated between a serial port P L C device and the industrial PC are transmitted on the P P channel, the original device only capable of being linked with the serial port P2 is remoter, the device is capable of being remotely controlled to be capable of prolonging to a wide area network and realizing the remote communication function by a mode of realizing the remote communication through the serial port P L C channel, the remote communication, the mode of using the serial port P2C channel, the serial port P L C channel, the serial port P and the TCP 2C, the serial port P1, the serial port P2C, the serial port P1 and the serial port P2C, the serial port P1 and the serial port P2C, the serial port P19C, the serial port P2 TCP data communication, the serial port P2C communication, the serial port P1 and the serial port P communication, the serial port P communication is capable of reducing the serial port, the serial port P communication, the serial port P1, the serial port P19C data transmission of reducing the serial port P communication, the serial port P communication, the serial port P communication, the serial port.
① the above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily made by those skilled in the art within the technical scope of the present invention will be covered by the scope of the present invention.
Claims (10)
1. A method for realizing remote data communication of P L C equipment based on virtual serial port is characterized in that the method is applied to a scene comprising an industrial PC, DTU equipment and serial port P L C equipment, virtual serial port management software is operated at the end of the industrial PC, and the serial port P L C equipment is connected with an external network through the DTU equipment, the method comprises the following steps:
the industrial Personal Computer (PC) end sends a link request to the DTU equipment through the server;
after receiving the request, the DTU equipment enters a preparation state and replies the request to enable the DTU equipment to be informed by the industrial PC terminal that the DTU equipment enters the preparation state;
creating a UDP channel at any one of an industrial PC end or a DTU equipment end, and acquiring UDP channel information by the other end;
the other end which acquires the UDP channel information also creates a UDP channel and replies through the UDP channel to enable the UDP channel to be acquired by one end of the created channel;
establishing a P2P channel after two ends of the UDP channel successfully send and receive signals through the UDP channel;
data communicated between the serial port P L C device and the industrial PC are transmitted on a P2P channel.
2. The method for realizing the remote data communication of the P L C device based on the virtual serial port according to claim 1, wherein the method comprises the step of establishing stable TCP connection between the DTU device and a server by virtual serial port management software running on an industrial personal computer, wherein the server is an NAT traversal server.
3. The method for implementing the remote data communication of the P L C device based on the virtual serial port according to claim 2, wherein the step of sending the link request to the DTU device through the server by the industrial PC terminal comprises the step of sending the link request to the NAT traversal server through the virtual serial port management software by a user, wherein the link request data comprises the ID of the DTU device.
4. The method for implementing the remote data communication of the P L C device based on the virtual serial port as claimed in claim 3, wherein the method further comprises the steps of finding the TCP link of the DTU device according to the ID of the DTU device after the server receives the link request, and forwarding the link request to the corresponding DTU gateway.
5. The method for implementing P L C device remote data communication based on virtual serial port of claim 4, wherein the DTU device entering the ready state after receiving the request and replying to the request to make the DTU device enter the ready state is learned by the industrial PC side, and the DTU device replying to the request informs the NAT traversal server that the NAT traversal server is in the ready state to forward the DTU reply to the virtual serial port management software.
6. The method for implementing remote data communication of P L C device according to claim 1, wherein the UDP channel information includes a port number and an IP address mapped on the external network by UDP.
7. The virtual serial port-based P L C device remote data communication implementation method according to one of claims 1 to 6, wherein the method includes adding a protocol for reliable communication over P2P channel to guarantee data integrity.
8. The method for implementing remote data communication of P L C device based on virtual serial port of claim 7, wherein the protocol for reliable communication is KCP communication protocol.
9. The method for implementing remote data communication of P L C device based on virtual serial port of claim 7, wherein the protocol for reliable communication includes:
a sending data packet of the data sending end consists of a lead code, a protocol serial number and data content in sequence;
wherein: the lead code is used for ensuring the validity of data and indicating to distinguish a data packet or a management packet; the protocol sequence number is 2 bytes from 0x 0000-0 xFFFF, and for all datagrams, the field must be continuous and the sequence number cannot be jumped;
the data receiving end judges whether packet loss occurs or not according to the protocol sequence number, if the packet loss occurs normally, the data receiving end replies ACK of the sequence number, otherwise, the data receiving end replies NAK of the lost data sequence number;
and the data sending end judges whether the data needs to be retransmitted or not according to the received ACK or NAK signal.
10. The method for implementing remote data communication of P L C device based on virtual serial port of claim 1, wherein the P2P channel is established when data communication is required.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010270023.XA CN111506013A (en) | 2020-04-08 | 2020-04-08 | P L C device remote data communication implementation method based on virtual serial port |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010270023.XA CN111506013A (en) | 2020-04-08 | 2020-04-08 | P L C device remote data communication implementation method based on virtual serial port |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111506013A true CN111506013A (en) | 2020-08-07 |
Family
ID=71870803
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010270023.XA Pending CN111506013A (en) | 2020-04-08 | 2020-04-08 | P L C device remote data communication implementation method based on virtual serial port |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111506013A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113775936A (en) * | 2021-08-18 | 2021-12-10 | 国家管网集团大连液化天然气有限公司 | Multi-main acquisition method for auxiliary system of LNG receiving station |
CN116017793A (en) * | 2022-12-30 | 2023-04-25 | 浙江云莱汇智能科技有限公司 | Machine tool 5G edge gateway design |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040153858A1 (en) * | 2002-12-23 | 2004-08-05 | Hwang Shaw Hwa | Direct peer-to-peer transmission protocol between two virtual networks |
CN1917512A (en) * | 2005-08-18 | 2007-02-21 | 腾讯科技(深圳)有限公司 | Method for establishing direct connected peer-to-peer channel |
CN103957287A (en) * | 2014-04-25 | 2014-07-30 | 浙江大学城市学院 | Internet of things device P2P connection method based on NAT penetration adapter |
CN108600309A (en) * | 2018-03-21 | 2018-09-28 | 浙江佳乐科仪股份有限公司 | A kind of PLC device operational system based on DTU transparent transmissions |
CN109660637A (en) * | 2018-11-16 | 2019-04-19 | 深圳市网心科技有限公司 | P2P burrows transmission method and system, electronic device and computer readable storage medium |
CN110209107A (en) * | 2019-05-10 | 2019-09-06 | 宁波安信数控技术有限公司 | A kind of method and system by DTU remote debugging PLC device |
-
2020
- 2020-04-08 CN CN202010270023.XA patent/CN111506013A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040153858A1 (en) * | 2002-12-23 | 2004-08-05 | Hwang Shaw Hwa | Direct peer-to-peer transmission protocol between two virtual networks |
CN1917512A (en) * | 2005-08-18 | 2007-02-21 | 腾讯科技(深圳)有限公司 | Method for establishing direct connected peer-to-peer channel |
CN103957287A (en) * | 2014-04-25 | 2014-07-30 | 浙江大学城市学院 | Internet of things device P2P connection method based on NAT penetration adapter |
CN108600309A (en) * | 2018-03-21 | 2018-09-28 | 浙江佳乐科仪股份有限公司 | A kind of PLC device operational system based on DTU transparent transmissions |
CN109660637A (en) * | 2018-11-16 | 2019-04-19 | 深圳市网心科技有限公司 | P2P burrows transmission method and system, electronic device and computer readable storage medium |
CN110209107A (en) * | 2019-05-10 | 2019-09-06 | 宁波安信数控技术有限公司 | A kind of method and system by DTU remote debugging PLC device |
Non-Patent Citations (2)
Title |
---|
李自荐等: "P2P网络通信中NAT穿越技术的研究及实现", 《数字技术与应用》, 15 August 2015 (2015-08-15), pages 34 - 35 * |
贺杰等: "《全国高等院校"十三五"创新型规划教材 计算机网络》", 西南交通大学出版社, pages: 100 - 101 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113775936A (en) * | 2021-08-18 | 2021-12-10 | 国家管网集团大连液化天然气有限公司 | Multi-main acquisition method for auxiliary system of LNG receiving station |
CN113775936B (en) * | 2021-08-18 | 2023-10-24 | 国家管网集团大连液化天然气有限公司 | Multi-main acquisition method for LNG receiving station auxiliary system |
CN116017793A (en) * | 2022-12-30 | 2023-04-25 | 浙江云莱汇智能科技有限公司 | Machine tool 5G edge gateway design |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101442492B (en) | Method and system for implementing NAT penetration in P2P network | |
CN101465844B (en) | Method, system and equipment for traversing firewall | |
CN107360177B (en) | A kind of message transmitting method and device based on UDP | |
CN104717259B (en) | The multi-path data Transmission system and method for distributed transfer server network assistance | |
EP3525421B1 (en) | Data transmission method and apparatus | |
US20120099579A1 (en) | Zigbee gateway and ip service server interworking with zigbee gateway through ip network | |
CN111506013A (en) | P L C device remote data communication implementation method based on virtual serial port | |
EP2466806A1 (en) | Method and system for implementing network intercommunication | |
CN109217983B (en) | Industrial Internet of things operation terminal communication protocol design method | |
GB2519491A (en) | Method and system for increasing data flow transmission | |
CN111818040A (en) | Method for realizing communication by Internet of things transmission standard protocol | |
CN102932461A (en) | Network acceleration transmission method and device | |
CN109756475B (en) | Data transmission method and device in unidirectional network | |
CN111740939A (en) | Message transmission device, message transmission equipment, message transmission method and storage medium | |
CN114172948A (en) | IP transparent transmission gateway transmission system and method based on UDP | |
CN102055774B (en) | Based on http server and the data processing method thereof of bag process | |
JP3493660B2 (en) | Protocol conversion device, protocol conversion method thereof, and protocol conversion program | |
CN112511377B (en) | TCP network acceleration method based on ARQ and UDP protocols | |
JP2000236348A (en) | Management system of remote equipment using internet protocol | |
CN115314544B (en) | TCP data unidirectional transmission method, device, equipment and medium | |
CN112468513B (en) | Terminal management communication method for enterprise network | |
CN106656813B (en) | Data transmission method | |
Cisco | Data-Link Switching (DLSw) | |
CN114070806A (en) | Unmanned aerial vehicle system based on variable message format data link and communication method | |
EP3367599B1 (en) | Method and system for transferring data within a layered architecture of network components |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200807 |
|
RJ01 | Rejection of invention patent application after publication |