Versions Compared

Key

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

 UNS Tags (Reference) represent real-time variables and their associated historical records, providing a structured way to model process information by linking to physical devices, databases, or calculated values. 

Tags in the Unified Namespace provide:

  • Real-time data representation
  • Historical record association
  • Device communication mapping
  • Hierarchical organization
  • Type-safe data handling
  • Array and template support

Tags form the foundation of the solution's data model, connecting field devices to visualization, logic, and storage.

In this page:

Table of Contents
maxLevel2
minLevel2
indent10px
excludeSteps
stylenone

In this section...

Page Tree
root@parent
spaces93DRAF

Built-in Types

The built-in tag types extend .NET data types and provide key functionality for handling different data formats in the software platform.

Tag Types

Built-in

Tag

Types

Tag Net Description and Value System., System.Integer values, range between -2,147,483,648 and 2,System.System. value. ranging between  -1.79769313486231570E+308 and -4.94065645841246544E-324 for negative values; Between 4.94065645841246544E-324 and 1.79769313486231570E+308 for positive valuesSystem.

Timer is a built-in integer type that can be used to generate precise timing signals and wave patterns. Timers have the following models: 

  • SquareWave:  The value toggles between 0 and 1. SquareWave exampleImage Removed
  • Pulse: The tag changes to 0. Then immediately changes to 1. Pulse exampleImage Removed
  • DelayOff: The tag behaves as a PLC Timer Off. If you set the tag with a value other than the StartValue during runtime, the tag will hold that value for the period specified in the Interval. The tag goes back to its StartValue after the period of time (Interval). 

DelayOff exampleImage Removed

  • Comparer: The tag is set to 1 after the specified comparer Interval, and then goes back to zero at midnight. Comparer exampleImage Removed

For SquareWave, Pulse, and Comparer, the tag toggles between 0 and the StartValue (instead of 0 and 1) if you set the tag StartValue.

Type.
NET TypeDescription
Range
Digital
Int32Binary value
0 or 1
Integer
Int32
Whole numbers±2,147,483,647
Long
Int64

Long integer values, range between  -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807

Double

Extended integers±9.2×10¹?
Double
DoubleFloating point
±1.79×10³??
Decimal
Decimal

Extended precision floating point., ranging betwen 0 and +/-79,228,162,514,264,337,593,543,950,335 with no decimal point; Between 0 and +/-7.9228162514264337593543950335 with 28 places to the right of the decimal; smallest nonzero number is +/-0.000

The Decimal type allows calculation with higher precision than the Double type. However, math operations using Decimal can be 40 times slower than using Double. So the Decimal type should only be used when Double precision is not enough.

Text

System.String

Text strings composed of Unicode character. Maximum length of the sting is the integer range. 

Json

System.String

Text strings composed of Unicode character. Maximum length of the string is the integer range. 

The JSON tag has built-in methods and properties to parse its value in and out to JObject and JArray and handle its properties. Examples of the available methods to manipulate JSON tags:

TK.JSONFromAsset: Returns a JObject from an asset.

TK.JSONString: Takes JSON and a property, returns a string.

TK.JSONValue: Takes JSON and a property and returns a value.

Timer

System.Int32

DateTime

System.DateTimeOffset

From 12:00:00 midnight, January 1, 0001 to 11:59:59 P.M., December 31, 9999

TimeSpan

TimeSpan

Data Interval in Days, Hours, Minutes, Seconds and Milliseconds, where each of those properties can hold a Double value

Guid

Guid

Standard Microsoft Globally Unique Identifier (GUID)

DataTable

System.Data.DataTable

Holds an in-memory DataTable

Image

System.Byte[]

Can hold an Image file or any binary content. The Long value is the maximum size of the content. 

AnchorTagsConfigurationTableTagsConfigurationTableTags Configuration Table

Either creating a new tag, or editing tags, in the DataGrid view or the properties dialogs, the tag has the following configuration fields.

The table lists all properties available for the Tags. However, not all properties described in the documentation are displayed in the data grids by default. Right-click column headers to see which property columns are currently displaying. The displayed properties appear with a check mark.  

Field

Description

ID

Identifies the tag uniquely within the software platform.

