MQTT Sparkplug for IIoT solutions with PLC
MQTT Sparkplug is an interoperability protocol designed to optimize industrial automation and smart manufacturing applications. Building on the standard MQTT protocol, Sparkplug ensures seamless communication between devices and systems by defining a standard payload and topic structure. Its introduction into the IIoT landscape has revolutionized data exchange and system integration, enhancing efficiency and enabling more robust and scalable automation solutions.
In this article, we’ll dive into the features of MQTT Sparkplug B, exploring how it provides a consistent framework for equipment manufacturers and system developers to share contextual data, driving the digital transformation of industrial operations.
MQTT Sparkplug: gaining traction in the industry
The Industrial Internet of Things (IIoT) and Industry 4.0 have become foundational pillars in the manufacturing sector, representing cutting-edge technologies that drive operational efficiency, on-demand production, and real-time insights. However, the technologies traditionally used for software and hardware integration were often proprietary and closed, with little focus on interoperability.
While protocols like OPC-UA were introduced to provide a common language between devices, machines, and applications, its complexity limited its performance in lightweight operations that require agility, high interoperability, and seamless integration across software and hardware systems.
The rise of the MQTT protocol addressed some of these challenges by enabling low-latency, high-throughput communication in cloud-based applications. However, many developers were looking for a solution as straightforward as MQTT for manufacturing environments, but with the added capability of unified payload definitions and message behavior across machines and vendors. These needs were met with the introduction of the Sparkplug protocol, an MQTT-based standard.
What is sparkplug and how is it shaping the industry?
Sparkplug is an open-source software specification that gives MQTT users the tools to integrate data from applications, sensors, devices, and gateways in a bidirectional, interoperable manner.
Sparkplug is designed to work natively with MQTT through its publish/subscribe model, enabling decoupled, bidirectional integration across all system components.
When MQTT was first developed in 1999, it was created for SCADA systems, but it did not define how topics and payloads should be structured or how devices should behave. This flexibility allowed MQTT to be adapted across various industries, including connected vehicles and smart manufacturing.
Today, Sparkplug fills in those gaps, offering a vendor-neutral specification for data formats, topic structures, state management, and system topology in IIoT environments.
The difference between MQTT and MQTT Sparkplug
With basic MQTT communication, it’s essential to ensure that every party involved knows where to subscribe to the relevant data streams. Additionally, all participants must be able to interpret the data, which often requires data transformations, creating a rigid coupling between applications.
In contrast, with Sparkplug, all participants agree on a common data format: how data is received, how it is published, and how it can be interpreted. What’s even better is that Sparkplug supports the integration of non-MQTT devices, as well as other protocols like OPC UA or MODBUS.
Benefits of using a Sparkplug architecture
A typical Industrial Internet of Things (IIoT) architecture connects components using a poll/response approach. Applications extract data directly from PLCs, gateways, or servers through protocols such as MODBUS, PROFINET, or OPC UA. While this approach works well when there are only a few systems to integrate, managing a larger number of components within the architecture becomes increasingly complex and difficult to maintain.
Traditional point-to-point interconnected systems create a fixed relationship between systems and their data. However, modern architectures demand flexibility and a clear separation between components in an IIoT system. Companies are increasingly seeking new architectures that combine the flexibility and adaptability of IT environments with the reliability, security, and predictability of OT systems.
This new IIoT architecture offers several benefits over traditional setups:
- Independence between data producers and consumers.
- Report by Exception (RBE), which saves bandwidth, memory, and computing power for both data producers and consumers.
- One-to-many communication, allowing data to be sent once and received by multiple subscribers.
- Flexibility to add or remove devices and applications without impacting the entire system.
- Centralized governance with permissions and policy management.
- Direct cloud connectivity, distributing data from the cloud to the edge.
Many industries are already using MQTT to build IIoT applications in distributed architectures, but they face limitations in defining topic structures, state management, and payload specifications. Sparkplug addresses these shortcomings, enhancing the capabilities of MQTT.
Key principles and mechanisms of MQTT Sparkplug
- Publish/Subscribe: Leverages MQTT’s publish/subscribe architecture as the application transport layer, decoupling data producers from consumers. MQTT’s push-based communication ensures that data is immediately distributed to all relevant parties.
- Report by Exception: Updates to data and device states are only transmitted when changes occur, saving bandwidth and computing power for all components.
- Continuous Session Monitoring: Both Sparkplug and MQTT provide continuous session tracking, keeping all clients informed of the real-time online/offline status of devices.
- Birth and Death Certificates: Sparkplug introduces Birth and Death Certificates for managing device state and discovery.
- Persistent Connections: Devices, gateways, and applications are always connected via persistent TCP connections.
- Automatic Discovery: Applications and devices can automatically detect which data and topics are being shared.
- Standardized Payload Definition: Sparkplug uses a standardized data format for all messages, which can be encoded and decoded by all participants.
- Standardized Topic Namespace: All Sparkplug participants adhere to a common topic namespace, enabling detailed subscriptions and the dynamic addition or removal of participants.
Components of an MQTT Sparkplug architecture
A typical Sparkplug architecture consists of the following components:
- SCADA/IIoT Host: The supervisory application responsible for monitoring and controlling MQTT EoN nodes and their respective devices and sensors. It is the central hub operators use to manage and oversee the entire system’s health and performance.
- EoN Nodes (Edge of Network): These nodes act as gateways, either physical or logical, for sensors and devices that do not natively support Sparkplug, allowing them to interact within the MQTT topic space. They manage the state and session of sensors and devices connected via protocols like OPC-UA, MODBUS, and others.
- Devices and Sensors: Essential to industrial automation, devices and sensors send and receive data using industrial poll/response protocols. In a Sparkplug setup, they connect through EoN nodes, bridging the gap between MQTT Sparkplug and these protocols. Devices that are compatible with MQTT Sparkplug can participate directly as EoN nodes.
- MQTT Application Nodes: These nodes produce and consume Sparkplug messages but are not the SCADA/IIoT Host. They are often software systems like MES or Historian applications.
- MQTT Broker: The MQTT broker acts as a central data distribution hub, connecting Sparkplug devices, EoN nodes, SCADA/IIoT Hosts, and applications. It handles authentication, authorization, and data distribution, supporting MQTT 3.1.1 to facilitate features like retained messages, Last Will and Testament (LWT), and Quality of Service (QoS).
These components work together to ensure efficient and scalable communication in industrial automation systems.
Nexto PLCs with MQTT Sparkplug B Support
To ensure top-tier performance and full interoperability in IIoT applications, the Nexto Series of programmable controllers now support MQTT Sparkplug B. These PLCs are compatible with version 3.0.0 of the Sparkplug specification and use the Sparkplug B encoding scheme (namespace spBv1.0/#). This new functionality enables products like the NX3008 CPU and Nexto Xpress compact controllers to function as EoN nodes in a Sparkplug infrastructure.
To help you get the most out of your IIoT applications using MQTT Sparkplug B, our R&D team has developed a comprehensive manual on the standard. This guide provides detailed technical descriptions to give you a solid foundation for implementing the MQTT Sparkplug B protocol in your IIoT systems using Altus PLCs.
Download the manual here.
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->