Tag Properties

Tags are points of data and may have static values or dynamic values that come from an OPC address, an expression, or a SQL query. The values can be used on screens, in transaction groups, and more. Additionally, tags offer a core set of features above and beyond simple values, such as the scaling, alarming, meta information, and history facilities.

Depending on the specific type of tag, even more options are available. In general, Tags provide a common interface for tying together many types of data in Ignition.

Historical Tag data is stored in the database connection associated with the selected history tag provider. Ignition creates and manages several tables within the Tag database that the historian uses to not only store your data but also make it easily available within your Ignition projects.

There are several types of Tags that are similar in their configurations, but differ in how the value is generated. The different types of Tags are: OPC Tags, Memory Tags, Query Tags, Complex Tags, System Tags, and Client Tags.

Tag Configuration in the Designer

To configure a tag, right-click the tag, then from the popup menu go to New Tag and select the type of tag you want to configure. The Tag Editor window is displayed and you can now set the properties for that tag. The Tag Editor window has the following sections: General, Numeric, Metadata, Permissions, History, Alarming, SQL Query, Expression, and Tag Event. The description for the properties in each section is described next.


General Properties

Properties common to most tags are as follows:

Property
Binding
Name Description

Name

Name

How the tag will be presented and referenced in the system. The tag path will be the provider, the folder structure, and this name.

Value

Value

The value of the tag. Can only be modified if the tag allows value writing and the user has sufficient privileges.

Data Type

Datatype

The type of the value. It is important that this be set as correctly as possible with regards to the tag's underlying data source. The Tags system will attempt to coerce any raw incoming value (for example, from OPC or a SQL query) into the desired type.

Enabled

Enabled

Whether the tag will be evaluated by the scan class. If false, the tag will still be present, but will have a bad quality.

Access Rights

AccessRights

Specifies the access level allowed to the tag: Read/Write, Read only, or Custom. If Custom, the tag will use the permission settings.

Scan Class

ScanClass

The scan class that will execute the tag. The scan class dictates the rate and conditions on which the tag will be evaluated.

Additional Properties - OPC Tags

OPC Server

OPCServer

The server against which to subscribe the data point.

OPC Item Path

OPCItemPath

The path to subscribe to on the server. The point will be subscribed at the rate dictated by the scan class.

Additional Properties - Tag in External Providers

Driver

DriverName

The name of the Ignition Gateway that will be responsible for the execution of the tag. All other Gateways will monitor the value.

Numeric Properties

The numerical properties are available to OPC, DB, and Client tags whose data types are numeric.

Property
Binding
Name Description

Scale mode

ScaleMode

If and how the tag value will be scaled between the source, and what is reported for the tag.

Raw Lo

RawLow

Start of the "raw" value range.

Raw Hi

RawHigh

End of the "raw" value range.

Scaled Lo

ScaledLow

Start of "scaled" value range. Raw low will map to Scaled low for the tag.

Scaled Hi

ScaledHigh

End of "scaled" value range. Raw high will map to Scaled high for the tag.

Clamp mode

ClampMode

How values that fall outside of the ranges will be treated. "Clamped" values will be adjusted to the low/high scaled value as appropriate.

Scale Factor

ScaleFactor

For single parameter modes (currently only Exponential Filter), the factor parameter for the equation.

Deadband

Deadband

A floating point value used to prevent unnecessary updates for tags whose values "float" by small amounts.

Deadband Mode

DeadbandMode

There are two modes to choose from: Absolute or Percentage.

Metadata Properties

The metadata properties provide informational properties for a tag. The values of these fields can be read and modified through scripting, or bound to properties such as range, tooltips, and so on.

Property
Binding
Name Description

Format String

FormatString

How the value should be formatted when converted to a string (only applies to numerical data types).

Eng Unit

EngUnit

The engineering units of the value.

Engineering Limits Low

EngLow

The lowest expected value of the tag.

Engineering Limits High

EngHigh

The highest expected value of the tag.

Engineering Limit Enforcement

EngLimitMode

Dictates how the engineering range should be enforced on the tag. If not "none", the tag will change to bad quality ("limit exceeded"), when the value exceeds the specified range.

Tooltip

Tooltip

The tooltip provides a hint to visual components as to what should be displayed when the user hovers their mouse cursor over the component that is being driven by the value of this tag.

