You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

UNS Tags (Reference) 


In this page:

  


UNS →  Tutorial | Concept | How-to Guide | ISA-95 | Reference







In this section...

The root page @parent could not be found in space 93Draft.






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.

Built-in Tag Types

Tag Type

.Net Type

Description and Value Range

Digital

System.Int32

Binary value, 0 or 1. 

Integer

System.Int32

Integer values, range between -2,147,483,648 and 2,147,483,647

Long

System.Int64

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

Double

System.Double

Floating point value. ranging between  -1.79769313486231570E+308 and -4.94065645841246544E-324 for negative values; Between 4.94065645841246544E-324 and 1.79769313486231570E+308 for positive values

Decimal

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

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 example
  • Pulse: The tag changes to 0. Then immediately changes to 1. Pulse example
  • 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 example

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


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

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. 

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

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. 

Visibility

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.

  • No labels