Path

Allows users to associate tags with specific assets. Select the asset you want to associate with the tag. Specifies the tag's location within the Solution hierarchy.

VersionID

Tracks the version of the tag configuration.

Name

Defines the name of the tag.

High precision28-29 significant digits
TextStringUnicode text2GB max
JsonStringJSON structured dataBuilt-in parsing
DateTimeDateTimeOffsetDate and timeYear 0001-9999
TimeSpanTimeSpanDurationDays to milliseconds
GuidGuidUnique identifier128-bit
DataTableDataTableIn-memory tableStructured data
ImageByte[]Binary contentAny size
TimerInt32Time patternsMultiple modes

Timer Types

ModeBehaviorUse Case
SquareWaveToggle 0/1 at intervalBlinking, heartbeat
PulseMomentary 0→1→0Triggers, events
DelayOffHold value then resetTOF timer
ComparerDaily scheduleTime-based control

Reference Type

Dynamic tag addressing:

csharp

// Set reference target
@Tag.Reference1.Link = @Tag.TankFarm/Tank1/Level.GetName();

// Use reference
double level = @Tag.Reference1.Value;

Configuration Properties

PropertyDescriptionRequired
NameUnique tag identifierYes
TypeData type selectionYes
PathAsset tree locationNo
ArrayArray size (0 to N)No
StartValueInitial value at startupNo
ParametersType-specific settingsNo
Min/MaxValue limitsNo
ScaleMin/MaxEngineering scaleNo
RetentiveValue persistenceNo
DomainServer/Client scopeNo
VisibilityExternal access levelNo
FormatDisplay formattingNo
UnitsEngineering unitsNo
DescriptionDocumentation (1024 char)No

Creating Tags

Method 1: Asset Tree

  1. Navigate to Unified Namespace → Asset Tree
  2. Right-click folder or click New Tag icon
  3. Enter tag name and properties

Method 2: Tags Grid

  1. Go to Unified Namespace → Tags
  2. Options:
    • Click New Item for dialog
    • Type directly in Name column
    • Paste from external source

Method 3: Import

  • Copy from another solution
  • Import from CSV files
  • Use Solution Import Tools
  • EngWrapper API

Tag Parameters

Deadband

Limits value updates:

Absolute: ±5 units from last value
Percentage: 10% change required

EnumerationSet

Map values to text:

0 → "Off"
1 → "On"
2 → "Auto"

Domain Configuration

DomainScopeUse Case
ServerGlobal across all clientsDevice data, shared values
ClientLocal to each sessionUser settings, local states

Visibility Levels

LevelExternal AccessUse Case
PrivateNoneInternal only
ProtectedRead-onlyMonitor only
PublicRead/WriteFull access

Affects: OPC UA Server, MQTT Broker, TcpDataAccess


Retentive Options

SettingSavesUse Case
NoneNothingTemporary values
ValueOnlyValue onlyOperator setpoints
PropertiesAll including valueComplete state
PropertiesOnlyAll except valueConfiguration

Storage: Dataset.DB.Retentive database


Format Strings

Numeric Formats

N0    → 123        (no decimals)
N2    → 123.45     (2 decimals)
C     → $123.00    (currency)
P     → 12.34%     (percentage)
X     → 7B         (hexadecimal)
E     → 1.23E+02   (scientific)

DateTime Formats

d     → 3/15/2024  (short date)
T     → 14:30:00   (long time)
yyyy-MM-dd HH:mm:ss → 2024-03-15 14:30:00

Array Configuration

Array size N creates elements [0] to [N]:

Array = 5 creates:
Tag[0], Tag[1], Tag[2], Tag[3], Tag[4], Tag[5]
(6 elements total)

DataTable Tags

Using Queries

csharp

@Tag.DataTableTag = @Dataset.Query.MyQuery.SelectCommand();

Manual Population

csharp

@Tag.DataTableExample.StartBlockSet();
@Tag.DataTableExample[1].Column1 = value1;
@Tag.DataTableExample[2].Column2 = value2;
@Tag.DataTableExample.CommitBlockSet();

Runtime Attributes

Core Properties

