Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Prerequisites:

  • Knowledge of Ignition and Module installation process: Cirrus Link Module Installation
  • Install Ignition on an 'host/backend' system
    • This must be a 'full version' of Ignition (i.e. not Ignition Edge)
    • Install the following MQTT Modules
      • MQTT Distributor
        • v4.0.X if using Ignition 8.0.x
      •  MQTT Engine
  • Install Ignition on an 'edge' system
    • This can be a 'full version' of Ignition or Ignition Edge
    •  Install the following MQTT Modules

Overview:

Transmission is an MQTT module for Ignition that can publish files using MQTT Sparkplug. This tutorial shows how to configure MQTT Transmission to publish files from one Ignition system to another. Files are transferred using Sparkplug over MQTT. The files which get transferred and when they get transferred can be configured in a number of different ways.

Publishing files with Transmission:

As noted in the prerequisites, you should have two Ignition systems installed at this point.

  • A full version of Ignition with MQTT Distributor and MQTT Engine installed
  • A full version of Ignition or Ignition Edge with  with MQTT Transmission installed

...

  • MQTT Engine Settings → General Tab
    • Primary Host ID: IamHost
    • Block Node Commands: unchecked
    • Block Device Commands: unchecked
    • Leave all other settings default
    • When complete, it should look similar to the following. Save the changes after confirming.
  • MQTT Engine Settings → Namespaces → Default Tab
    • Click the 'edit' button to the right of the 'Sparkplug B' namespace as shown below
      Image Modified
    • Now select the 'Files' tab and set the following
      • Ignore Files: unchecked/false
      • File Host Type: ACTIVE
      • Base File Directory: Set to some directory file path (i.e. 'C:\My Files' or something similar)
      • Add Topic Tokens: checked/true
      • File Storing Policy: OverwriteREPLACE_EXISTING_FILE
      • When complete, it should look similar to the following. Save the changes after confirming.
        Image Modified
    • Finally select the 'Servers' tab and confirm that the 'Status' shows 'Connected' as shown below.

At this point the Ignition system with MQTT Engine and MQTT Distributor is configured. However, the MQTT Server must be accessible to the Ignition system running MQTT Transmission and any other MQTT clients that may need to connect. In order for this to work port 1883 must be open to outside connections. Make sure this is allowed via your operating system's firewall configuration and any anti-virus software you may have installed. Note this

Note
This configuration is not recommended for production systems. If running this in production, you should be using TLS encryption on port 8883. More information on how to configure TLS can be found here.


Now switch to the Ignition system running MQTT Transmission and set the following.

  • MQTT Transmission Settings → Servers → Sets Tab
    • Edit the existing Default Server Set to contain a 'primary host ID' of 'IamHost' as shown below.
  • Browse to the 'Transmitters' tab and note the 'Sparkplug IDs'. Note these IDs for later use.
    • In the example below, the Sparkplug IDs field is 'My MQTT Group/Edge Node faec7e'. This means the corresponding Group ID and Edge Node ID are:
      • Group ID: My MQTT Group
      • Edge Node ID: Edge Node faec7e
  • Browse to the 'Servers' tab
    • Change the server URL to point to the Server IP address or domain name of the Ignition system running MQTT Distributor and save the configuration as shown below. When complete, you should see something similar to the following. Under the 'Connected' status, make sure it shows '1 of 1'.
      • If it does not, check the logs to show what may be going wrong and/or validate the rest of your configuration.
  • Now click the 'Files' tab, select the Create new Files... link and configure the following fields
    • Tag Provider: default
    • Tag Folder Path: files_manual
    • Enable Auto-Publish: unchecked/false
    • Group ID: Use the Group ID you noted in the Transmitter configuration
    • Edge Node ID: Use the Edge Node ID you noted in the Transmitter configuration
    • Device ID: Leave BLANK
    • When complete, it should look as follows.

      Confirm and save the settings
      Image Removed
    Note there is also an 'advanced properties' section of the file transfer configuration. These options define how quickly a file transfer occurs and how long before a timeout will occur on failure to receive host side acknowledgements. Adjust these as required based on the size of files you are sending and any bandwidth constraints that you may have
    • Select the Create New Files to save the settings.

      Image Modified


  • After the configuration is saved, it should look as follows
    Image Modified

At this point, everything should be configured to send files from MQTT Transmission to MQTT Engine. Open Ignition Designer on the system running MQTT Transmission. You should see a new set of tags there as shown below.

...

When configured this way, MQTT Transmission will scan the folder specified in the tag and will publish all files that appear in this directory automatically. Just as with the 'manual publish' option, an associated md5 sum file must be present and properly represent the md5 sum of the target file before it will be published.


Anchor
filetransferadvancedfeatures
filetransferadvancedfeatures
Advanced Features



The Advanced Settings section of the file transfer configuration define how quickly a file transfer occurs and how long before a timeout will occur on failure to receive host side acknowledgements.

Adjust these as required based on the size of files you are sending and any bandwidth constraints that you may have.

Image Added

Additional Resources

...