Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

UNS  UserTypes (Reference)enable users to extend the platform’s , also referred as UDTs, or DataTemplates, extend the platform's predefined data types by defining custom types with properties tailored to their business needs. This feature offers flexibility for modeling , enabling modeling of solution-specific data structures like equipment status and asset attributes. A UserType provide:

  • Custom data type definitions
  • Reusable tag structures
  • Hierarchical data modeling
  • Consistent asset representation
  • Property inheritance
  • Template-based tag creation

UserTypes allow creating complex data structures that standard types

can’t

cannot represent, such as

machine data, equipment status, and other asset attributes within an industrial plant.

pumps, motors, tanks, or production lines.

In this page:

Table of Contents
maxLevel2
minLevel2
indent10px
excludeSteps
stylenone

Creating UserTypes

  1. Navigate to Unified Namespace → UserTypes
  2. Click New button
  3. In dialog:
    • Name: Template identifier
    • Description: Documentation
  4. Click OK
  5. Add members in grid:
    • Type in first row
    • Press Enter to add
    • Configure properties per member

UserType Properties

PropertyDescriptionRequired
NameMember name within templateYes
TypeData type (built-in or nested template)Yes
ArrayArray size for memberNo
ParametersType-specific settingsNo
Min/MaxValue limitsNo
ScaleMin/MaxEngineering scaleNo
UnitsEngineering unitsNo
FormatDisplay formattingNo
EnumerationValue mappingsNo
StartValueInitial valueNo
RetentiveValue persistenceNo
DomainServer/Client scopeNo
VisibilityExternal accessNo
DisplayTextUI display textNo
RelativeAddressDevice addressingNo
DescriptionMember documentationNo

Using UserTypes

Creating Tags from Templates

  1. Go to Unified Namespace → Tags
  2. Click New Item
  3. In Type dropdown, select template
  4. Tag inherits all template members

Template Instance Example

Template: Motor
Members:
  - Running (Digital)
  - Speed (Double)
  - Temperature (Double)
  - AlarmStatus (Integer)

Tag: Motor1 (Type: Motor)
Access:
  @Tag.Motor1.Running
  @Tag.Motor1.Speed
  @Tag.Motor1.Temperature
  @Tag.Motor1.AlarmStatus

Nested Templates

Templates can contain other templates:

Template: PumpStation
Members:
  - Pump1 (Type: Motor)
  - Pump2 (Type: Motor)
  - FlowRate (Double)
  - Pressure (Double)

Access:
  @Tag.Station1.Pump1.Running
  @Tag.Station1.Pump2.Speed

Security Settings

PropertyControlsApplies To
EditSecurityModify permissionDesign-time
ReadSecurityRead accessRuntime
WriteSecurityWrite accessRuntime

Member Configuration

Supported Base Types

  • Digital
  • Integer
  • Long
  • Double
  • Decimal
  • Text
  • DateTime
  • Custom Templates

Array Members

Template: TankFarm
Members:
  - Tanks (Type: Tank, Array: 10)
  
Access:
  @Tag.TankFarm1.Tanks[0].Level
  @Tag.TankFarm1.Tanks[1].Temperature

Relative Addressing

For device communication:

Template: AnalogInput
Members:
  - Value (RelativeAddress: ".PV")
  - Status (RelativeAddress: ".ST")
  
Device mapping automatically appends to base address

Important Notes

<ac:structured-macro ac:name="info"> ac:rich-text-body When setting properties for array elements or template members (StartValue, Min, Max), these values won't display in the Designer DataGrid. Access them through Tag Properties dialog or at runtime.

Property changes to one instance don't propagate to others - each template instance operates independently. </ac:rich-text-body> </ac:structured-macro>


Common Use Cases

Motor Template

Members:
  - Running: Digital
  - Speed: Double (0-1800 RPM)
  - Current: Double (0-100 Amps)
  - Temperature: Double (0-200 °C)
  - HoursRun: Long
  - LastMaintenance: DateTime

Tank Template

Members:
  - Level: Double (0-100 %)
  - Temperature: Double (-50-150 °C)
  - Pressure: Double (0-10 Bar)
  - HighAlarm: Digital
  - LowAlarm: Digital
  - Product: Text

Production Line

Members:
  - Station1: Motor
  - Station2: Motor
  - ConveyorSpeed: Double
  - ProductCount: Integer
  - BatchID: Text
  - QualityScore: Double

