Building OPC UA IIoT Applications with MQTT for Bandwidth-Limited Applications
OPC UA and MQTT are open source technologies representative of the architectural evolution of industrial automation towards greater flexibility and interoperability. The OPC UA IIoT Starter Kit combines them so that users can create solutions for bandwidth limited applications.
Low-cost sensors and industrial Internet of Things (IIoT) technology enable the monitoring and control of more systems over many transport methods, including limited bandwidth wired, wireless and cloud connections over common operators. OPC UA messaging over Message Queuing Telemetry Transport (MQTT) protocol provides a lightweight solution for applications where network bandwidth is limited. This combination offers both the strengths of OPC UA data models (dramatically reduced application engineering work and improved reliability) and the benefits of efficient MQTT communications over constrained networks.
More importantly, OPC UA and MQTT are two open source technologies representative of the architectural evolution of industrial automation towards greater flexibility and interoperability of systems. During OPC Day 2021 – International, a conference hosted virtually by the OPC Foundation from June 8-10, attendees learned how they can apply these and other technologies.
MQTT is a lightweight publish / subscribe messaging protocol designed for low bandwidth, high latency, and unreliable networks residing on top of the TCP / IP network stack. MQTT was created in 1999 by two engineers Andy Stanford-Clark (IBM) and Arlen Nipper (Eurotech) who invented the protocol for connecting pipelines to unreliable satellite networks. In 2011, IBM and Eurotech donated MQTT to the proposed Eclipse project called Paho. In 2013, it was submitted to OASIS for standardization. The latest version of the protocol specification, 3.11 has become an OASIS standard.
OPC UA is a data model-based industrial interoperability framework that provides a syntactic definition of information that can be communicated with virtually any communication method, including modern industrial protocols, Ethernet, cellular, and wireless. Device and machine manufacturers describe the object-oriented information of their system and define access rights with integrated IT security. OPC UA is an IEC62541 open-frame standard providing end-to-end secure information exchange with open specifications, open source code (GitHub), and open certification labs (without being a paid member). The more than 63 OPC Foundation member organizations have defined and continue to define standardized use case information models (pumps, motors, robots, etc.) to significantly reduce application engineering work and increase the quality.
Democratizing engineering data, CESMII – the Smart Manufacturing Institute has standardized OPC UA information models as a component of its platform and smart manufacturing innovation profiles (CESMII information models) with the Cloud Library initiative. The goal is to achieve a frictionless flow of data models and associated information for manufacturing and process users, including application engineers, manufacturing and process operations, and business management.
The CESMII will take advantage of the cloud library and extend these information models with greater context, by sharing these profiles, as well as a directory of industrial applications that support them, in the CESMII Smart Manufacturing (SM) market . It should be noted that the German Industry 4.0 platform and CESMII have entered into a partnership to address similar challenges in order for manufacturers to be competitive. This includes international collaboration to achieve major tasks, including semantic interoperability, create data sharing platforms, develop workforce skills and foster sustainable production.
OPC UA IIoT Starter Kit
During OPC Day 2021, the OPC UA IIoT Starter Kit was announced. It provides examples and tutorials for developing applications using OPC UA PubSub and MQTT. OPC UA PubSub is an extension of OPC UA that enables communication between OPC UA applications using a Publish-Subscribe message template instead of the Request-Response message template. The Publish-Subscribe message model decouples senders of messages from their recipients, allowing the development of systems based on middleware such as an MQTT broker. The difference between the two models is shown in the photo above this article.
UA PubSub is an extension of OPC UA that allows seamless integration of MQTT into the OPC UA system. It is NOT a replacement. This is a generic PubSub mechanism designed to work on any message-based middleware. UA PubSub to MQTT is a mapping that integrates MQTT functionality into UA PubSub.
OPC UA PubSub provides a complete solution which includes:
Support for multiple protocols.
Supports binary and JSON encodings.
Configuration information model and standard file format.
Integration with OPC UA information models.
The OPC UA IIoT StarterKit and documentation are available on GitHub. The StarterKit contains software designed to run on a Raspberry Pi or other Linux device with GPIO ports. It will also run on a Linux or Windows machine without GPIO ports in simulation mode.
This version of StarterKit uses .NET 5.0. An MQTT broker is required. Eclipse Mosquitto is used in the StarterKit documentation. The recommended development tool for the Raspberry Pi is Visual Studio Code. The recommended developer tool to build for Windows platforms is Visual Studio 2019. An MQTT monitoring application, such as MQTT Spy, is also useful.
Did you enjoy this great article?
Check out our free e-newsletters for more interesting articles.