You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 38 Next »

Prerequisites

  • Have two machines available to run Ignition Gateway and Ignition Edge MQTT
    • Ignition Gateway can run on a laptop, in the cloud via an AWS EC2 instance or some other development computer
    • Ignition Edge MQTT can run on one of many supported embedded edge of network gateways, a laptop or development computer, or also in a cloud service

Summary

In conjunction with the Sparkplug specification, it is very useful to set up a working system that uses the MQTT Sparkplug specification in order to observe a simple, but fully functional system.  This section of the tutorial will provide step by step instructions for installing and configuring Ignition Edge MQTT and an Ignition Gateway to show tags being published from Ignition Edge to the Ignition Gateway running MQTT Distributor and MQTT Engine.

  • Central Ignition Gateway Installation
    • MQTT Engine – Engine is an MQTT Client that implements the Sparkplug specification and automatically creates Ignition tag structures for Edge Node and Device metadata and process variables.
  • Ignition Edge MQTT
    • MQTT Transmission – Transmission is 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.
    • Additional Ignition Edge MQTT devices could (and normally would) be added to the architecture.

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

Architecture

Tutorial

Step 1: Download and Install the Central Ignition Gateway

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 trial mode. Using Ignition as a tool in this way, we can install the Sparkplug MQTT Modules and observe everything working.

Go to the Inductive Automation download page and download the desired Ignition installer for Windows, Linux or MacOS;
https://
inductiveautomation.com/downloads/ignition

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

TODO: Nate: Below links were no longer valid and I updated to 8.0 version. That said, I only followed the instructions for the Mac OS X Install. Question: Should I follow and verify the install instructions for Windows and Linux? Also, Java is not called out as a requirement for Ignition8.0 in their docs (but is called out in 7.9)... This is a miss in the IA docs. Confirmed with Ilya that Java11 is required for IA8.0. DOC BUG: We should provide feedback to IA that their docs are missing the java prerequisite.  

Important Note: For this test infrastructure, MQTT Distributor will be installed as an Ignition module. 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.

TODO: Nate: Immediately following the installation, the installer launched the browser to 'http://localhost:8088' and this failed on my box as I didn't have Apache running. A web server appears to be a requirement... where is this prerequisite called out? If not, should we note this prerequisite somewhere?

Step 2: Download and Install Ignition Edge MQTT

Ignition Edge MQTT is a new stripped down version of Ignition that is specifically designed for use as an Edge of Network device.

See the Ignition Edge installation guide here.  Follow the sections for Ignition Edge MQTT and for your specific Operating System.  Make sure this is being installed on a different machine than was used to install Ignition in step 1.
https://docs.inductiveautomation.com/display/DOC80/Installing+Edge

TODO: Nate: As noted above, the IA8.0 documentation doesn't include any references to Java as a prerequisite. Also, the IA8.0 edge setup docs say I can use the Linux installer to install the Edge bits. However, when I run the installer on Ubuntu, the option to choose either the platform or edge install is never presented. For now, I'm bailing out on using the installer and will try to install the Edge bits directly from the linux edge zip file.

Step 3: Download and Install the Cirrus Link MQTT Modules

Go to the Inductive Automation download page again and select the Strategic Partner (Third Party) modules Tab and use pull-down for the intended version. Find the Cirrus Link modules section and download the MQTT Distributor, MQTT Engine, MQTT Transmission modules.
https://
inductiveautomation.com/downloads/ignition.  The download links should look similar to what is shown below but with updated versions.

TODO: Nate: This section below needs to be updated for our IA8.0 modules. However, at this time they are 'hidden' under the early release version. Either we update the below now to point to the early release version or wait until they are listed under stable and then update. Also, the image below has links in it that may be more useful to our customer if they are embedded on our side and clickable.

  • In Step 4 you will:
    • Install MQTT Distributor and MQTT Engine Modules into the Central Ignition Gateway installed in step 1.
    • Install MQTT Transmission Module into Ignition Edge MQTT that was installed in step 2.

Step 4: Install the MQTT Modules

