DataTalk

UDT — User-Defined Types

On this page

UDT (User-Defined Types) solve one of the most common problems in industrial projects: repeated equipment. When a plant has 20 identical pumps, each with the same set of PLC registers, creating tags for every pump individually is time-consuming and error-prone. A UDT defines the register structure once as a reusable template and generates all tags automatically for each instance.

UDT page — Name column with empty list

The UDT page shows a list of defined templates. The Name column identifies each template. When no templates have been created yet, the list is empty.

How UDTs work

Create a UDT template

Click Add to create a new UDT. Give it a name that reflects the equipment type — for example CoolingPump, ConveyorDrive, or PressureTransmitter.

Define the member tags: the individual registers that make up one instance of this equipment. For each member specify:

  • Relative register address (offset from the instance base address)
  • Data type
  • Scale, unit, and format
  • Label and description

The template has no physical device yet — it is a blueprint only.

Instantiate for each device

In the Tag Database, add a tag of type UDT, select the template, and provide:

  • The Connection — which device to read from
  • The base address for this specific instance

The gateway calculates each member tag’s absolute address as base address + relative offset and generates all member tags automatically, prefixed with the instance name.

Repeat for every device

Add one UDT instance per physical device, each with its own base address. All instances share the same structure from the template.

For 20 pumps with 12 registers each, this means 20 tag additions instead of 240 manual entries.

Benefits of UDTs

Efficiency — Reduces manual tag creation significantly, especially for projects with many similar components.

Consistency — All instances share an identical structure. There is no risk of one device having a misspelled tag name or a missing register.

Scalability — When a firmware update adds a register or a process change requires a new measurement, add the member once to the template. Every existing instance automatically gains the new tag without per-instance editing.

Naming convention

Instances are prefixed with the name assigned when creating the UDT tag in the Tag Database. For a template PumpUnit instantiated as Pump_01:

Pump_01.Speed
Pump_01.Current
Pump_01.FaultCode
Pump_01.RunHours
Pump_01.StartCommand

All devices follow the same pattern (Pump_02.Speed, Pump_03.Speed, …), making the Tag Database straightforward to navigate and filter.

Combine UDTs with Categories

Assign category labels to member tags in the template definition. Every instance then inherits those categories automatically, keeping large tag lists organized after instantiation.