PropertyTypeDescription
ValueTag TypeCurrent value
QualityIntegerOPC quality (0/64/192)
TimestampDateTimeOffsetLast change time

Quality Codes

  • 0: Bad quality
  • 64: Uncertain quality
  • 192: Good quality

Additional Configuration

Device Integration

  • Node: Communication node
  • Address: PLC/device address
  • AccessType: Read/Write/ReadWrite

Alarm Settings

  • Condition: Trigger logic
  • Groups: Alarm categorization
  • Limits: Threshold values

Historian

  • Table: Storage location
  • Deadband: Recording threshold
  • DeadbandType: Absolute/Percentage

Best Practices Checklist 

  •  Use meaningful names - Follow naming conventions
  •  Set appropriate types - Match data characteristics
  •  Configure retentive - Preserve critical values
  •  Apply deadbands - Reduce unnecessary updates
  •  Document tags - Use Description field
  •  Organize in assets - Logical hierarchy
  •  Set security - Control access levels

Troubleshooting

Tag not updating:

  • Check device communication
  • Verify Quality = 192
  • Review deadband settings
  • Confirm not disabled

Wrong value format:

  • Check Format string
  • Verify Units configuration
  • Review scale settings

Array issues:

  • Confirm index in range
  • Check array size setting
  • Verify element access

Retentive not working:

  • Check database connection
  • Verify retentive setting
  • Review database permissions

In this section...

Page Tree
root@parent
spaces93DRAF

Type

Determines the data type of the tag (e.g., integer, string, float). The supported Types available are:

Digital: Represents binary data, typically used for true/false or on/off states.

Integer: Holds whole numbers without decimal points, suitable for counting or indexing.

Long: Stores larger whole numbers than Integer, useful for extended range calculations.

Double: Represents floating-point numbers with double precision, allowing for very large or very small values.

Decimal: Used for high-precision floating-point numbers, ideal for financial calculations where precision is critical.

Text: Contains strings of characters, used for textual data.

DateTime: Combines date and time into a single value, useful for timestamps and scheduling. For valid date and time formats, refer to Standard Date and Time Format Strings.

TimeSpan: Represents a duration of time, often used for intervals. 

Image: Stores binary data for images, enabling the inclusion of visual data.

Timer: Represents a timer object, useful for time-based operations.

Guid: Contains globally unique identifiers, used for uniquely identifying objects.

DataTable: Stores structured data in table format, allowing for complex data organization.

JSON: Holds JSON (JavaScript Object Notation) formatted data, enabling structured data exchange.

Reference: Represents a reference to another object or entity, used for linking related data.

Array

Defines whether the tag is an array. When this field is blank, the tag is not an array. When the field contains an integer value of N, an array is created from position 0 to N. For example, if the field contains the value 5, the array is created from Tag[0] to Tag[5], resulting in 6 elements. This method accommodates two programming styles: one that counts elements from 0 to less than 5, and one that counts from 1 to 5.

Enumeration

Defines the set of possible values, messages, and colors for the tag. Connect these types with a Tag or use them directly in script expressions.

StartValue

Sets the initial value of the tag upon startup.

Parameters

Configures additional parameters based on the tag type associated with the tag. Double-click the parameters field to see a dropdown menu with applicable options.

Deadband: Limits new values saved to the tag. Defines the necessary difference between old and new values. Set Deadband as a percentage or decimal (e.g., 10.5, 10%, 300%, 17.8%).

Example 1: With Deadband set to 5 and initial value at 0, the next saved input must be ≥5 or ≤-5.

Example 2: With the current tag value at 100 and Deadband set to 10%, the next saved input must be ≥110 or ≤90.

EnumerationSet: Use dictionaries to translate tag values into text (e.g., display "on" for 1 and "off" for 0). Configure the display component to use tags with TextOutput set to Tagname, Tagname.Value, Tagname.ValueAsString, or Tagname.DisplayValue to show the numeric or enumeration string value.

Min

Sets the minimum allowable value for the tag.

Max

Sets the maximum allowable value for the tag.

ScaleMin

Defines the minimum scale value for the tag.

ScaleMax

Defines the maximum scale value for the tag.

Retentive