Once you have Ignition installed and running, and the MQTT Distributor, MQTT Engine and MQTT Transmission modules downloaded, browse to the Ignition Gateway console (e.g. http://localhost:8088).

Log in to the Ignition Gateway installed in step 1 using the default credentials of admin/password.  Click on Configuration tab (Home/Status/Config Tabs left side of Side Bar) and then click on the Modules tab on the left side of the page.  Scroll to the bottom of the Modules section and click on the "Install or Upgrade a Module..." text.  When prompted, select the MQTT Distributor module from the file browser and install it.  Do the same for the MQTT Engine module.  When complete, the Ignition Gateway Web UI module section should look similar to what is shown below.

Now log in to the Ignition Edge MQTT installed in step 2 using the default credentials of admin/password.  Click on Config tab (left side of page) and then click on the Modules tab on the left side of the page.  Scroll to the bottom of the Modules section and click on the Install/Upgrade modules button.  When prompted, select the MQTT Transmission module from the file browser and install it.  When complete, the Ignition Edge MQTT Web UI module section should look similar to what is shown below.

Step 5: Configure the MQTT Modules on the Central Ignition Gateway

By default, MQTT Engine is already configured to point to an MQTT Server at tcp://localhost:1883.  This means it will automatically connect to MQTT Distributor which is installed with it.  There are some other configuration parameters that could optionally be set.  The first is the 'Primary Host ID'.  This is a setting that is highly recommended and should be set on both MQTT Engine and any MQTT Transmission instances that are reporting in as well.  The ASCII string should match exactly on MQTT Engine and all MQTT Transmission instances.  Also, optionally the 'Block Node Commands' and 'Block Device Commands' could be unchecked if you want to allow tag writes in MQTT Engine to result in tag writes on the MQTT Transmission instances (i.e. remote tag writes).  Save the settings after making the changes.

Step 6: Configure MQTT Transmission on Ignition Edge MQTT

MQTT Transmission needs to be modified to point to the MQTT Server (MQTT Distributor) in order to get data into MQTT Engine.  To do so, browse to Ignition Edge MQTT with a web browser.  Then click 'Configure' at the top, log in, and select MQTT Transmission 'Settings' on the left panel near the bottom.  Then select the 'Servers' tab.  Finally, click the 'edit' button to the right of the 'Chariot SCADA' definition as shown below.

At this point, modify the URL to point to the Central Ignition Gateway's IP address.  For example, if your central Ignition gateway is at 10.10.10.123, set the URL to tcp://10.10.10.123:1883.  Then save your settings.

Now select 'Sets' at the top and click the 'edit' button next to the 'Default' Server Set as shown below.

Now set the 'Primary Host ID' to the same ASCII string that was set in MQTT Engine previously as shown below and save the changes.

Step 7: Create Edge Tags

At this point we must download (if not already loaded) and launch Ignition Designer to create some tags to send to MQTT Engine using the MQTT protocol.  Launch Designer from Ignition Edge MQTT as shown below.

TODO: Nate: The user may need to download the Designer via the "Get Designer" link if they haven't downloaded it yet. We should add a small note here to call out this potential gap.

Below shows the Ignition Designer.  Expand the 'Tag Browser' pane to get a better look.  Note the 'All Providers/edge/Edge Nodes' folder.  This is where we will add some specific folders and tags to work with the 'Default Transmitter' of MQTT Transmission.

TODO: Nate: By default, after creating a project through designer from the edge node, I wasn't able to find Edge Nodes folder, only the Data Types folder. Why?


Now perform the following actions.

  • Under the 'Edge Node' folder, create a new folder called 'Group 1'
  • Under the 'Group 1' folder, create a new folder called 'Edge Node 1'
  • Under the 'Edge Node 1', create a new folder called 'Device 1'
  • Under the 'Device 1' folder, create a new Memory Tag as shown below.

When done with the steps above, you should have a folder/tag structure as shown below.

Note additional tags could be added to the 'Device 1' folder as well.  These could be OPC tags, UDTs, or other types of tags.  Also, additional folders could be added below this level as well.  The structure of the 'default transmitter' requires that the first three folder levels represent the Sparkplug Group ID, Edge Node ID, and Device ID respectively.

At this point, we can start the Transmitter by writing to the 'Transmission Control/Refresh' boolean tag.  Writing to this tag tells MQTT Transmission to rescan the entire tag tree, detect the folders and tags present, and then begin publishing Sparkplug messages to the MQTT Server.  The location of the tag to write to is shown below.

Step 8: Verify MQTT Transmission is Connected

Open the Ignition Edge MQTT Web UI and browse to 'Configure → MQTT Transmission → Settings → Servers' and verify the connected status shows '1 of 1'.  If it does not, double check the firewall and antivirus settings on the Central Ignition Gateway and ensure port 1883 is open.

Step 9: Verify Data Flowing into MQTT Engine

With MQTT Transmission now connected, open Ignition Designer on the Central Ignition Gateway.  Expand the Tag Browser and look expand the folder tree as shown below.  You should see the 'My Tag' tag published from the Ignition Edge MQTT Edge Node.

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.

  • TLS enable the MQTT Distributor module and disable port 1883
    • Note production MQTT Infrastructures should never run on the open Internet without using TLS enabled MQTT connections!
  • Modify the MQTT Transmission default transmitter tag tree to add additional tags and get them to show up in the Central Ignition Gateway
  • Write to a tag in MQTT Engine to show it update in MQTT Transmission
  • Disable MQTT Transmission in Ignition Edge MQTT to see the tags go stale in MQTT Engine
  • Set up store and forward in MQTT Transmission to show data being saved in Ignition Edge MQTT when the connection goes down
  • Use a Custom Transmitter rather than the Default Transmitter to provide more flexibility on the MQTT Transmission side in terms of tag tree/arrangement
  • Add a second or more Ignition Edge MQTT instances pointed at the same MQTT Distirbutor instance that was set up in this tutorial



  • No labels