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

Compare with Current View Page History

Version 1 Next »

Summary

Ignition User defined Types (UDTs) are a powerful tool for consistently modelling pieces of equipment that are replicated throughout a system. For example a pump may have multiple variables such as pressure, temperature and flow, and by creating a UDT definition for that pump we can then replicate every instance of that pump in the system.

In this tutorial we will explain how the data in a UDT is represented when using MQTT Transmission and MQTT Engine along with best practices for managing, distributing and updating UDT definitions.

Prerequisites

Tutorials

Creating, Publishing and Distributing a UDT

Step 1 - Open Designer sessions

Open three separate Designer sessions and connect to each of the three instances of Ignition:

  1. Edge1 running MQTT Transmission
  2. Edge2 running MQTT Transmission
  3. Ignition running MQTT Engine

Your designer views will look similar to the views below:

Step 2 - Create a UDT definition and instance on Edge1

See the Doc: Ignition 8.1 User Manual Creating a UDT Definition and Instance and Video: Inductive University Creating UDT Definitions for instructions on how to create a definition and instance in Designer.

From the Designer instance pointing to your Edge1 instance create a new UDT and instance with the following properties:

  • Name: Pump

Add a Memory Tag member to the Pump UDT with the following properties:

  • Name: Pressure
  • Value: 123

Add a second Memory Tag to the Pump UDT with the following properties:

  • Name: Flow
  • Value: 50

Under your device PLC1, create an instance of the UDT "Pump" with the following properties:

  • Name: Stream1

Your designer view will now look like this:

Step 3 - Publish the newly added UDT instance

On the Edge1 Ignition instance UI, navigate to the MQTT Transmission Transmitters settings by selecting Config > MQTT TRANSMISSION > Settings and selecting the Transmitters tab. Edit the Example Transmitter and deselect the Convert UDTs parameter. This will enable the UDT Definition to be included as part of the BIRTH and disable the UDT member tags from being converted to normal tags before publishing.

From the Designer instance pointing to your Edge1 instance force a refresh by switching the provider to MQTT Transmission and selecting the Refresh clickbox under Transmission control. This boolean control will automatically deselect once the BIRTH has been published.

From the Designer instance pointing to your MQTT Engine instance, you will now see the tag Stream1 with a data type of Pump published from the Edge1 device:

and can see the Pump UDT Definition in the UDT Definition tab:

From the Designer connected to the Edge1 instance, make changes to the Stream1 tag Flow and Pressure member tags and see the data published and displayed on the MQTT engine instance of Designer. 

Now we have our UDT defined we want to replicate this across our other edge device.

Step 4 - Distribute the Pump UDT on other Edge devices

Export UDT definition from edge1

Import UDT definition to edge2

Create an instance on edge 2

Publish birth

Managing UDT Changes and Updates





  • No labels