Sparkplug is truly unique and offers a modern, free and open way for any of your devices to exchange data using MQTT as a basis. By exploiting the scalability of MQTT and adding a well defined payload to the MQTT contents, the protocol provides you a flexible architecture. It allows you to auto-discover Nodes, Devices and their Data (Metrics). By combining the properties of the existing MQTT infrastructure and the Sparkplug payload definition, this is the most flexible and powerful protocol out there. You can add or remove nodes/devices on the fly. Whether your devices are state-of-the-art or legacy, this protocol is able to handle all types of devices. Last but not least, your data can be delivered securely and with rich meta data for added context.
(reading time 60 seconds)
Giving Sparkplug B a full specification compliant vendor independent implementation for CODESYS based systems. In theory this library can run on any sufficient capable hardware platform.
At this moment in time, there seem to be two big IIoT protocols on the market: OPC-UA and MQTT family based protocols (like AWS, Google Cloud or MZ Azure etc).
Sparkplug is part of the MQTT based protocols. Both families of protocols are great, very reliable and very secure. However, Sparkplug is simple, lightweight, flexible, very fast and very secure and vendor independent, while at the same time keeping CPU and bandwidth consumption to a minimum*.
Also, there are some caveats in using OPC-UA as at this time. While a pure IEC-code implementation of Sparkplug is nowhere to be found, OPC-UA is not open IEC-code and "Store & Forward" is not mandatory and so OPC-UA has a lot of untapped potential.
MQTT however, is merely a means to get information from point A to B. It does not prescribe the user how data should be mapped and transported. The user is free to use any data format and the user is responsible for adding context themselves. While this seems great on first sight, it hinders quick, smart and vendorneutral data exchange between all parties.
This is where Sparkplug steps in, it provides you with open, lightweight, vendor-neutral, well defined data exchange, state aware transmission and state aware data on top of what MQTT allready offers.
With the benefits of MQTT we already have:
Simple and open
Last will and testament per MQTT node
Bandwidth efficient (fast)
State aware connection
Decouples devices from applications
Utilizes latest TCP/IP security
With the added benefits of Sparkplug on top we get:
Fully auto discover nodes, tags and capabilities
Including tag metadata,
State aware (meta) data,
Report by Exception (RbE), polling is a thing of the past due to built in session and data state awareness. Polling and watchdogs are thus unnecessary and redundant
Historical Store and forward,
Provides industry interoperability with other open standards.
Therefore this project aims to "marry" any CODESYS based controller with Sparkplug and open up the vendor-independent CODESYS ecosystem with the IIoT market using all advantages that Sparkplug protocol offers.
We like having a major part of the code such as the communications built in open source allows experienced programmers to add/remove or alter parts of the code. It allows peer to peer code review and to build/expand on the code base.
Sparkplug is a specification for MQTT enabled devices and applications to send and receive messages in a stateful way. This means that each participant is fully aware of each other's connection and data state. While MQTT itself is stateful by nature, it does not ensure that all data on a receiving MQTT application is neither current or valid.
Sparkplug B provides a mechanism on top of MQTT for ensuring that device or application data is always current and valid, it adds a layer validation into the transmission itself. Next to this, Sparkplug B can be used to act as a gateway between legacy and modern devices for seamless interaction. Lastly, Sparkplug B is capable of leveraging historical "store & forward" to ensure that data-gaps are a thing of the past.
An overview of the Sparkplug architecture can be found here. These links will take you to a different page.
At this point in time we test against Ignition as the Primary SCADA Node, however, we are in full preparation of developing a CODESYS variant of the Primary Node.
While we are busy building and testing this CODESYS based primary node, we advise you to install a version of Iginition (a Primary SCADA node) to see the full capabilities of SparkplugB in action. You will not regret doing so as it demonstrates the power and ease of Sparkplug. See this step by step guide to create your own test system: Setup a test system
CODESYS based Primary Host node (BYOS)
Planned and in preparation, hold on!
The envisioned variant of a CODESYS based Sparkplug Primary Node should be able to act as a lightweight alternative to Ignition SCADA. Since this version will (obviously) not implement it's own SCADA, you can bring your own SCADA (BYOS). A typical CODESYS PLC will have no issue being integrated into a modern SCADA and thus expose all SparkplugB Nodes, capabilities and data.
A machine 2 machine (m2m) host node is also planned, this will let PLC's directly communicate with each other without user interaction. Note that Sparkplug enabled m2m can offer a lot of added value in comparison with standard MQTT or even classic peer to peer communication. Allthough the PLC's will seemingly communicate directly, they physically do not communicate peer to peer. In reality they share no direct connection, since the MQTT broker acts as a (secured) proxy.
It's up to you to decide which version of Ignition you wish to run as they are identical but differ in use-case scenario.
The provided information is thus not intended as advertisement but merely to provide you with enough information for you to make a choice on what installation to choose.
Ignition Maker Edition has powerful industrial-grade features of Ignition Enterprise by Inductive Automation️® to any number of your personal or educational projects
at no cost. All you need is a permanent internet connection for it to work (so called 'always connected').
This is the full fledged version of Ignition Enterprise SCADA. Without proper licensing it runs in a DEMO trial period for 2 hours. The trialperiod can be extended an unlimited amount of times by a single push of a button.
The fruits of our labour can be enjoyed here, in the download section. Our software is aimed to be "best in class", although it is written by (Professional) enthusiasts. We develop this software as individuals. We choose to to give this project our valuable resources: time and effort. This form of development stimulates our creativity in full freedom without boundaries or limitations.
This means that we do not have any hard deadlines to meet apart from those we impose on ourselves. Of course, we set milestones and progress is being made. .
By downloading and using our software you abide by the MIT License
The Sparkplug library itself is MIT licensed and open sourced, but to run it for more than 30 minutes you will need to purchase an IIoT Libraries SL from the CODESYS Store, as we make use of the MQTT Client SL. Because the library is MIT licensed you can exchange the MQTT Client SL for any other MQTT client you wish but you must do so yourself.
Offcourse we are happy to provide with assistance or advice.
NOTE If you have no licenses available, you can still preview Sparkplug with the following limitations in mind
Any unlicensed CODESYS runtime runs in a DEMO trial period for 2 hours, after that period you must restart the runtime
Any unlicensed IIoT SL library runs in a DEMO trial period for 30 minutess, after that period you must re-download the runtime
Without proper licensing, Ignition Enterprise SCADA runs in a DEMO trial period for 2 hours or opt in for a FREE maker Edition
SparkplugB v2 preview (v126.96.36.199) Library available
27 Dec 2020: We implemented working Bidirectional communication from Primary SCADA to EoN/Device.
If an EoN or Device metric gets written on SCADA side, it will be written back to the EoN or Device instantaneously. When the next EoN publish interval expires, the written values will be reflected to SCADA again. Since SparkplugB reports by exception, only changed values are sent and thus reflection will trigger 'by-design'. Useful when checking if a command or setpoint has processed. Handling of multiple devices connected to an EoN. Updated TLS handling. Updated to MQTT Client SL v.188.8.131.52 (current latest version).
Download the preview and try it for yourself but beware as this library can contain bugs.
If you stumble upon any bugs, please share them with us by posting a ticket or leaving a message (at the bottom of the page).
For a list of capabilities see Roadmap
* v184.108.40.206 Ignition SCADA in combination with CODESYS based EoN and 3 Devices visualised (Initialisation, Connection, BIRTH and DATA and the session and data state awareness)
30 nov 2020: A package and a complete guide are available.
With version 220.127.116.11, you can turn your CODESYS controller into a Sparkplug Edge of Network Node.
So far we have implemented only sending data from CODESYS, you cannot receive data from the SCADA. This feature will not be far behind.
IEC SparkplugB v18.104.22.168 Installation
For a list of capabilities see Roadmap. The package contains all components in a convenient single installer.