![]()
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![]()
The topic and payload of the Sparkplug message are parsed in different ways to create the Default Tag or UNS Tag folder hierarchy in the MQTT Engine tag provider.
A Cirrus Link Sparkplug message comprises two parts: the topic and the payload.
The topic is published in the format:
Payload in the format:
Default Tags
When configured to create Default Tags, MQTT Engine will parse the topic and payload to create tags under the 'Edge Nodes' folder in the MQTT Engine tag provider.
The metric name in the payload is used for the tag name prefixed by the Sparkplug Descriptors from the message topic resulting in a tag path of:
For example the message below:
creates an MQTT Engine tag:
| Note |
|---|
If using MQTT Transmission to publish the message and have configured the Transmitter to dynamically pickup the Sparkplug Descriptors, the metric names used in the payload will be the remainder of the tag folder hierarchy not used in the topic namespace. Prefixing the Sparkplug Descriptors in the topic to the metric name in the payload results in unique tag folder hierarchy's at MQTT Engine |
UNS Tags
When configured to create UNS Tags, MQTT Engine will obfuscate the Sparkplug Descriptors used in the topic and only parse the metric name included in the payload to create the tag structure under the configured UNS Folder prefix
..
It is a requirement of a UNS is that each tag can only be referenced from a single source ie. the same tag path cannot be published from two edge nodes.
For example the message below:
creates an MQTT Engine tag:
| Warning |
|---|
If MQTT Engine receives a second message payload with a metric name it has already created, it will not create the UNS tag. For example:
will not create an MQTT Engine tag as the tag [MQTT Engine]UNS/Conveyer/Batch/Quantity already exists. |
| Note |
A requirement of a UNS is that each tag can only be referenced from a single source ie. the same tag path cannot be published from two edge nodes. In order to identify the source for the tag, the Sparkplug Descriptors in the topic are used to create three custom tag properties which identify the Sparkplug Descriptor associated with this tag: SparkplugGroupId, SparkplugEdgeNodeId and SparkplugDeviceId |
If using MQTT Transmission to publish the message
, you may need to utilize the Sparkplug IDs configurable for each Transmitter to correctly build your UNS tag path rather than allow the Transmitterand the Transmitter are configured to dynamically pickup the Sparkplug Descriptors
from the tag folder hierarchy., the metric names used in the payload will be the remainder of the tag folder hierarchy not used in the topic namespace.
This can result in collisions at MQTT Engine with duplicate metric names from different edge nodes.
| Tip |
|---|
| Review the MQTT Transmission Transmitters and Tag Trees to gain an understanding of how MQTT Transmission Transmitter configurations interact with Ignition tag trees to publish Sparkplug messages and the immense flexibility that can be realized. |
In the example below we have
fourthree tag providers simulating
four Edgesedges - Site 1A, Site 1B
, Site 1Cand Site 2.
For each Transmitter configuration we have set the Sparkplug IDs to use the the message topic allowing the tag folder hierarchy at the Edge to form the metric name.
Allowing the Transmitters to create the Sparkplug Descriptors dynamically would result in duplicate metric names in messages published to MQTT Engine.
For example:
Site 1 A publishing with topic "Enterprise/Site 1/Area 1" would contain a payload metric of "BMS/Rooftop"
Site 1 B publishing with topic "Enterprise/Site 1/Area 2" would contain a payload metric of "BMS/Rooftop"
Site 2 publishing with topic "Enterprise/Site 2/Area 1" would contain a payload metric of "BMS/Rooftop"
The recommended approach to create unique metric names is to configure the Sparkplug Descriptors used by each Transmitter which allows the full tag folder hierarchy to be used for the metric name.
In the example below we have set the Sparkplug IDs for each Transmitter:
such that
Site 1 A publishing with topic "Enterprise/Site 1 A/UNS" would contain a payload metric of "
Messages published from the each edge node will now contain metric names which are the full folder hierarchy at the Edge
For example:
Site 1A Edge node metric name ofEnterprise/Site 1/Area 1/BMS/Rooftop
/ ........Site 1B Edge node metric name of"
Site 1 B publishing with topic "Enterprise/Site 1 B/UNS" would contain a payload metric of "Enterprise/Site 1/Area 2/BMS/Rooftop
/ ........Site 1C Edge node metric name of"
Site 2 publishing with topic "Enterprise/Site
1/Area 2/Line 2/DO1_EMU/........Site 2 Edge node metric name of2/UNS" would contain a payload metric of "Enterprise/Site 2/Area 1/BMS/Rooftop
/ ........"
| Note |
|---|
If MQTT Engine is configured for both Default Tags and UNS Tags, this approach will result in some duplication of the folder structure under the Edge Nodes but will ensure that the UNS view is correctly laid out |
At Engine, these tags published from Edge Nodes Site 1 A, Site 1 B and Site 1 C are then concatenated under the single UNS tag path of UNS> UNS > Enterprise > Site 1