Versions Compared

Key

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

...

Note while the folders and tags were moved and renamed, the required basic structure stayed the same with:

...

With our tags set up as we want them, we now must configure MQTT Transmission.  Do so by browsing to the the Configure section of the Ignition Gateway web UI and selecting 'MQTT Transmission -> Settings' on the left:

 

                                                                                                                               Image Added

 

In this example we're usiing the default MQTT Server of MQTT Distributor:

Image Added

Under the General tab, we're also using the defaults:

Image Added

Note the Tag Provider Name is the same Tag Provider we build out our Edge Nodes from in the Tag Browser earlier.  Now we can go back to Designer and force MQTT Transmission to update.  MQTT Transmission does not dynamically look for changes in the tag structure and update them.  This is because if it did, you could end up with a lot of improperly structured data while the changes to the tag tree are being made.  So, the update must be forced via 'Refresh'.  This is a tag under the MQTT Transmission tag provider as shown below in the Tag Browser.

Image Added

 

In order to refresh, Designer must be in read/write and preview mode.  Do so by selecting these two buttons in the top menu of Designer:

Image Added   Image Added


Once this is done, click 'Refresh' in the Tag Browser.  This will force MQTT Transmission to read the default Tag Browser tree, find 'Edge Nodes', and begin creating the components needed to send MQTT messages based on tag change events.  You can see this by clicking the refresh icon in the Tag Browser menu:

Image Added


At this point, you should be able to expand the MQTT Engine tag provider and see all of the tags in MQTT Engine:

Image Added


In addition to the tags being displayed in Engine, they are also writable if this enabled in MQTT Engine.  By default, MQTT Engine blocks command messages from being sent to devices.  To enable this feature, in the Ignition web console browse to the MQTT Engine Module Configuration and make sure 'Block Commands' is not checked as shown below:

Image Added


With this enabled and Designer in read/write and preview mode, you can write to the outputs of the modbus device from the Tag Browser:

Image Added



Note there is some delay in the response.  This is due in part to MQTT Transmissions 'Tag Pacing Period'.  This is the delay for MQTT messages to wait before being sent to allow multiple change events to buffer before putting them into a single MQTT message.  This can be changed in the MQTT Transmission module configuration in the Ignition web console.