Best Practices Checklist 

  •  Plan template hierarchy - Design before implementation
  •  Use meaningful names - Clear member identification
  •  Document templates - Describe purpose and usage
  •  Standard units - Consistent engineering units
  •  Reuse templates - Avoid duplication
  •  Version control - Track template changes
  •  Test thoroughly - Verify all members

Troubleshooting

Template not appearing:

  • Save after creation
  • Check for naming conflicts
  • Verify no circular references
  • Review template hierarchy

Members not accessible:

  • Confirm tag uses template type
  • Check member names
  • Verify array indices
  • Review security settings

Values not retained:

  • Check retentive settings
  • Verify database connection
  • Review member configuration
  • Test with simple template




In this section...

Page Tree
root@parent
spaces93DRAF

Defining UserTypes (Tag DataTemplates)

To define a tag template:

  • Go to Unified Namespace → DataTemplates.

  • Click New.

  • The "Create New DataTemplate" dialog will open.

  • In the "New Name" field, enter a name for the tag type. In the Description, enter a description of the template. Click OK. The Templates tab displays with the name of the new template at the top of the tab.

To create a new member for this DataTemplate, type into the first row of the table next to it and press enter after adding all the information. The properties here are the same ones for Tags. See Creating and Editing Tags for more information. 

To delete a template, select it from the User Custom Type drop-down list, then click Delete Item.

Using DataTemplates for custom Tag Types

DataTemplates streamline the creation of tags by supplying predetermined attributes. By employing these templates, users can efficiently manage data by upholding a logical and hierarchical structure representing assets or informational models.

To implement a DataTemplate in your project:

  1. Navigate to the 'Tags' tab and click on 'New Item' to create a new tag.

  2. In the 'Type' dropdown row, you can select the desired template. If a tag has already been created, select the desired template from the 'Type' column.

  3. The tag will inherit the attributes from the chosen template.

DataTemplate Members Columns

DataTemplate Properties

ID

Identifies the unique identifier for the DataTemplate.

VersionID

Shows the specific version number of the DataTemplate.

Name

Names the DataTemplate for identification and reference.

Type

Defines the member's data type, which could be one of the base types listed below. The base data types include Digital, Integer, Long, Double, Decimal, and Text.

Array

Indicates whether the DataTemplate is an array and defines its size and structure.

Parameters

Specifies additional parameters that define the behavior or attributes of the DataTemplate.

Min

Sets the minimum allowable value.

Max

Sets the maximum allowable value.

ScaleMin

Defines the minimum scale value for display or calculation purposes.

ScaleMax

Defines the maximum scale value for display or calculation purposes.

Units

Specifies the unit of measure for the DataTemplate.

Format

Determines the format in which the data is displayed.

Enumeration

Lists possible enumeration values for the DataTemplate.

StartValue

Sets the initial value for the DataTemplate when it is first created.

Retentive

Indicates whether the DataTemplate retains its value after a system restart.

Domain

Defines the domain or category to which the DataTemplate belongs.

Visibility

Controls whether the DataTemplate is visible in certain contexts.

Disable

Indicates whether the DataTemplate is disabled and non-operational.

DisplayText

Specifies the text to be displayed for the DataTemplate in the user interface.

RelativeAddress

Sets the relative address or reference path for the DataTemplate within the system.

EditSecurity

Specifies the security level required to edit the DataTemplate.

ReadSecurity

Specifies the security level required to read the DataTemplate.

WriteSecurity

Specifies the security level required to write to the DataTemplate.

LockState

Indicates whether the DataTemplate is locked and cannot be modified.

LockOwner

Identifies the owner or entity responsible for locking the DataTemplate.

DateCreated

Records the date and time when the DataTemplate was created.

DateModified

Records the date and time when the DataTemplate was last modified.

Description

Summarizes the purpose and details of the DataTemplate.

Info

When setting properties for an array element or a DataTemplate member (like StartValue, Min, or Max), these values won’t show up in the DataTable inside the Designer. Instead, you can find them in the Dialog TagProperties or during Runtime.

Also, keep in mind that changing a property for one element won’t update the rest. Each item in the Template or Array works independently, so modifications won’t apply across all instances automatically.

In this section:

Page Tree
rootV10:@parent
spacesV10