Email Us at info@n3uron.com

Download N3uron

RESOURCES / TECHNICALLY SPEAKING

How to Connect your Industrial Assets to Ignition SCADA using N3uron’s Sparkplug Client Module

Sparkplug: Overview

Sparkplug provides an open and fully available specification for modeling OT data, which is being increasingly adopted as the standard for integrating data from industrial sources within the corporate MQTT infrastructure. Its success is mainly due to its simplicity, scalability, and robustness. The Eclipse Foundation’s specification defines how edge gateways, native MQTT-enabled devices, and applications communicate bi-directionally within an MQTT infrastructure.

Sparkplug creates a secure foundation for IIoT networks that can be scaled seamlessly and operated reliably in support of mission-critical applications. In other words, the standardization introduced by Sparkplug B is one of the major breakthroughs for industrial communications for the following reasons:

  • Defines an MQTT Topic Namespace.
  • Defines an MQTT Payload optimized for industrial processes.
  • Defines MQTT Session State Management required by real-time applications such as SCADA systems.

Thanks to the Sparkplug Client module, N3uron now provides an easy way to create and configure Sparkplug compliant clients at the network edge. N3uron’s Sparkplug Client module simplifies connections to broker clusters and centralizes the management of data originating from multiple sources, which is accessible thanks to the wide variety of modules that make up the N3uron IIoT platform, such as the OPC UA Client, DNP Client, Modbus Client, MQTT Client, SQL Client, etc. Some of the main features of the Sparkplug Client module include allowing users to create unlimited connections and managing very large volumes of data very efficiently, thus offering a plug-and-play solution to make all your plant data available via an MQTT-based IIoT infrastructure.

This document explains in detail how to bi-directionally communicate your industrial assets with Ignition using N3uron’s Sparkplug Client module.

Although this article applies to Ignition only, all other applications compatible with the Sparkplug standard, such as Canary, AVEVA, or OSIsoft PI, can also subscribe and receive data coming from N3uron in real-time.

The following image depicts the architecture that will be used in this example.

Diagram showing operational data flow between Industrial Assets, N3uron IIoT platform and Ignition

Diagram showing operational data flow between Industrial Assets, Ignition and N3uron Sparkplug Client Module.

N3uron and Ignition Requirements

If you haven’t downloaded N3uron yet, you can do so at https://n3uron.com/downloads/. If this is the first time you are installing N3uron, our Quick User Guide will guide you through the entire installation process.

You will also need to install Ignition, which can be downloaded from the following link: Ignition, as well as the Distributor and Engine modules offered by Cirrus Link Solutions: Cirrus modules.

Configuring Ignition

First of all, we are going to configure the Broker and the client on the Ignition side. Ignition will act as the client application that will subscribe to the data published by N3uron. The Cirrus Link’s Distributor and Engine modules will run on the Ignition Gateway.

It is assumed that you have already downloaded and installed Ignition, as well as both Cirrus Link modules. Once complete, access your Ignition Gateway to start the configuration.

Configuring the Broker (MQTT Distributor)

The MQTT Distributor Module for Ignition is an MQTT server compliant with the 3.1.1 MQTT protocol OASIS standard. It enables MQTT clients to securely connect, publish, and subscribe data, supplying data to both operational and business applications throughout the enterprise.

To configure the Cirrus Link’s Distributor module, proceed as follows:

  • Step 1: Go to Config–>MQTT Distributor–>Settings.
Picture showing the Ignition config panel of the MQTT Distributor module

Screenshot displaying the access to the MQTT Broker from Ignition Gateway Webpage.

  • Step 02: Under the General tab, configure all the different parameters using the below settings: – Main:
       Enabled: Enable.
    Non-TLS Settings:
       Enable TCP: Enable.
       Port: 1883.
       Enable Websocket: Enable.
       WebSocket Port: 8090.
    – TLS Settings:
       Enable TLS: Disable.
       Secure MQTT Port: 8883.
       Enable Secure WebSocket: Disable.
       Secure Websocket Port: 9443.
    – Advanced properties:
       Allow Anonymous MQTT Connections: Enable.
Image showing the Ignition main setting panel of the MQTT Distributor module

Image showing the Ignition main setting panel of the MQTT Distributor module.

Picture showing the Ignition advanced setting panel of the MQTT Distributor module

Screenshot displaying the Ignition advanced setting panel of the MQTT Distributor module.

Once you are done, select the Users tab, where we will create a new user with read and write permissions.

  • Step 1: Go to Config–>MQTT Distributor–>Settings–>Users and click on Create new MQTT Users, as shown below:
Image showing the Ignition user configuration panel of the MQTT Distributor module

Screenshot displaying the Ignition user configuration panel of the MQTT Distributor module.

Picture showing the Ignition user configuration panel to create a new MQTT user

Screenshot displaying the Ignition user configuration panel to create a new MQTT user.

  • Step 2: Once inside, you will need to configure the following parameters:
    – Username: This is the username that will be used to establish communications. In this case, n3uron.
    – Password: The password the user will use to authenticate with the MQTT Server.
    – ACLs: These are the permissions granted to the user. In this case, RW #.

Remember to Save changes.

Image showing a user setting up a password within the Ignition user configuration panel

Screenshot displaying the main parameters within the Ignition user configuration panel.

Ignition: Configuring the Client (MQTT Engine)

At this point, both the Broker and the user that we will use to connect to the Broker have already been configured. Next, we need to configure the MQTT Engine module, which provides the Ignition Gateway with a Sparkplug Client functionality and allows it to subscribe to the data published to the broker.

  • Step 1: Go to the section Config–>MQTT ENGINE –>Settings,
Picture showing the MQTT Engine Setting option within the Ignition config panel

Image showing the MQTT Engine settings from the Ignition Gateway Webpage.

  • Step 2: Under the General tab, configure each of the different parameters using the following settings:
    – Main Settings:
       Enabled: Enabled.
       Primary Host Enabled: Enabled.
       Primary Host ID: Specifies the primary host ID to allow connecting clients to ensure they remain connected. In this case, IGN322. This name must match the name that we will later define in N3uron.
    – Miscellaneous Settings: All parameters have been left as their default settings.
       Block Node Commands: Disabled.
       Block Device Commands: Disabled.
       Block Property Changes: Disabled.
       Store Historical Events: Enabled.
    – Advanced settings: All parameters have been left as their default settings.
       Enable Tag Latching: Disabled.
       Filtered Properties: Default value.
       Enable BD Sequence Validation: Enabled.
       Custom Properties: Leave as default.
       Enable Primary Host Subscriptions: Disabled.
Image showing the main and miscellaneous options within the Ignition MQTT Engine Configuration panel

Screenshot displaying the main and miscellaneous options within the Ignition MQTT Engine Configuration panel.

Picture showing the advanced settings within the Ignition MQTT Engine Configuration panel

Screenshot displaying the advanced settings within the Ignition MQTT Engine Configuration panel.

Once you are done, select the Servers tab, where we’re going to create the server Ignition that we will connect to.

  • Step 1: Click on Create new MQTT Server Setting, as shown below.
Image showing the create new MQTT server setting option within the Ignition MQTT Engine Configuration panel

Screenshot displaying the create new MQTT server setting option within the Ignition MQTT Engine Configuration panel.

  • Step 2: Next, configure the new server as follows:
    – Main:
       Name: Distributor.
       Enabled: Enabled.
       URL: tcp://localhost:1883.
       Username: admin.
       Password: Enter the admin password
    – TLS: The default configuration is maintained.
    Advanced properties: The default configuration should be left with its default values.
Picture showing the Server Configuration Main Setting window within the Ignition MQTT Engine Configuration panel

Screenshot displaying the Main Setting window within the Ignition MQTT Engine Configuration panel.

At this point we have already created and configured both the broker and client, meaning that the configuration of the Ignition platform is now finished.

To check that Ignition is successfully connected to the Broker, go back to the Ignition Gateway and verify that in the MQTT Engine configuration section, the Distributor displays as connected, as shown in the image below.

Image showing the connection status window within the Ignition MQTT Engine Configuration panel

Screenshot displaying the connection status window within the Ignition MQTT Engine Configuration panel.

Configuring N3uron’s Sparkplug Module

It is assumed that you have already created a Sparkplug Client instance. If not, please take a look at the following link Create a new module instance:

  • Step 1: Select your module instance from the Explorer Panel, click the button on the left-hand side of the Model header, select New Group, and give it a name. In this case, Group.
Picture showing the creation of a new group option using Sparkplug module within the N3uron IIoT Configuration panel

Screenshot displaying the New Group option in N3uron’s Sparkplug Client module panel.

  • Step 2: Once the Group has been created, click on the Edge nodes button and select New Edge node, as shown in the image below.
Image showing the creation of a new edge node option using Sparkplug module within the N3uron IIoT Configuration panel

Screenshot displaying the New Edge Node option in N3uron’s Sparkplug Client module panel.

  • Step 3: Provide a name (in this case, IGN322) and configure the rest of the parameters as follows:
    – Enabled: Yes.
    – MQTT Broker cluster:
       IGN322:
       Protocol: MQTT.
       Broker URL: Enter the IP Address of your Ignition Gateway.
       Port: 1883.
       Client ID: Leave it blank.
       Authentication:
       Authentication mode: Password.
       Username: n3uron.
       Password: Enter the password you used for the n3uron user when you configured it in the MQTT Distributor.
Picture showing the authentication configuration panel of the Sparkplug module within the N3uron IIoT Configuration panel

Screenshot displaying the Authentication Configuration panel in N3uron’s Sparkplug Client module window.

Primary Host:
   Check status: Yes.
   ID: IGN3222.
Payloads:
   Use Alias: Yes.
   Compression: Gzip.
Store & Forward:
   Enabled: Yes.
   Database Path: sf.
   Unique Database ID: iZwp0K6K.
   Max. Days: 60.

Image showing the edge node configuration panel of the Sparkplug module within the N3uron IIoT Configuration panel

Screenshot displaying the Edge Node Configuration panel in N3uron’s Sparkplug Client module window.

Finally, once the Edge node is configured, we need to create a new Device.

  • Step 1: Click on the Devices button under the node, select New Edge Device, and give it a name, as shown in the image below. In this example, we have named it Device01.
Picture showing the creation of a new device option using Sparkplug module within the N3uron IIoT Configuration panel

Screenshot displaying the New Device option in N3uron’s Sparkplug Client module panel.

  • Step 2: Configure the rest of the parameters as follows:
    – Enabled: Yes.
    Tag Path:  Define the tag path according to your data model, in this case, /G010000/.
    Block Writes: No.
Image showing the client device configuration panel of the Sparkplug module within the N3uron IIoT Configuration panel

Image showing the Device Configuration window of the Sparkplug module within the N3uron IIoT Configuration panel.

  • Step 3: You will need to create a new filter that will be used to define which data will be published to the Broker. To do so, click on the ellipsis button and select New Tag Filter, as shown below.
Picture showing the new tag filter creation option using Sparkplug module within the N3uron IIoT Configuration panel

Screenshot displaying the New Tag Filter option in N3uron’s Sparkplug Client module panel.

  • Step 4: Provide a name (in this case, all) and leave the configuration with its default values in order to publish all tags under the path we entered above.
Image showing the tag filter configuration option using Sparkplug module within the N3uron IIoT Configuration panel

Screenshot displaying the Tag Filter Configuration option in N3uron’s Sparkplug Client module panel.

Once everything has been properly configured, let’s open the Ignition Designer in order to verify that Ignition has successfully subscribed to the data published by N3uron.

Picture showing the Ignition designer interface window

Picture showing the Ignition designer application.

In the Designer window for your project, head to the Tag Browser panel in the lower left-hand corner. Expand the All Providers/MQTT Engine/Edge Nodes folder and check that your tags are there.

Image showing the Ignition tag browser window

Image showing the Ignition tag browser.

Conclusion for How to Build Scalable Data Models with N3uron’s Sparkplug Client Module

Connecting your assets to any Sparkplug-enabled application, such as Ignition, is extremely easy using N3uron’s Sparkplug Client module. If you’re ready to go using MQTT Sparkplug, download the N3uron free trial version and read our Sparkplug Client Manual on how to implement and use N3uron’s Sparkplug Client module in our communication platform.

N3uron software facilitating the communication of data among different sectors and internal and external locations by means of Message Queuing Telemetry Transport (MQTT)
IgnitionMQTTSparkplug Client

Eric Sainz

Eric Sainz is a Customer Success Engineer at N3uron Connectivity Systems. He holds a University Degree in Telecommunications from the Polytechnic University of Madrid and, since joining N3uron in 2021, has worked in the customer success team to provide a better customer experience.

    Sign-up for our newsfeed and get blog updates sent straight to your inbox.

    By clicking “Sign Me Up,” you agree to the Term of Use and the submission and processing of your data. Privacy Policy.

    Want to stay up-to-date with us?

    Sign up for our News Feed.

    By clicking "Sign Me Up", you agree to the Terms of Use and the submission and processing of your data. Your privacy is important to us. We will never sell or rent your information. Privacy Policy.