CN110708239B - Industrial Internet of things gateway based on OPC and MQTT - Google Patents

Industrial Internet of things gateway based on OPC and MQTT Download PDF

Info

Publication number
CN110708239B
CN110708239B CN201910878004.2A CN201910878004A CN110708239B CN 110708239 B CN110708239 B CN 110708239B CN 201910878004 A CN201910878004 A CN 201910878004A CN 110708239 B CN110708239 B CN 110708239B
Authority
CN
China
Prior art keywords
data
mqtt
opc
controller
server
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
Application number
CN201910878004.2A
Other languages
Chinese (zh)
Other versions
CN110708239A (en
Inventor
尹晓东
蒋秋明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Shangshi longchuang Intelligent Technology Co., Ltd
Original Assignee
Shanghai Siic Longchuang Smarter Energy Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Siic Longchuang Smarter Energy Technology Co ltd filed Critical Shanghai Siic Longchuang Smarter Energy Technology Co ltd
Priority to CN201910878004.2A priority Critical patent/CN110708239B/en
Publication of CN110708239A publication Critical patent/CN110708239A/en
Application granted granted Critical
Publication of CN110708239B publication Critical patent/CN110708239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The invention relates to an industrial Internet of things gateway based on OPC and MQTT, which comprises a controller, wherein the controller is respectively connected with an OPC server and an MQTT server in a bidirectional way, the controller realizes the conversion from OPC data to MQTT data, the controller classifies the OPC data, and the OPC data of different classes are transmitted to a terminal which is connected with the MQTT server in the bidirectional way through the MQTT server in different ways. Compared with the prior art, the invention can remotely check the real-time state and trend data of each actuator and sensor in a factory through the APP terminal, and can remotely control the state of the actuator; when the equipment is abnormal, the alarm data can be pushed to the user through the APP, and the user is reminded to timely handle the equipment abnormality; different OPC data are combined to use scenes so as to achieve the purposes of reducing bandwidth occupation, ensuring key information to arrive and not to be lost and the like.

Description

Industrial Internet of things gateway based on OPC and MQTT
Technical Field
The invention relates to the field of industrial Internet of things gateways, in particular to an industrial Internet of things gateway based on OPC and MQTT.
Background
MQTT (Message Queuing Telemetry Transport) is a "lightweight" communication protocol based on publish/subscribe (publish/subscribe) mode, which is built on TCP/IP protocol and published by IBM in 1999. The MQTT has the greatest advantage that a real-time reliable message service can be provided for connecting remote devices with few codes and limited bandwidth. As an instant messaging protocol with low cost and low bandwidth occupation, the method has wide application in the aspects of Internet of things, small-sized equipment, mobile application and the like.
OPC (Object Linking and Embedding (OLE) for Process Control) is a standard, and is an application of Object Linking and Embedding technology of Microsoft corporation in Process Control. The OPC specification evolved from the OLE/COM/DCOM technology and established a unified standard in the C/S model for the development of object-oriented industrial automation software, in which a method for automated data exchange in real time between PC-based clients is defined. After the OPC standard is adopted, a driver is not developed by a software developer, but a hardware developer encapsulates each hardware device driver and communication program into a data server which can independently run or run in an embedded manner according to the characteristics of hardware.
The specification of the chinese invention patent CN109150703B discloses an industrial internet of things intelligent cloud gateway and a communication method thereof, wherein the gateway comprises a data acquisition module, which is specifically used for acquiring industrial data acquired by network equipment in a heterogeneous network; the protocol analysis and conversion module is specifically used for carrying out protocol analysis on the industrial data and converting the industrial data with different communication protocols into OPC UA standard data; further converting the obtained OPC UA standard data into MQTT protocol data; and the cloud transmission module is specifically used for sending the MQTT protocol data to a cloud platform. The gateway cannot classify OPC standard data and cannot transmit different types of OPC standard data to the terminal through the MQTT server in different ways.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provide an industrial internet of things gateway based on OPC and MQTT.
The purpose of the invention can be realized by the following technical scheme:
the industrial Internet of things gateway based on OPC and MQTT comprises a controller, wherein the controller is respectively connected with an OPC server and an MQTT server in a two-way mode, the controller realizes the conversion from OPC data to MQTT data, the controller classifies the OPC data, and different types of OPC data are transmitted to terminals which are connected with the MQTT server in the two-way mode through the MQTT server in different modes.
The OPC server is connected with factory equipment in a bidirectional mode, and the MQTT server is connected with a terminal in a bidirectional mode.
The factory equipment is a sensor and an actuator which support OPC.
The terminal is the APP, the APP displays the state of the data points in the controller, receives an MQTT instruction for modifying the data points in the controller by a user and transmits the MQTT instruction to the MQTT server, the controller receives the MQTT instruction transmitted by the MQTT server and modifies the data points in the controller, and the OPC server controls the factory equipment.
The APP and the controller subscribe the same MQTT Topic.
The different categories of OPC data include alarm data, real-time data and trend data.
When the alarm data is higher or lower than a set threshold value, the controller transmits the alarm data to the terminal through the MQTT server; the terminal initiates the inquiry of real-time data, and the controller transmits the real-time data to the terminal through the MQTT server after receiving inquiry information; the controller transmits the trend data to the terminal through the MQTT server at regular time.
The controller is respectively connected with the OPC server and the MQTT server through RJ45 connectors.
Compared with the prior art, the invention has the following advantages:
(1) the controller classifies the OPC data, different types of OPC data are transmitted to the terminal through the MQTT server in different modes, and different OPC data can be combined to use scenes so as to achieve the purposes of reducing bandwidth occupation and ensuring that key information arrives and cannot be lost.
(2) The terminal is APP, can make things convenient for the user to read factory equipment data information, and the MQTT instruction of receiving user modification data point in the controller, and then realize the control to factory equipment, convenient and easy going.
(3) MQTT has low cost and low bandwidth occupation, and can better carry out instant messaging.
(4) And an RJ45 interface is adopted, and a twisted pair is used for access, so that convenient, quick, simple and reliable connection is realized.
Drawings
FIG. 1 is a schematic structural diagram of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the scope of the present invention is not limited to the following embodiments.
Examples
The embodiment provides an industrial internet of things gateway based on OPC and MQTT, which comprises a controller, wherein the controller is respectively connected with an OPC server and an MQTT server in a bidirectional mode through a network cable (RJ45 interface), the OPC server is connected with factory equipment in a bidirectional mode, the factory equipment is a sensor and an actuator for supporting the OPC, the OPC server acquires OPC data of each factory equipment and transmits the OPC data to the controller, the controller transmits the acquired OPC data to a terminal in the bidirectional mode, and the terminal can be an APP; the user can also control the state of the factory equipment through the APP terminal; the controller of the present embodiment employs an STM32F103 chip.
The embodiment is characterized in that the controller collects OPC data of factory equipment through the OPC server and classifies the OPC data according to alarm data, real-time data, trend data and the like. Different data are forwarded to an APP for display through an MQTT server according to respective classification and different logics and sending frequency, a controller and the APP subscribe the same MQTT Topic, real-time data are inquired by an APP terminal, and the controller receives the inquiry and then transmits the real-time data to the APP through the MQTT server; the controller packs the trend data in a certain period, and transmits the trend data pack to the APP through the MQTT server at regular time after a period of time; when the data is higher than or lower than the set threshold value, the controller transmits preset alarm information to the APP through the MQTT server.
When the controller receives the response of the OPC server to the real-time data action initiated by the APP terminal through the MQTT, the controller stores the received OPC data locally, updates the state of the internal point table and simultaneously issues the data content to the APP terminal in at most one message; when the controller receives alarm data sent by the OPC server and is higher or lower than a set threshold, the controller can issue and push the alarm data to the APP terminal by at least one-time message to remind a user of timely handling equipment abnormality; when the APP terminal inquires the historical data, the controller packs the trend data in a certain period, and the MQTT request of the APP terminal is replied by at least one-time message issuing.
The APP receives data transmitted by the controller through the MQTT server and displays the data on the interface in a classified mode. The user can check the state of the data points in the controller through the APP, and can use the APP to modify the data points in the controller through the MQTT server and control the actuators of the plant through the OPC server.
Data points in the controller are mainly divided into two types, one is an Input point, and the other is an Output point. The Input point is uncontrollable, can be used for storing data collected from an OPC server, and can judge whether the factory equipment is in an abnormal state or not by setting an alarm threshold. The Output point is associated with a control point of an actuator of the plant, and states of the actuator in the plant, such as on/off states, can be controlled by changing states of the Output data point in the controller with reference to the specification of the actuator.
The embodiment can be used for forwarding, displaying and controlling data to an APP interface in the factory OPC server.
The embodiment has the following advantages:
the controller classifies the OPC data, different types of OPC data are transmitted to the terminal through the MQTT server in different modes, and different OPC data can be combined to use scenes so as to achieve the purposes of reducing bandwidth occupation and ensuring that key information arrives and cannot be lost.
The terminal is APP, can make things convenient for the user to read factory equipment data information, and the MQTT instruction of receiving user modification data point in the controller, and then realize the control to factory equipment, convenient and easy going.
MQTT has low cost and low bandwidth occupation, and can better carry out instant messaging.
And an RJ45 interface is adopted, and a twisted pair is used for access, so that convenient, quick, simple and reliable connection is realized.
It should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (2)

1. The industrial Internet of things gateway based on OPC and MQTT comprises a controller, wherein the controller is respectively connected with an OPC server and an MQTT server in a bidirectional mode and realizes the conversion from OPC data to MQTT data;
the OPC server is bidirectionally connected with factory equipment, and the MQTT server is bidirectionally connected with a terminal;
the factory equipment is a sensor and an actuator which support OPC;
the terminal comprises an APP, the APP displays the state of a data point in the controller, receives an MQTT instruction for a user to modify the data point in the controller and transmits the MQTT instruction to the MQTT server, the controller receives the MQTT instruction transmitted by the MQTT server and modifies the data point in the controller, and factory equipment is controlled by the OPC server;
the APP and the controller subscribe the same MQTT Topic;
the different types of OPC data comprise alarm data, real-time data and trend data;
when the alarm data is higher or lower than a set threshold value, the controller transmits the alarm data to the terminal through the MQTT server; the terminal initiates the inquiry of real-time data, and the controller transmits the real-time data to the terminal through the MQTT server after receiving inquiry information; the controller transmits the trend data to the terminal through the MQTT server at regular time;
collect plant equipment's OPC data through OPC server after according to alarm data, real-time data and trend data classify, different data are according to respective classification, forward APP through MQTT server with different logics and frequency of sending and show, real-time data launches the inquiry by the APP end, the controller receives after the inquiry instant data and passes through MQTT server and convey to APP, the trend data packing of controller in with certain period, regularly pass through MQTT server with trend data package and convey to APP after a period of time, when data is higher than or is less than the settlement threshold value, the controller passes through MQTT server with predetermined alarm information and conveys to APP.
2. The gateway of claim 1, wherein the controller is connected to the OPC server and the MQTT server via RJ45 connectors.
CN201910878004.2A 2019-09-17 2019-09-17 Industrial Internet of things gateway based on OPC and MQTT Active CN110708239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910878004.2A CN110708239B (en) 2019-09-17 2019-09-17 Industrial Internet of things gateway based on OPC and MQTT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910878004.2A CN110708239B (en) 2019-09-17 2019-09-17 Industrial Internet of things gateway based on OPC and MQTT

Publications (2)

Publication Number Publication Date
CN110708239A CN110708239A (en) 2020-01-17
CN110708239B true CN110708239B (en) 2021-06-15

Family

ID=69194538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910878004.2A Active CN110708239B (en) 2019-09-17 2019-09-17 Industrial Internet of things gateway based on OPC and MQTT

Country Status (1)

Country Link
CN (1) CN110708239B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114793188A (en) * 2021-10-29 2022-07-26 天津长荣科技集团股份有限公司 Intelligent gateway data acquisition and pushing method
CN114095554B (en) * 2021-12-01 2024-01-12 浙江国利网安科技有限公司 Industrial control data processing method and device, storage medium and industrial control gateway
CN115002148A (en) * 2022-04-21 2022-09-02 浪潮云信息技术股份公司 Internet of things cloud side communication method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107104975A (en) * 2017-05-22 2017-08-29 郑州云海信息技术有限公司 Data poolization layer, system and its implementation of a kind of support isomery based on MDC
US10326802B1 (en) * 2018-12-04 2019-06-18 Xage Security, Inc. Centrally managing data for orchestrating and managing user accounts and access control and security policies remotely across multiple devices

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN209345198U (en) * 2019-03-22 2019-09-03 索提斯实业(上海)有限公司 A kind of infant industry things-internet gateway

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107104975A (en) * 2017-05-22 2017-08-29 郑州云海信息技术有限公司 Data poolization layer, system and its implementation of a kind of support isomery based on MDC
US10326802B1 (en) * 2018-12-04 2019-06-18 Xage Security, Inc. Centrally managing data for orchestrating and managing user accounts and access control and security policies remotely across multiple devices

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"基于OPC与MQTT的工业物联网网关的设计与实现";赵晓峰等;《柳州职业技术学院学报》;20180630;全文 *
"基于百度云平台的泵站监测系统的设计与实现";韩续;《中国优秀硕士学位论文全文数据库工程科技》;20190615;全文 *

Also Published As

Publication number Publication date
CN110708239A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN110708239B (en) Industrial Internet of things gateway based on OPC and MQTT
CN111031034A (en) Multi-protocol convergence edge computing gateway
CN110266794A (en) Method for subscribing and system are acted on behalf of based on MQTT server
CN106549864B (en) A kind of Realization Method of Communication of cloud gateway
CN111142487A (en) Equipment data acquisition system based on OPC UA unified architecture protocol
CN108989358B (en) Method for acquiring running data of textile machine based on TCP/IP protocol
CN110995859A (en) Intelligent transformer substation supporting platform system based on ubiquitous Internet of things
CN112187922A (en) Intelligent Internet of things shutdown machine based on MQTT communication protocol
KR102077384B1 (en) Artificial intelligence system for real-time training and calling and processing method thereof
CN109302476A (en) A kind of PLC program upgrade method and system based on mobile terminal
CN109656210A (en) Industrial data acquisition method, system and main system
CN111224868B (en) Control system and control method of gateway of Internet of things
CN110703617A (en) Intelligent home control system based on MQTT
CN103763395A (en) Middleware connecting internet of things management platform with terminal device and working method of middleware
CN113852785A (en) Intelligent monitoring and scheduling method, device and system based on 5G
CN106953891A (en) A kind of advertisement screen long-range control method and system
CN113315780A (en) Method and device for connecting and controlling single system and multiple AGVs
CN101902457B (en) System for configuring external communication protocol and method thereof
CN110320853A (en) A kind of plc data capturing analysis method and system
CN112822171A (en) Preposed acquisition system and method based on Internet of things protocol
CN112078634A (en) Uncoupling hook control method and device, electronic equipment and storage medium
CN104270432A (en) Real-time data service system and data interaction method based on drilling industry
CN108243232B (en) Industrial network information interconnection method and system
CN1232915C (en) Field bus network controller
CN210780850U (en) Internet of things radio frequency control intelligent gateway

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 200436 5th floor, 1198 Wanrong Road, Jing'an District, Shanghai

Patentee after: Shanghai Shangshi longchuang Intelligent Technology Co., Ltd

Address before: 200436 5th floor, 1198 Wanrong Road, Jing'an District, Shanghai

Patentee before: SHANGHAI SIIC-LONGCHUANG SMARTER ENERGY TECHNOLOGY Co.,Ltd.