Summary

In conjunction with the Sparkplug Specification, it is very useful to set up a working system that uses MQTT in order to observe a simple and fully functional distributed system. This tutorial will provide step by step instructions for installing and configuring a two Ignition architecture to show tags being published from either an Ignition or Ignition Edge server running the MQTT Transmission module to an Ignition server running the MQTT Distributor module and MQTT Engine module.

Ignition is an Industrial Application Platform that can be used to create SCADA and HMI solutions. A fully functional Ignition system can be downloaded and run in a trial mode running for two hours at a time with unlimited restarts. Using Ignition as a tool in this way allows us to install the Sparkplug MQTT Modules and observe everything working.

Ignition Edge is a leaner version of Ignition made specifically for use in on edge-of-network devices. Ignition comes with unlimited Tags, Clients, and database connections, while Ignition Edge comes with unlimited Tags, two Clients (one local and one remote) and no database connectivity.

  • MQTT Distributor – An MQTT Server that runs as an Ignition module.
  • MQTT Engine – An MQTT Client that implements the Sparkplug specification and automatically creates Ignition tag structures for Edge Node and Device metadata and process variables.
  • MQTT Transmission – An MQTT Client that implements the Sparkplug specification to bridge local Ignition tags (OPC-UA and Memory tags) and publish the resulting structure to an MQTT infrastructure.

Upon completion of this tutorial, you will have all the required components to configure, deploy, and observe the Sparkplug MQTT specification in action.

Prerequisites

Have two machines available to run the two instances of Ignition or Ignition and Ignition Edge.

  • Ignition can run on a laptop, in the cloud via an AWS EC2 instance or some other development computer.
  • Ignition Edge can run on one of many supported embedded edge of network gateways, a laptop or development computer, a Raspberry Pi (load ARMHF version), or also in a cloud service.

Architecture

Tutorial

Step 1: Download the Cirrus Link MQTT Modules

From the Ignition Strategic Partner Modules download page, find the latest compatible Cirrus Link Solutions MQTT Modules for Ignition Version 8.1.xx using the Version dropdown as this may not correspond to the most recent version of Ignition.

The download links will look like those shown below:

On your primary machine, download the MQTT Distributor Module and MQTT Engine Module

On your secondary machine, download the MQTT Transmission Module

Step 2: Primary machine - download and install Ignition

On your primary machine, from the Ignition Version Archive download page, select the latest Ignition Version compatible with Cirrus Link Solutions MQTT Modules and download the desired Ignition installer for Windows, Linux or MacOS.

Once the Ignition installer has been downloaded, follow the instructions provided by Inductive Automation to install and start Ignition.

Take note of your user/password you create as part of this installation process as you will need these credentials to load modules and configure this instance.
For this test infrastructure, MQTT Distributor will be installed as an Ignition module. On your primary machine, remember to either turn off firewalls or at a minimum allow inbound connections to TCP/IP port #1883 and port #8883, as remote MQTT Clients will need to be able to establish a TCP/IP socket connection to these ports.

Step 3: Secondary machine - download and install Ignition or Ignition Edge

On your secondary machine, from the Ignition Version Archive download page, select the latest Ignition Version compatible with Cirrus Link Solutions MQTT Modules and download the desired Ignition installer for Windows, Linux or MacOS.

Once the Ignition installer has been downloaded, follow the instructions provided by Inductive Automation to install and start either Ignition or Ignition Edge

Instructions for Installing and Upgrading Ignition

Take note of your user/password you create as part of this installation process as you will need these credentials to load modules and configure this instance.

Step 4a: Primary machine - install the MQTT Modules on Ignition Gateway

From the Ignition left side bar, click on the Config tab and under the SYSTEM heading click on Modules. Scroll to the bottom of the page and click on the link → Install or Upgrade a Module...

When prompted, select the MQTT Distributor module from the file browser and select Install. Accept the license agreement and certification and install the module. Repeat for the MQTT Engine module.

When complete, the Ignition Gateway will show the current state of the installed modules:


Step 4b: Primary machine - configuration of MQTT Modules

No additional configuration is required for the MQTT Distributor or MQTT Engine modules.

By default, MQTT Engine is already configured to point to an MQTT Server at tcp://localhost:1883 and this means it will automatically connect to the MQTT Distributor which is installed with it.

To verify the connection status, select the Config tab on the left side bar and scroll to the bottom of the page and click on the "MQTT ENGINE | Settings" link. Open the Servers tab and confirm the Status shows Connected.

Example below showing default MQTT Distributor Settings:


Step 5a: Secondary machine - install the MQTT Transmission Module on Ignition or Ignition Edge Gateway

From the Ignition left side bar, click on the Config tab and under the SYSTEM heading click on Modules. Scroll to the bottom of the page and click on the link → Install or Upgrade a Module...

When prompted, select the MQTT Transmission module from the file browser and select Install. Accept the license agreement and certification and install the module.

When complete, the Ignition Gateway will show the current state of the installed module:

Step 5b: Secondary machine - configuration of MQTT Transmission Module

MQTT Transmission needs to be configured to point to the MQTT Distribution server in order to publish data into MQTT Engine. To do this, select the Config tab on the left side bar and scroll to the bottom of the page and click on the "MQTT TRANSMISSION | Settings" link.

Click on the Servers tab and edit the MQTT Server named Chariot SCADA to modify the URL to point to the Ignition Distributor gateway.  Example: If your Gateway IP is 10.1.10.97 then set the URL to tcp://10.1.10.97:1883 and Save Changes.

Once configured, MQTT Transmission will automatically connect, and you can confirm by checking the Connected status on the Servers tab.


Step 6: Primary and secondary machine - Launch Designer

At this point are ready to edit the default tag, created as part of the MQTT Transmission installation, to send to MQTT Engine using the MQTT protocol and to do this we will use the Ignition Designer tool.

Select the Get Designer button from Ignition web portal to download, install and launch the Design Launcher. 

Once launched, double click the Ignition gateway in the Designer View and log in using the username and password created when installing Ignition on the machine.

Note: if you enabled the Quick Start option when starting Ignition, a samplequickstart project will have been created and you will need to open that project.

Initial Designer view if installed with Ignition showing open samplequickstart project:

Deselect Sample_Tags and select MQTT Engine under the Tag Browser window. Expand the Edge Nodes folder tree until you have exposed the PLC 1 folder with the Example Tag.

Initial Designer View if installed with Ignition Edge

Expand the MQTT Tags folder in the Tag Browser window until you have exposed the PLC 1 folder with the Example Tag.

Step 7: Test Connection

To test your connection, make a change to the tag value on the secondary machine with MQTT Transmission installed. Double click on the Example Tag value '1', change the value, and watch it update at the Ignition Designer connected to the MQTT Engine provider.

The Ignition Designer tool is not by default in Read/Write mode so your first attempt to write a new value to this Example Tag will ask you to select either Cancel | Enable Read/Write Mode | Write Once.  Select Write Once or Read/Write to allow Tag value changes.

For more detail on how the MQTT Transmission Transmitter configurations interact with the Ignition tag trees to publish MQTT messages and tags to an MQTT Server, see the MQTT Transmission Transmitters and Tag Trees tutorial.

Extra Activities

At this point you have a fully functional system that can be expanded or modified as required.  Below are some additional activities you may want to try on your own.


  • No labels