CN105306516B - A kind of enhanced Modbus communication means based on Internet of Things framework - Google Patents
A kind of enhanced Modbus communication means based on Internet of Things framework Download PDFInfo
- Publication number
- CN105306516B CN105306516B CN201410373623.3A CN201410373623A CN105306516B CN 105306516 B CN105306516 B CN 105306516B CN 201410373623 A CN201410373623 A CN 201410373623A CN 105306516 B CN105306516 B CN 105306516B
- Authority
- CN
- China
- Prior art keywords
- perception
- modbus
- border gateway
- gateway
- edge
- 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.)
- Active
Links
Abstract
The present invention relates to Internet of Things fields of communication technology, more particularly to a kind of enhanced Modbus protocol stack based on Internet of Things framework, it include: that the Modbus agreement controlled between device and sensor device is adopted at edge, the Modbus/TCP agreement between control device is adopted at perception Border Gateway and edge, is perceived adapter gateway and is perceived the enhanced Modbus translation-protocol between Border Gateway;The wherein enhanced Modbus translation-protocol, it is characterized by: being based on ICP/IP protocol, increase a function distinguishing byte on the basis of traditional Modbus/TCP MBAP heading, traffic differentiation code as Client application layer, the conversion of Modbus agreement is carried out according to traffic differentiation code by client computer, and parses the corresponding function code of Modbus agreement.The present invention extends the application range of Modbus agreement on a wide area network, enhances the cross-domain Distributed Application of network of internet of things service platform application layer and client computer, and be easy to the secondary development of Client application layer.
Description
Technical field
The present invention relates to Internet of Things field of communication technology more particularly to a kind of enhanced Modbus based on Internet of Things framework
Protocol stack.
Background technique
Modbus agreement is by Schneider company in a kind of serial communication protocol of exploitation in 1979.Using client computer/clothes
Business device mode is communicated, and issues service request from client computer to server, server passes through request of the function code to client computer
It responds.Since Modbus agreement has the characteristics that open, free and easy to learn, it is widely used to industrial automation
Control field.
With the development of computer and network technology, field device is carried out by Internet or Intranet long-range
Control has been to be concerned by more and more people, and Schneider company disclosed the Modbus/TCP agreement based on TCP/IP in 1999.
The agreement is the derivatives of Modbus serial protocols, by the way that simply Modbus frame is embedded into TCP frame, realizes client computer
Response formula Modbus message transmitting between server based on TCP/IP.The characteristics of Modbus/TCP, determines that it is most general
Purposes is for such as PLC, I/O module and to connect the gateway services of other simple field buses.
Internet of Things application platform often uses the hardware and software platform construction of strategy based on multistory frame structure, generally by perceiving
Layer, transport layer and platform application layer three parts composition, sensing layer mainly adopt control device and all kinds of by perception Border Gateway, edge
Sensor, controller composition;Transport layer mainly includes a variety of communication networks such as 3G, 4G, WIFI;Platform application layer is mainly by applying
Platform, data center and perception adapter gateway composition.Wherein, perception adapter gateway be located at platform application layer and sensing layer it
Between, the function of realization is the protocol analysis and relay forwarding of data;Perception Border Gateway is the data channel that control device is adopted at edge, is born
The forwarding service of all kinds of heat transfer agents Yu control instruction information is blamed, and has the function of local device configuration management.Perceive edge
It is connected between gateway and perception adapter gateway by wide area network;Perception Border Gateway and edge, which are adopted, generally passes through local between control device
Net or the connection of VPN private network;It adopts between control device and various kinds of sensors, controller generally by serial link (such as RS485 at edge
Deng) connection.
Based on foregoing description it is found that Modbus/TCP perfect can realize that perception Border Gateway and edge adopt leading between control device
News, but the communication being unable to complete between perception Border Gateway and upper level perception adapter gateway.Therefore, set forth herein a kind of bases
This is solved the problems, such as in the enhanced Modbus protocol stack of Internet of Things framework, meets the application scenarios of Internet of Things framework.
Summary of the invention
The purpose of the present invention:
In order to overcome the limitation of Modbus/TCP agreement in IoT applications, the invention proposes one kind to be based on Internet of Things
The enhanced Modbus protocol stack of planar network architecture, to realize the number of service application platform and headend equipment in Internet of Things application scenarios
According to exchange.
Technical scheme is as follows:
A kind of enhanced Modbus protocol stack based on Internet of Things framework, comprising: edge adopt control device and sensor device it
Between Modbus agreement, perceive Border Gateway and edge and adopt Modbus/TCP agreement between control device, perception adapter gateway and sense
Know the enhanced Modbus translation-protocol between Border Gateway;The wherein enhanced Modbus translation-protocol, it is characterised in that:
Based on ICP/IP protocol, increase a function distinguishing byte on the basis of traditional Modbus/TCP MBAP heading, as visitor
The traffic differentiation code of family application layer, the conversion of Modbus agreement is carried out by client computer according to traffic differentiation code, and is parsed
The corresponding function code of Modbus agreement out, underlying protocol of the Client application layer without the concern for Modbus.
The beneficial effects of the present invention are:
A kind of enhanced Modbus protocol stack based on Internet of Things framework provided in the present invention, extends Modbus agreement
Application range on a wide area network enhances the cross-domain Distributed Application of network of internet of things service platform application layer and client computer,
And it is easy to the secondary development of Client application layer.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the enhanced Modbus protocol stack in the present invention based on Internet of Things framework.
Fig. 2 is net of the enhanced Modbus protocol stack in Internet of Things application scenarios in the present invention based on Internet of Things framework
Network topo graph.
Specific embodiment
Present invention will be further explained below with reference to the attached drawings and examples, and described embodiment is a part of the invention
Embodiment, the embodiment being not all of.
As shown in Figure 1, the enhanced Modbus protocol stack in the present invention based on Internet of Things framework, consists of three parts, packet
Include: the Modbus agreement between control device and sensor device is adopted at edge, perceives Border Gateway and edge is adopted between control device
Modbus/Transmission Control Protocol perceives adapter gateway and perceives the enhanced Modbus translation-protocol between Border Gateway.
The enhanced Modbus translation-protocol is based on ICP/IP protocol, in traditional Modbus/TCP MBAP heading
On the basis of increase a function distinguishing byte, as the traffic differentiation code of Client application layer, by client computer according to service area
Divide code to carry out the conversion of Modbus agreement, and parses the corresponding function code of Modbus agreement.Implementation steps include
The definition of MBAP heading format and the definition of PDU format.
The enhanced Modbus translation-protocol MBAP heading format definition:
Increase a function distinguishing byte on the basis of traditional Modbus/TCP MBAP heading, as Client application
The traffic differentiation code of layer, the starting request of Client application layer, client computer replicate again from received request.
The enhanced Modbus translation-protocol PDU format definition:
The physical address that underlying device is known for the ease of platform of internet of things application layer defines in the PDU of translation-protocol
Border Gateway ID, main equipment ID, device type concept, corresponding relationship is as follows:
ID: Modbus client computer IP of Border Gateway
Main equipment ID:Modbus server ip
Sub- device id: the device address on the serial subnet of Modbus
The embodiment of the present invention adopts control device with edge by local area network and is connected as shown in Fig. 2, perception Border Gateway, edge
Adopt the Modbus subnet that control device has been attached to a serial connection;Border Gateway is perceived by enhanced Modbus translation-protocol wide
Domain is connect with perception adapter gateway on the net, to realize the data exchange of internet of things service application platform and headend equipment.
Specific embodiment includes perceiving adapter gateway and perceiving the network communication between Border Gateway and perceive edge net
It closes and the network communication controlled between device is adopted at edge.
The network communication mode for perceiving adapter gateway and perceiving between Border Gateway is as follows:
1) perception adapter gateway monitors a designated port, receives the connection of perception Border Gateway, multiple perception edges net
After connection is connected to perception adapter gateway, it is ready for sending down order and receives uplink Modus device data;
2) after perception adapter gateway logins successfully, according to the pre-set timing uplink time of platform application layer, it is fixed to send
After the order of Shi Shangchuan gives perception Border Gateway, perception Border Gateway to receive timing upload command, use
The scheduleWithFixedDelay method of ScheduledExecutorService class executes the task of timer, specified
Time interval reach when, perception Border Gateway timing upload Modbus facility information content;
3) perception adapter gateway controls the page by Web, and the history of inquiry specified sensor is sent to perception Border Gateway
Data command.The method for searching specified sensor are as follows: adopt control device ID → sensor ID in perception Border Gateway ID → edge.Perception is suitable
Take out the Socket connection of corresponding perception Border Gateway ID in the pond Socket of preservation by perceiving Border Gateway ID with gateway,
And the message for sending querying command is simultaneously uploaded to sense to Border Gateway, the data that perception Border Gateway obtains specified sensor are perceived
Know adapter gateway;
4) perception adapter gateway controls the page by Web, sends control instruction to Assign Controller to perception Border Gateway
Order.The method for searching Assign Controller are as follows: adopt control device ID → controller ID in perception Border Gateway ID → edge.Perception adaptation
Gateway takes out the Socket connection of corresponding perception Border Gateway ID by perceiving Border Gateway ID in the pond Socket of preservation, and
The message of querying command is sent to perception Border Gateway, the address of perception Border Gateway acquisition Assign Controller sends control life
The data of order are simultaneously uploaded to perception adapter gateway.
The network communication mode that perception Border Gateway and edge are adopted between control device is as follows:
1) perception Border Gateway monitors a designated port, receives the connection that control device is adopted at edge, and multiple edges are adopted control device and connected
It is connected to perception Border Gateway, receives uplink Modbus device data, and be saved in database;
2) it when perception Border Gateway receives inquiry sensor historic data command, according to querying command, knows to look into
The sensor ID of inquiry and the period of inquiry inquire the history number of specified sensor according to the period of acquisition from database
According to the historical data of acquisition being dispensed in a manner of enhanced Modbus translation-protocol, and upload to perception adapter gateway;
3) when perception Border Gateway receives control command, according to control command, know that control device ID and controller are adopted in edge
ID, and further obtain edge adopt control device and controller link address, control device is adopted to edge using Modbus/TCP agreement
Control command is sent, edge, which is adopted after control device receives control command, uses Modbus agreement to send control command to specified control
Device.
Claims (1)
1. a kind of enhanced Modbus communication means based on Internet of Things framework, it is characterised in that: in traditional Modbus/TCP
Increase a function distinguishing byte on the basis of MBAP heading, as the traffic differentiation code of Client application layer, by perceiving side
Hoddy, which is closed, parses corresponding function code according to enhanced Modbus translation-protocol, and according to function distinguishing code, is looked into
The Modbus device data that ask, control, will acquire periodically uploads after carrying out message assembling, specifically includes the following steps:
(1) it perceives adapter gateway and perceives the network communication method between Border Gateway are as follows:
It perceives adapter gateway and monitors a designated port, receive the connection of perception Border Gateway, multiple perception Border Gateway connections
To after perception adapter gateway, it is ready for sending down order and receives uplink Modus device data;
After perception adapter gateway logins successfully, according to the pre-set timing uplink time of platform application layer, transmission timing is uploaded
Order to perception Border Gateway, perception Border Gateway receive timing upload command after, use
The scheduleWithFixedDelay method of ScheduledExecutorService class executes the task of timer, specified
Time interval reach when, perception Border Gateway timing upload Modbus facility information content;
It perceives adapter gateway and the page is controlled by Web, the historical data life of inquiry specified sensor is sent to perception Border Gateway
It enables, the method for searching specified sensor are as follows: perception Border Gateway ID searches edge and adopts control device ID, and edge adopts control device ID and searches sensing
Device ID, perception adapter gateway take out corresponding perception Border Gateway ID's by perceiving Border Gateway ID in the pond Socket of preservation
Socket connection, and the message for sending querying command perceives the number that Border Gateway obtains specified sensor to perception Border Gateway
According to and be uploaded to perception adapter gateway;
It perceives adapter gateway and the page is controlled by Web, send the order of control instruction to Assign Controller to perception Border Gateway,
The method for searching Assign Controller are as follows: perception Border Gateway ID searches edge and adopts control device ID, and edge adopts control device ID and searches controller
ID, perception adapter gateway take out corresponding perception Border Gateway ID's by perceiving Border Gateway ID in the pond Socket of preservation
Socket connection, and the message for sending querying command perceives the ground that Border Gateway obtains Assign Controller to perception Border Gateway
Location sends the data of control command and is uploaded to perception adapter gateway;
(2) it perceives Border Gateway and the network communication method controlled between device is adopted at edge are as follows:
It perceives Border Gateway and monitors a designated port, receive the connection that control device is adopted at edge, multiple edges adopt control device and are connected to sense
Know Border Gateway, receives uplink Modbus device data, and be saved in database;
When perception Border Gateway receives inquiry sensor historic data command, according to querying command, the sensing of inquiry is known to
The period of device ID and inquiry inquire the historical data of specified sensor according to the period of acquisition from database, acquisition
Historical data dispensed in a manner of enhanced Modbus translation-protocol, and upload to perception adapter gateway;
When perception Border Gateway receives control command, according to control command, know that the ID of control device ID and controller is adopted at edge, and
The link address for adopting control device and controller in edge is further obtained, control device is adopted to edge using Modbus/TCP agreement and sends control
Order, edge, which is adopted after control device receives control command, uses Modbus agreement to send control command to specified controller.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410373623.3A CN105306516B (en) | 2014-08-01 | 2014-08-01 | A kind of enhanced Modbus communication means based on Internet of Things framework |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410373623.3A CN105306516B (en) | 2014-08-01 | 2014-08-01 | A kind of enhanced Modbus communication means based on Internet of Things framework |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105306516A CN105306516A (en) | 2016-02-03 |
CN105306516B true CN105306516B (en) | 2019-10-22 |
Family
ID=55203264
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410373623.3A Active CN105306516B (en) | 2014-08-01 | 2014-08-01 | A kind of enhanced Modbus communication means based on Internet of Things framework |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105306516B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113867230A (en) * | 2021-10-20 | 2021-12-31 | 南京邮电大学 | Modbus remote operation control system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101685301A (en) * | 2009-07-29 | 2010-03-31 | 东华大学 | Embedded type state monitoring information adaptor capable of operating under complex working conditions of numerically-controlled machine tool and method thereof |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6434157B1 (en) * | 1998-10-06 | 2002-08-13 | Schneider Automation, Inc. | MODBUS plus ethernet bridge |
TWI481245B (en) * | 2012-12-19 | 2015-04-11 | Motech Ind Inc | Address setting method for slave devices of communication network |
-
2014
- 2014-08-01 CN CN201410373623.3A patent/CN105306516B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101685301A (en) * | 2009-07-29 | 2010-03-31 | 东华大学 | Embedded type state monitoring information adaptor capable of operating under complex working conditions of numerically-controlled machine tool and method thereof |
Non-Patent Citations (1)
Title |
---|
《基于M o d b us / T C P 的嵌入式系统网络通信设计实现》;任会峰等;《计算机测量与控制》;20070930;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN105306516A (en) | 2016-02-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3440875B1 (en) | Proxy devices and method for serving sleepy internet-of-things devices | |
US10326518B1 (en) | Repeater and node utilization | |
CN102546800B (en) | Handshake and communication methods for gateway, gateway and Web communication system | |
CN105159256B (en) | A kind of intelligent home control system based on Web service | |
KR101697320B1 (en) | Apparatus and Method for Supporting Sensor Data Transmission based on Internet | |
CN103201689B (en) | There is field panel and the access method thereof of embedded web server | |
WO2009158154A3 (en) | System and method to control wireless communications | |
JP2008098888A (en) | Relay server | |
CN104270355A (en) | Cross-safety-zone data transmission method based on network bus | |
WO2008073658A3 (en) | Portable device for convergence and automation solution | |
WO2004063946A3 (en) | Communication system facilitating real time data over the internet using global load balancing | |
WO2006136915A3 (en) | System and method for establishing peer to peer connections between pcs and smart phones using networks with obstacles | |
CN103795632A (en) | Data message transmission method, related equipment and system | |
CN104092790B (en) | Base station master-slave communication method and system | |
CN105391639A (en) | Internet-of-things intelligent gateway routing method and Internet-of-things intelligent gateway routing system | |
US10687390B2 (en) | Node bridge | |
CN103428303A (en) | Method and system for IPv6 host to have access to IPv4 server | |
CN105306516B (en) | A kind of enhanced Modbus communication means based on Internet of Things framework | |
CN103516794B (en) | The network architecture of a kind of distributed server and its implementation | |
WO2011056315A3 (en) | Systems and methods for secure access to remote networks utilizing wireless networks | |
WO2012082920A3 (en) | System and method for content-oriented network interworking | |
MY158580A (en) | Method of communicating data to multiple sensor networks | |
CN105592038A (en) | Portal authentication method and device | |
CN110460483A (en) | A kind of Profinet and Modbus equipment isomery network-building method based on SDN | |
CN103312600B (en) | A kind of industrial bus gateway apparatus realizing the control of I/O rank based on wide area network application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |