Tags and variables
Concept
A Tag Class (Tag) is a virtual Vtrin class used to configure the database to collect and store process data. This article introduces tags and their related functionality and shows how different tools can be used to create tags and to start collecting process history.
Tags are used to define how the data should look in the database. It defines a name and a unique ID for data structures and a data type of stored data.
Tags also define the data source. In the most common cases, it allows configuring OPC DA settings for each tag separately, such as OPC server, item IDs and update rates. In addition, it defines which data collector in the hierarchical node layout is used to collect data.
In addition, Tags also specify how data is further processed:- compressed and preprocessed before storing it in the database, and what kind of upper-level histories (secondary logs) are collected from raw history (current history). An example of upper-level histories would be averages calculated over one minute, hour, or day.
Behaviour
Important aspects from Tag:
- The only unique identifier of the Tag is the ID property (the type of ID is GUID). This makes it possible to create tags in distributed environments without name clashes.
- The creator of a Tag can propose a name for the Tag. If the proposal name is unique within the local node, it is accepted as-is. Otherwise, there is a renaming algorithm to ensure name uniqueness. The name of the Tag can be changed later on by setting a new "ProposedName". The "DisplayName" property shows the actual name after the uniqueness algorithm has been applied.
- Once a tag is deleted, the references to already stored data will be lost. Although historical data is not deleted, it is impossible to refer to and access it. Despite a new tag being created with the same property values, it is a new tag. The old history data will not be found.
- In a hierarchical node layout, it is up to "RTDB-TagConsistencyController" to propagate tag definitions between the main node and DCNs. It has to be created manually in only one node.
- Implementing class instances should never be deleted manually behind the Tag, as this breaks the Tag instance (e.g., an associated variable should not be deleted alone). Deleting a tag instance using Vtrin is acceptable, however, as it is able to clean the associated instances and references.
- All tag instances are independent of each other.
Relations between classes
| Concept | Description |
|---|---|
| Tag | Tag is an interface class for configuring data collection and historization. When database is configured creating a tag is the only thing needed. Instances that implement the functionality (classes, Variable, CurrentValue, Path...) are created or used automatically. |
| Variable | Defines what is the type of data and how it can be characterized. As well it defines how incoming data is processed, e.g., compression settings and preprocessing. |
| CurrentValue | Stores the most recent incoming data values. A starting point for the historization process. |
| Path | Provides hierarchical structure for tag and variable instances (browsing). |
| HistoryCollectionTemplate | Resolves for internal data structures. |
| TransformationEngineering | Defines the chain how historical data is further processed to upper level histories (secondary logs like AVG1minute). |
| DataBaseNode | Links tag to hierarchical node layout. Defines what data collector node is used to collect and buffer the incoming data. |
The Tag class is used to populate data collection in single node systems, but there is built-in support to easily configure all nodes in a hierarchical system layout as well. Figure below illustrates how "RTDB-TagConsistencyController" handles the configuration in a hierarchical node layout.
Each tag can be either redundant or non-redundant. A single data collector can contain both redundant and non-redundant tags.
The complete definitions of all the properties in the Tag class are presented in the table below.
Property | Description |
|---|---|
Proposed Name | This is a mandatory field to create an entry in to the list |
DA Type | This specifies Protocol and Client which will be used to collect data. |
DA Path | Based on the DA types Both the ProgId and CLSID of the OPC server should be given to prevent the usage of remote OPC registry browsing or usage of OPC enum component. If the OPC server is locally connected, <host> and <clsid> can be dropped, e.g. OPCUA: MODBUS: |
DA Frequency | Data collection frequency in millisecond (default is 1000ms) |
Activity | Active (Default is Inactive) |
DataFlowDirection | Option [in] means RTDB-OPCClient reads data from OPC Server, then write them to RTDB; |
For the Tags where redundant data collection is supported the properties to consider are listed on the table below.
Property | Description |
|---|---|
ConsistencyControlled | The Tag is under tag consistency control only if this has been set to true. The default is false. |
CollectorNode | Defines the collector node for this tag. Refers to the DataBaseNode instance that defines all nodes available in the system. |
RedundantDataCollection | Defines whether the redundant data collection is done for this Tag. Default is false. |
CollectorNodeRedundant | If the RedundantDataCollection is defined to be true, this should be set to refer to the node that does this redundant data collection. |
DaTypeRedundant | In the redundant collector node, this DaType setting is used. |
DaPathRedundant | Based on the DA types Both the ProgId and CLSID of the OPC server should be given to prevent the usage of remote OPC registry browsing or usage of OPC enum component. If the OPC server is locally connected, <host> and <clsid> can be dropped, e.g. OPCUA: MODBUS: |
Variable
A variable is a named location where you can store a single value in the RTDB database. When creating a new variable, a user defines the variable value type, its maximum and minimum value etc and can connect the newly created variable to a data source.
In ABB Ability™ History, every variable has a CurrentValue property (among many other properties). The value of that CurrentValue property is updated at intervals and can be plotted into a trend chart. Often, the source of the value is devices or sensors that produce data continuously and are connected to ABB Ability™ History RTDB database using the OPC DA protocol.
However, a variable has its limitations because it is a flat list of historized values and the preferred way to store historized value in industrial settings is in a hierarchical way.
Further reading
Tutorials for creating tags
We have created a separate tutorials for creating tags using our Engineering UI, using Excel Bulk Load tool, using 800xA interface and fine tuning tags using variables. Find the tutorial under our How-to guides here.
Useful articles
- Tag Consistency Controller (TCC) is a component in ABB Ability™ History that controls the transferring of tags' definitions between nodes in a hierarchical system. See further information under Hierarchical Systems using Tags article.
- Redundant data production article: ABB Ability™ History is frequently used in redundant configurations for achieving high availability. When looking for a high-availability solution against any single point of failure, data production is typically made redundant. The article discusses the various combinations of data production of a single and redundant History node.
Updated 5 months ago
