User Tools

Site Tools


wiki:udtupload

This is an old revision of the document!


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 through the SiteSync Module. 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 when a device checks in.

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": [
        {
            "dataType": "String",
            "name": "ExampleTagFolder",
            "tagType": "AtomicTag",
            "valueSource": "memory"
        },
        {
            "name": "ExampleTagFolder",
            "tagType": "Folder",
            "tags": [
                {
                    "dataType": "String",
                    "name": "Temperature",
                    "tagType": "AtomicTag",
                    "valueSource": "memory"
                },
                {
                    "dataType": "String",
                    "name": "Battery",
                    "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.

wiki/udtupload.1691012796.txt.gz · Last modified: 2023/08/02 21:46 by mbrauer