MQTT Ignition Communication with an Edge Gateway

MQTT Ignition Communication with an Edge Gateway

Supervisory control and data acquisition, or SCADA for short, is a widely used control system architecture that allows for operators to control industrial processes both locally and remotely. One SCADA platform DMC has significant experience with is Ignition. One of the major benefits to using Ignition is that it is very versatile regarding the types of devices it can connect to. Further, all of Ignition’s features are separated into individual modules and users only pay for the ones they need.

In most applications, Ignition uses industrial Ethernet to connect and communicate to field devices. This may not be possible if the devices are isolated in a way that it makes it impossible to connect over a network. However, there are other methods to set-up communication between the main Ignition server and field devices which I will outline below.

Message Queuing Telemetry Transport (MQTT)

One such method involves using the MQTT protocol. MQTT stands for Message Queuing Telemetry Transport and works by using a publish subscribe based messaging procedure. During this procedure, one device publishes a string to the topic as a second device takes that string and parses it into useful information. What is nice about Ignition’s implementation is that the string and tag parsing is done for us by Ignition’s MQTT modules. Therefore, once these modules have been set up through Ignition’s gateway, the rest of the implementation should be straightforward.


In a full implementation, the central gateway can communicate with any number of edge devices. For this demo, I am using a central gateway on my computer and an edge gateway on a raspberry pi. In addition to the standard Ignition modules, the MQTT distributor and the MQTT engine modules should be added to the central gateway. All edge gateways should have the MQTT transmission module added.

Modules can be added to a gateway by going to the configure tab of the gateway, clicking the modules page on the system group, and selecting the desired mod1 file to upload. These files can be acquired from the inductive automation website.

Configuring MQTT Engine

Once the MQTT Engine module has been added to the desired gateway, it can be configured by clicking on the settings item of the MQTT engine group on the configure tab. This will bring up a page that has three separate tabs: general, servers, and namespaces. Located on the general settings page is an input field for the primary host ID. For this implementation I set this as TestMQTT, but it can be set to anything. This value will be used again when configuring the MQTT transmission module on the Ignition edge gateway.

Next, under the miscellaneous section of the page, I unchecked the boxes labeled block node commands and block device commands. This will allow access for the main gateway to write to the tags that are being shared by the Edge gateway. After that I navigated to the servers tab. There should be a default server set up.  This will be the server we use for our implementation.

When you click the edit button, it will bring up the connection settings for this server. Under URL, type in the address and port of the MQTT distributer either in the form of tcp://, for tcp connections, or ssl://, for ssl connections (1883 and 8883 are the default ports for Ignition’s TCP and SSL connections). Since the MQTT distributor and MQTT engine are on the same gateway, you can use localhost as the domain. TCP is the default server type on the distributor, so I used that type of connection during this process.

The last tab is the namespaces tab, which you can leave at the default values. If you want your engine to subscribe to topics published by third party devices, this is where you would configure those connections. The MQTT disturber can also be set up from the configure tab of the gateway’s home page, but the default values should work fine for this implementation.

Setting up the MQTT Transmission Module

After the MQTT engine has been configured on the main Ignition gateway, it is time to set-up the MQTT transmission module on the Ignition edge gateway. As before, this is done through the MQTT modules settings page under the configuration tab. This settings page has 5 tabs: general, servers, sets, transmitters, and records. First, select the servers tab and set the URL to point towards the main Ignition gateway in the form of tcp://[ip address of gateway computer]:1883.

Next, set the server to default. Under the sets tab, press the edit button for the default set and set the primary host id to the same host id used in the configuration for the MQTT Engine.

Create Edge Tags

After the default set has been configured appropriately, it is time to create the edge tags. To do this, launch the designer from the Ignition edge gateway. In the designer’s tag browser, under all providers -> edge, there will be a folder called Edge Nodes that will have been auto generated by the MQTT Transmission module. Create folders using this structure: Edge Nodes -> Group folder -> Edge Node Folder -> Device Folder. For this implementation, I named these folders Group 1, Edge Node 1, and Device 1.

In this device folder above, I added a few UDTs with memory tags to be mapped to the MQTT Engine on the main gateway. This folder can contain a variety of tag types, UDTs, and lower level folders as well. All of which would be mapped to the MQTT Engine on the main gateway.

Verifying the Connection 

Once this is completed, the transmitter is started by setting the refresh tag in the MQTT Transmission -> Transmission Control folder to true. After this tag is set (it will automatically reset itself), the connection can be verified from the edge gateway by going to the server’s tab of the MQTT Transmission settings. If everything is working properly, connected in the tab servers tab should be “1 of 1”. If it doesn’t, check your port and firewall settings to verify it allows incoming data transmission.  

Once it has been confirmed that the transmitter is connected, the tags that were created in the device folder should be visible to the main Ignition gateway. This can be checked by opening a designer for the main gateway project. In the designer’s tag browser, navigate to the folder All Providers ->  MQTT Engine. The folder structure that was created in the edge project should be replicated here (as well as tags from other MQTT Transmission modules connected to this engine).

Learn more about DMC’s Ignition Expertise and contact us with any inquiries.


There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

Enter the code shown above:

Related Blog Posts