Documentation

Documentation

A freeform text property for information about the tag.

Permission Properties

Note: Make sure your tag's Access Rights (in the General section of the Tag Editor window) is set to Custom for these permissions to have an effect. Users must have at least one role in this list in order to have access to the tag. If a user has more than one of the roles in the list, the role with the highest privilege will apply.

By default, a tag's Access Rights property is set to Read/Write, which means that any user can read the value of the tag and write to the tag. Read-only mode makes the tag non-writeable for all
users. Custom mode allows the tag to assign read/write or read-only privileges to individual roles. Any roles not explicitly granted a right by using the custom permissions editor will not be able to read the tag's value or write to the tag.

History Properties

The properties on the History tab of the Tag Editor window, specify if and how the tag's history will be stored in the Tags Historian system.

Property
Binding Name
Description

Store History

HistoryEnabled

Whether the tag will report its history to the Tags Historian system.

History Provider

PrimaryHistoryProvider

Which Tag Historian data store the tag will target. A particular tag can only target one history store.

Historical Scanclass

HistoricalScanclass

The scan class to use to evaluate tag history. This allows the tag's history to be stored at a slower rate than the status is updated at.

Historical Deadband

HistoricalDeadband

A deadband that applies only to historical evaluation.

Max time between records

HistoryMaxAgeMode / HistoryMaxAge

The maximum amount of time that can pass before a new record is logged for the tag. See Max Time Between Records below.

Timestamp Source

HistoryTimestampSource

Which timestamp is used for the value of the tag. See Timestamp Source below.

Value Mode

InterpolationMode

How interpolation will be handled for the tag in querying. See Value Mode below.

Value Mode

The value mode, analog or discrete, dictates the type of value that the tag represents, and will affect how the deadband is applied to values, and how interpolation should be performed when querying. Interpolation is the method in which the Tag Historian query system generates values for a tag when the desired time does not fall directly on a sample timestamp.

Discrete

  • Storage - The deadband will be applied directly to the value. That is, a new value (V1) will only be stored when: |V1-V0| >= Deadband.

  • Interpolation - The value will not be interpolated. The value returned will be the previous known value, up until the point at which the next value was recorded.

Analog

  • Storage - The deadband is used to form a corridor along the trajectory of the value. A new value is only stored when it falls outside the previous corridor. When this occurs, the trajectory is recalculated, and a new corridor formed. See below for an example.

  • Interpolation - The value will be interpolated linearly between the last value and the next value. For example, if the value at Time0 was 1, and the value at Time2 is 3, selecting Time1 will return 2.

Max Time Between Records

Normally Tag Historian only stores records when values change. By default, an "unlimited" amount of time can pass between records – if the value doesn't change, a new row is never inserted in the database. By modifying this setting, it is possible to specify the maximum number of scan class execution cycles that can occur before a value is recorded. Setting the value to 1, for example, would cause the tag value to be inserted each execution, even if it has not changed. Given the amount of extra data in the database that this would lead to, it's important to only change this property when necessary.

Timestamp Source

When a Tag executes, there are two possible timestamps that can be observed: the time associated with the data, and the time that the tag was evaluated. The first case is generally only interesting when the value is provided by an OPC server. In most cases, the time provided by OPC, which in Ignition is referred to as the "Value" time, will be very close to the system time. Some servers, however, either due to their location or how they function (history playback, for example), will provide times that are very different than the current time.

It is generally desirable to store the System time, as it is the time that the value was actually observed by the system, and it creates a uniform timeframe for all realtime data. However, in the later case, it is necessary to store the time provided by the OPC server. Using the Value timestamp source has several consequences: the system is no longer able to validate the tag quality against the scan class' execution, and tag value interpolation will behave differently.

The validation of the scan class execution is generally not a concern when recording historical playback data. Interpolation only occurs when the value mode is Analog, and when there is not a value for every time window. Using System time, the value is only interpolated during the last "scan class execution window", that is, one scan class timeframe before the next value. Using Value time, however, the value is interpolated for the entire time between two data points.

The Deadband, and Analog Compression

