Contents
Cirrus Link Resources
Cirrus Link Website
Contact Us (Sales/Support)
Forum
Cirrus Link Modules Docs for Ignition 7.9.x
Inductive Resources
Ignition User Manual
Knowledge Base Articles
Inductive University
Forum
How can we use Cirrus Link's Sparkplug MQTT Transmission and MQTT Engine modules along with the common ISA-95 equipment model of Enterprise > Site > Area > Line > Equipment to map the model data into a Unified NameSpace.
Sparkplug Basics
Sparkplug defines a standard format for MQTT message topic paths of:
spBv1.0/group_id/Message Type/edge_node_id/device_id
Sparkplug defines a standard format for MQTT message payloads of:
{ "timestamp": <timestamp>, "metrics": [{ "name": <metric_name>, "alias": <alias>, "timestamp": <timestamp>, "dataType": <datatype>, "value": <value> }], "seq": <sequence_number> }
where the ‘name’ of a metric can be hierarchical to build out proper folder structures for applications consuming the metric values.
For example, a simple Sparkplug™ B payload with a two metrics can be represented in JSON as follows:
{ "timestamp": 1486144502122, "metrics": [{ "name": "Metric1", "alias": 1, "timestamp": 1479123452194, "dataType": "String", "value": "Test" }, { "name": "Metric Level 1/Metric Level 2/Metric2", "alias": 2, "timestamp": 1479123452056, "dataType": "String", "value": "Test" }], "seq": 2 }
Let's take a look at a couple of examples using MQTT Transmission and MQTT Engine.
We have configured an MQTT Transmission Transmitter to use the Ignition tag tree at the edge to construct the group_id, edge_id and device_id starting at the folder level Site_1. With this configuration, the topic and payload for a change to Tag 1 will be:
At MQTT Engine, this hierarchal metric name is parsed and the edge folder structure recreated