This is an old revision of the document!
Table of Contents
Uploading JSON File for UDT Creation in Tag Provider
In Ignition, User-Defined Types (UDTs) are custom data types that allow you to group multiple tags into a single, reusable structure. You can create UDTs manually in the Ignition Designer, but you can also upload UDT definitions from JSON files. This guide will walk you through the process of uploading a JSON file that meets the UDT JSON requirements and creates UDTs in a tag provider.
Prerequisites
- Access to Ignition Gateway with appropriate permissions to create and edit UDTs. - A valid JSON file that adheres to the UDT JSON requirements.
UDT JSON Requirements
The JSON file for UDT creation in Ignition must meet the following requirements:
- The “type” field should be set to “UdtType”. - The “name” field should specify the UDT name. - The “tags” field should contain an array of tag objects, each defining the tag's properties.
Here is an example of a simple UDT JSON definition:
{
"name": "MyUDT",
"tagType": "UdtType",
"tags": [
{
"name": "data",
"tagType": "Folder",
"tags": [
{
"dataType": "String",
"name": "Temperature",
"tagType": "AtomicTag",
"valueSource": "memory"
},
{
"dataType": "String",
"name": "Battery",
"tagType": "AtomicTag",
"valueSource": "memory"
}
]
},
{
"dataType": "String",
"name": "Status",
"tagType": "AtomicTag",
"valueSource": "memory"
}
]
}
Conclusion
In this guide, you learned how to upload a JSON file that meets the UDT JSON requirements to create UDTs in a tag provider using Ignition. Leveraging UDTs allows you to efficiently organize and manage your tags, making your Ignition projects more organized and maintainable.