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. 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.

Steps

1. **Prepare the JSON File**
 Before uploading the JSON file, ensure that it conforms to the UDT JSON requirements.
2. **Access the Ignition Designer**
 Open the Ignition Designer and connect to the Ignition Gateway where you want to upload the UDT.
3. **Navigate to Tag Providers**
 In the Ignition Designer, navigate to the "Tag Browser" section, usually located on the left side of the screen. Expand the "Tag Providers" section and select the target tag provider where you want to create the UDT.
4. **Upload the UDT JSON File**
 Right-click on the selected tag provider and choose "Import Tags" from the context menu. This will open a file selection dialog.
5. **Select the JSON File**
 Browse your computer's file system and select the prepared JSON file containing the UDT definition.
6. **Map UDT Properties**
 After selecting the JSON file, Ignition will analyze its structure and present you with a mapping screen. Here, you can map the properties from the JSON file to the corresponding UDT properties. Ensure that each field in the JSON file is correctly mapped to the appropriate UDT property.
7. **Confirm and Create UDT**
 Once you have verified the mapping, click the "Create" button to create the UDT in the selected tag provider. If any issues arise during the creation process, Ignition will display an error message with details about the problem.
8. **Verify UDT Creation**
 After the process is complete, go to the "Tag Browser" and confirm that the UDT is successfully created in the chosen tag provider. You can now use this UDT to define tags within your project.
 
 ====== 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:

```json {

"name": "MyUDT",
"type": "UdtType",
"tags": [
  {
    "name": "Temperature",
    "type": "Float",
    "opcItemPath": "[Device]Temperature",
    "description": "Temperature measurement in Celsius"
  },
  {
    "name": "Pressure",
    "type": "Float",
    "opcItemPath": "[Device]Pressure",
    "description": "Pressure measurement in bar"
  }
]

}

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.1691012142.txt.gz · Last modified: 2023/08/02 21:35 by mbrauer