Specifies whether the tag retains its value between application restarts. Allows to save the value of the tag and its internal properties to the database whenever the value changes. By enabling this, the software platform retains the tag's value when the application shuts down and makes it available when the application starts again. The option available are:

None: Does not retain the value or properties.

ValueOnly: Retains only the value.

Properties: Retains all properties, including the value.

PropertiesOnly: Retains all properties, except the value.

Retentive Tag values store in the database defined at Datasets / DBs / Retentive. You can customize this to use any database.

Domain Server Tags: Retentive can apply to these tags, allowing cold-start from the Solution without losing operator-input values or other tags that retain their last value between shutdown and startup.

Domain Client Tags: Retentive can apply to these tags, creating concepts such as User Configuration settings. These settings store and locate according to the client or user connection.

Domain

Associates the tag with a specific domain. It defines if the tag value has Server (global) or Client (instance) scope.

Server (Default): The software platform synchronizes the tag value across all operator stations accessing the Solution, making it unique and consistent throughout. Use Server tags for devices communications and historian purposes. This ensures that all tags used by devices and the historian are of the Server type, providing a unified and synchronized data management approach.

Client: The software platform keeps the tag value local to each client display instance accessing the Solution. This means that the tag's value is unique to each user interface session. 

AnchorVisibilityVisibilityVisibility

Defines the visibility of your tag to external connections. It controls how external systems can access and interact with the tag, ensuring proper data exposure and security. The available options are:

Private: The tag remains visible only to the local Solution and its redundant pair. Use this setting to restrict the tag's visibility, ensuring that only the local Solution and its backup can access the tag.

Protected: The tag becomes visible to external connections for read-only operations. This setting allows external systems to read the tag's value without permitting any modifications, ensuring that the data remains unchanged.

Public: The tag becomes visible to external connections for both reading and writing. This setting provides full access to the tag, allowing external systems to both read and modify the tag's value.

The data that will be visible to the built-in OPC UA server, the MQTT Built-In Broker, and the Server-to-Server TcpDataAccess protocol are affected by this configuration. 

Disable

Indicates whether the tag is disabled.

DisplayText

Specifies the text to display for the tag.

Units

Defines the units of measurement for the tag. More information at Units Conversion.

Format

Specifies the format of the tag's value. It defines the display format of tag values. For example, N2 specifies a number with two decimal places, like 3.14, while N1 specifies a number with one decimal place, like 2.1. These formats follow the specifications provided in Microsoft .NET. Common format strings include:

N0: Number with no decimal places. E.g., N0 shows no decimal places, 123.

Nn: Number with n decimal places (replace n with any integer). E.g., N2 shows two decimal places, 123.45.

X: Hexadecimal (supported only for integral types). E.g., X shows a hexadecimal number, 7B.

C: Currency. E.g., C shows a currency format, $123.00.

R: A string that can round-trip to an identical number. E.g., R shows a round-trip number, 123.45.

P: Number multiplied by 100 and displayed with a percent symbol. E.g., P shows a percentage, 12345.00%.

G: The more compact of either fixed-point or scientific notation. E.g., G shows a compact format, 123.45.

F: Integral and decimal digits with optional negative sign. E.g., F shows fixed-point, 123.45.

E: Exponential notation. E.g., E shows exponential format, 1.234500E+02.

D: Integer digits with optional negative sign. E.g., D shows integer format, 123.

For valid numeric formats, refer to Standard Numeric Format Strings.

DefaultSymbol

Sets the default symbol for the tag.

ActiveColor

Specifies the color to use when the tag is active.

InactiveColor

Specifies the color to use when the tag is inactive.

ReadSecurity

Defines the security level required to read the tag.

WriteSecurity

Defines the security level required to write to the tag.

Level

Specifies the level of the tag within the system.

Category

Categorizes the tag within the system.

LockState

Indicates whether the tag is locked.

DevicePoint

Shows the read-only property, which communication point address relates to the tag (if any).

LockOwner

Identifies the owner of the lock on the tag.

DateCreated

Records the date the tag was created.

DateModified

Records the date the tag was last modified.

Description

Provides a string message with additional information about the Tag. The string length max is 1024 characters.