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

Compare with Current View Page History

« Previous Version 5 Next »

Prerequisites

Overview

Within MQTT Transmission, a record is a collection of tags under an Ignition folder which are treated as a single entity and published on demand. They are usually used for, but not restricted to, sending flow computer records such as events, alarms and history data.

Records are published via an MQTT client using a Sparkplug-like topic format with a JSON payload.

Records received at MQTT Engine are passed to MQTT Recorder which automatically generates database tables and populates the rows within the tables with records as they are received. 

This tutorial shows how to configure the MQTT modules to generate and publish records to be stored in an MySQL database.

The topology of this example shows MQTT Distributor, MQTT Engine, Record Store, and MQTT Transmission all running in the same Ignition instance.  This is done for simplicity of the tutorial, but this isn't required or even intended to be a real use case.  In a more realistic scenario MQTT Transmission and MQTT Engine would be located on separate machines.

Step 1: Install the MQTT modules

Install the four MQTT modules listed in the pre-requisites onto your Ignition system following the Cirrus Link Module Installation guide.

By default, both MQTT Engine and MQTT Transmission are configured to connect to MQTT Distributor on tcp://localhost:1883 and will show as Connected under their respective Servers configuration setting in the Ignition UI. MQTT Transmission will also have an Transmitter configured pointing to a set of tags configured in the Ignition "default" tag provider. 

Review the MQTT Transmission Transmitters and Tag Trees for additional information on the Transmitter configurations interact with Ignition tag trees to publish MQTT messages and tags to an MQTT Server. 

This allows the three modules to automatically connect and provide a starting base for the tutorial.

Step 2: Configure a database connection

Follow the Ignition Connecting to MySQL guide to configure a database connection to your SQL database.

Step 3: Import tags to create Records in the Ignition tag provider

Within MQTT Transmission, a record is a collection of tags under an Ignition folder which are treated as a single entity and published on demand.

Import the recorder_tutorial_tags.json to build a set of Ignition folders to represent the records.


Step : Configure the MQTT Recorder module 




  • No labels