Tag Historian in Ignition

Tag Historian™ makes it easier that ever to store and use historical data. Simply by selecting a check box on a tag, historical data is stored in an efficient format in your SQL database. This data is then available for querying through scripting, historical bindings, and reporting. The available options for partitioning and deleting old data help to ensure the system stays properly maintained with minimal extra work. Also, you can drag-and-drop tags directly onto an Easy Chart to create trends or onto a table to display historical values. Tags Historian's robust querying features provide you great flexibility in how you retrieve the stored data.

You must first install the Tag Historian module so that the standard Tag Historian features are added to Ignition and the Historian Providers show up in the Historian Configuration section of the Gateway.

The various aspects of how Tag Historian stores and queries data are described next.

Historian Providers

The settings for the Tag Historian providers are in the Gateway under Tags > History. Historian providers are automatically created and removed according to the configured database connections. By default, they are created with a one month partition size, and will not delete old data.

Tag Configuration and Historical Value Generation

The first step to storing historical data is to configure tags to report values. This is done from the History page in the Tag Editor in the Designer. The properties include a historical scan class, that will be used to check for new values. Once values surpass the specified deadband, they are reported to the history system, which then places them in the proper store and forward engine.

Data storage

As mentioned, the historical tag values pass through the store and forward engine before ultimately being stored in the database connection associated with the historian provider. The data is stored according to its datatype directly to a table in the SQL database, with its quality and a millisecond resolution timestamp. The data is only stored on-change, according to the value mode and deadband settings on each tag, thereby avoiding duplicate and unnecessary data storage. The storage of scan class execution statistics ensures the integrity of the data. While advanced users may change the table according to their database to be more efficient (for example, using a compressed engine), Ignition does not perform binary compression or encrypt the data in any way.

Table Partitioning

Ignition has the ability to automatically break up data into different tables of fixed duration. This can help make data maintenance easier, by preventing tables from becoming too large. Tables can easily be deleted in order to prune old data, and the database is able to better optimize access to frequently retrieved rows. The built-in partitioning feature can be used with any database.

It is important to note the difference between this feature and any partitioning options that the database might provide. Most modern databases offer their own faculties for defining "partitions", offering similar and greater benefits. While Ignition cannot use these features directly, advanced users may choose to apply these features on top of what Ignition currently offers.

Data Compression

As mentioned above, Ignition does not perform any binary compression on the data. That is, values are stored directly in standard database tables. However, to reduce the number of values stored, Ignition offers two different algorithms for pre-compressing the data (trimming unnecessary values). The two modes correspond to the value mode property of the tag: Discrete, and Analog.

  • Discrete
    The value uses a simple deadband, and is only stored when a new value is +/- the deadband value away from the previously stored value.

  • Analog
    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 Value Mode, in History Properties for more information about the difference between Discrete and Analog values.

Querying

While the data is stored openly in the database, the format does not lend itself well to direct querying. Instead, Ignition offers a range of querying options that are very powerful and flexible. In addition to the simple on-change querying, the system can perform advanced functions such as querying many tags from multiple providers, calculating their quality, interpolating their values, and coordinating their timestamps to provide fixed resolution returns.

Querying can be performed on tables and charts through the Historical Binding, and through scripting.

In this section ...