As described above, the deadband value is used differently depending on whether the tag is configured as a Discrete tag, or an Analog tag. Its use with discrete values is straight forward, registered a change any time the value moves +/- the specified amount from the last stored value. With Analog tags, however, the deadband value is used more as a compression threshold, in an algorithm similar to that employed in other Historian packages. It is a modified version of the 'Sliding Window' algorithm. Its behavior may not be immediately clear, so the following images show the process in action, comparing a raw value trend to a "compressed" trend.

images/download/attachments/6034134/image2015-4-16_8_47_22.png

In this image, an analog value has been stored. The graph has been zoomed in to show detail; the value changes often and ranges over time +/- 10 points from around 1490.0. The compressed value was stored using a deadband value of 1.0, which is only about .06% of the raw value, or about 5% of the effective range. The raw value was stored using the Analog tag mode, but with a deadband of 0.0. While not exactly pertinent to the explanation of the algorithm, it is worth noting that the data size of the compressed value, in this instance, was 54% less than that of the raw value.

By looking at one specific sequence, we can see how the algorithm works:

images/download/attachments/6034134/image2015-4-16_8_49_13.png

The sequence starts with the second stored compressed value on the chart.

  1. A value is stored. No further action is taken.

  2. The next value arrives. A line is made through the value, with the size of the specified deadband value. A line is projected from the last stored value to the upper (line U1), and lower (line L1), bounds of this new value line. This establishes the initial corridor.

  3. A new value arrives. The same procedure is taken, and new lines are created. However, only lines that are more restrictive than the previous are used. In this case, that means only line U2, the new upper line.

  4. Another value arrives, causing a new lower line (L3) to be used.

  5. Finally, a value arrives that falls outside of our corridor. The last received value (value 4) is stored, and a the process is started again from that point.

Alarming Properties

Tags have the ability to define any number of alarms. Each alarm is a condition that will be evaluated when the value of the tag changes. When the condition becomes true, the alarm is said to be active. When it becomes false, the alarm is said to be clear.

Binding

Many alarm properties are bindable, which means they can be bound to other tags in the system, or expressions. For example, you might bind the enabled property to another tag which represents whether or not your process is running, thereby disabling the alarm when production is stopped. Or, you might bind the setpoint of an alarm to a tag that operators can manipulate, thereby letting the setpoint be changed at runtime.

To bind a tag, simply click on the binding icon ( ), and the binding UI will slide in from the right. From here you can select the binding type (No Binding, Tag, Expression, or UDT Parameter, if applicable). Note that the expression can reference many useful values such as the tag's value and other settings of the alarm. When you've configured the binding to your liking, click on the Back button.

Associated Data

Associated data are custom alarm properties that can be added to any alarm. These properties will often be bound to other tags that represent associated contextual data that may be related to the alarm. A snapshot of the values of these properties will be taken when the alarm becomes active. These values will be attached to the alarm event as it moves through the rest of the alarming system, meaning that the values will be available from the alarm status system, the alarm journal system, and in the alarm notification system.

Main Alarm Settings

Alarm Name

Each alarm has it's own name. For example, if the tag is representing a level, the alarm name might be High Level.

Enabled

This boolean determines whether or not the alarm will be evaluated. A disabled alarm's condition will not be evaluated, and thus will not generate any alarm events.

Priority

An alarm's priority can affect how is appears in an alarm status table, or can affect how it is escalated through a pipeline. The priorities, which can be referenced by their integer equivalent in scripts and expressions, are: Diagnostic [0], Low [1], Medium [2], High [3], Critical [4]

Timestamp Source

Chooses where the timestamp for the alarm event should come from: the system time of when the event was generated, or the timestamp of the value that tripped the event.

Display Path

This is a string value that will be used to display the alarm to operators. If this is blank, the operator will see the path to the tag instead. Please use the forward-slash character to separate hierarchy levels in this path, for example: East Area/Boilers/Boiler5

Ack Mode

Dictates how acknowledgement works for the alarm.

  • Unused - Acknowledgement will not be used for this tag, and any alarm that is generated will automatically be marked as acknowledged.

  • Auto - The alarm is acknowledged automatically when the alarm becomes cleared.

  • Manual - The alarm is never set to be acknowledged by the system, and it is up for the user to manually acknowledge alarms.

Notes

A place for any free-form documentation about the alarm that can be displayed to operators.

Ack Notes Required

