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

Compare with Current View Page History

« Previous Version 7 Next »

Prerequisites:


Overview:

MQTT Transmission provides a mechanism for publishing newly added tags to the tag tree for which a Transmitter publishes on. This must be done any time new tags are added to the tag tree or tags are moved within the tag tree. It must also be done any time properties of tags are modified. This can be done manually or via a script.


Refreshing the Tag Tree for all Transmitters and Edge Nodes:

Consider the following Transmitter configuration in Transmission.

This Transmitter will look in the '[default]Edge Nodes' folder for tags to publish via MQTT. Because no Sparkplug IDs are defined in the Transmitter configuration, the first folder under the 'Edge Nodes' folder will be the Sparkplug Group ID. The second level folders will be the Sparkplug Edge Nodes IDs. So, given the following tag tree:

There are two Edge Nodes (each with their own MQTT client) with the Sparkplug Group and Edge Node IDs of:

  • My Group/Edge Node 1
    • This Edge Node has a single Sparkplug Device called 'PLC 1'
  • My Group/Edge Node 2
    • This Edge Node has a single Sparkplug Device called 'PLC 2'

Browse to the MQTT Transmission '[MQTT Transmission]Transmission Control/Refresh' tag as shown below and write a value of true to it by clicking the boolean checkbox:

Now browse to the MQTT Engine tag provider and verify the tags for both Edge Nodes have arrived as shown below.

Browse back to the default tag provider and create a new memory tag under 'PLC 1' called 'Tag 3' as shown below:

Now browse back to the MQTT Transmission tag provider and you will see the 'Refresh Required' boolean tag now shows 'true'. This is because a new tag was added which means a new BIRTH sequence must be published for consumers of the messages (such as MQTT Engine) so they can pick up the tags.

At this point writing a true to the tag '[MQTT Transmission]Transmission Control/Refresh' must be done before the new tag will be picked up by MQTT Engine.

After doing so, the new tag appears in MQTT Engine as shown below.

In performing this type of 'Global Refresh' using the '[MQTT Transmission]Transmission Control/Refresh' means that all Transmitter's tag trees in Transmission will be rescanned. So, using this mechanism will also publish new BIRTH sequences for all Edge Nodes in MQTT Transmission. In this example both 'My Group/Edge Node 1' as well as 'My Group/Edge Node 2' would publish their BIRTH sequences. In addition, if tags had been added to any Edge Nodes the changes would also be picked up for all and published in their respective BIRTH messages.


Refreshing the Tag Tree for a Single Edge Node:


  • No labels