If this setting is true, the operators will be unable to acknowledge this alarm without entering some notes.

Shelving Allowed

If this setting is true, the shelving feature will be unavailable for this alarm.

Alarm Mode Settings

Mode

This setting controls what condition this alarm is evaluating. The available modes are as follows:

Equal - Active when the tag's value equals the alarm's setpoint.

Not Equal - Active when the tag's value does not equal the alarm's setpoint.

Above Setpoint - Active when the tag's value is above the alarm's setpoint.

Below Setpoint - Active when the tag's value is below the alarm's setpoint.

Between Setpoints - Active when the tag's value is between the low and high setpoints. If any change is true, an event will be generated for each value change between the setpoints.

Outside Setpoints - Active when the tag's value falls outside the low and high setpoints. If any change is true, an event will be generated for each value change outside the setpoints.

Out of range - The same as Outside Setpoints, but uses the tag's Engineering High and Engineering Low as the high and low setpoints.

Bad Quality - Active if the tag value becomes a bad quality, for example, on comm loss.

Any Change - An alarm event is generated every time the tag value changes. Note that this alarm will never be "active" because each active event is paired with a matching clear event, instantly.

Bit State - This alarm mode is used to alarm when a specific bit out of an integer tag becomes high. You must specify which bit position to use, with zero being the least significant bit. The On Zero property is used to invert the logic and alarm when the bit is low.

On Condition - This free-form alarm mode is used for when you want to specify the condition using an expression or another tag. To do this, bind the "Is Active" property to an appropriate expression or tag.

Setpoint / Low Setpoint / High Setpoint

The setpoint properties are used for many alarm modes to specify in what range the alarm becomes active.

Inclusive / Low Inclusive / High Inclusive

These settings correspond to a setpoint. If true, the range will be active if the value is exactly equal to the setpoint, not only above or below it.

Deadbands and Time Delays

Deadband Mode

Absolute - The deadband setting is considered to be an absolute value.

Percent - The actual deadband is calculated as a percent of the tag's engineering unit span.

Deadband

The value for the deadband, interpreted according to the deadband mode. Note that all alarms are only evaluated after the tag's value changes, which means that the tag's own deadband will be considered first.

When the deadband positive, an active alarm condition needs to clear its setpoint(s) by the amount of the deadband for the alarm to clear. For example, suppose you had a Between Setpoints alarm with a low setpoint of 50 and a high setpoint of 70, with a deadband of 2. The alarm will go active if the value is between 50 and 70, but will only clear if the value falls below 48 or rises above 72.

Active Delay

The time, in seconds, before the alarm will be considered active after the alarm's condition becomes true. Also known as a "rising edge time deadband".

Clear Delay

The time, in seconds, before an active alarm will be considered clear after the alarm's condition becomes false. Also known as a "falling edge time deadband".

Notification Settings

Active Pipeline

The name of an alarm notification pipeline to put this alarm into when it becomes active in order to send out active alarm messages. Many alarms may share a single pipeline.

Clear Pipeline

The name of an alarm notification pipeline to put this alarm into when it becomes clear in order to send out clear messages.

Email Notification Settings

Custom Subject

A string that will be used as the subject line of an email notification message. If blank, the message settings defined on the notification block that sent the email out will be used instead.

Custom Message

A string that will be used as the body of this alarm's email notification message. If blank, the message settings defined on the notification block that sent the email out will be used instead.

Extended Configuration Settings

Modules may add additional properties to alarms. They will appear in the list as standard properties, unless the module is no longer available, in which case they'll appear as Associated Data.

Expression/SQL Properties

DBTags have the ability to use an expression or a SQL query as their value instead of an OPC item path. This can be used to select information from the database or create your own formulas to manipulate other tag values.

Expression

In expression mode, the tag can use all of the features available in the expression language. It can refer to other tags, and use operators and functions to calculate a value for the tag.

SQL Query

In this mode, the tag's value will be the result of the specified SQL query. The query can be any valid query, but should result in only one value. Note that insert and update queries can be used, and will often result in an integer value, so the tag's data type should be set accordingly.

Like SQL Query bindings in the Vision module, the queries for tags can refer to other tag values. The values of referenced tags will inserted as literal text in the query before being sent to the database.

Next ...