<style> .text-span-6 { background-image: linear-gradient(99deg, rgba(170, 163, 239, .5), rgba(125, 203, 207, .5)); border-radius: 50px; padding-left: 15px; padding-right: 15px; } #title-text { display: none; } .panelgradient { background-image: linear-gradient(180deg, #d5def0, whitesmoke); border-radius: 8px; flex-direction: column; justify-content: center; align-items: center; padding: 4rem; display: flex; position: relative; } </style> <div class ="panelgradient"> <h1 style="text-align: center;">Historian <br> (Time-Series Data)</h1> </div> |
The Historian Module enables the storage of tag values and their corresponding timestamps in SQL databases or third-party time-series databases. This module is designed to streamline the collection and storage of data in its time context.
The Historian module provides an out-of-the-box solution for archiving historical data without programming requirements. Although custom data logging procedures can be included in your solution using Scripts (.NET programming) and Datasets (SQL storage), the standard configuration tools of the Historian module can fulfill most typical data logging needs.
On this page:
StorageLocationDefines where historian variables will be archived or read for charts and calculations. |
HistorianTablesGroups Tags for historical archiving, defining settings for storage and retention. |
HistorianTagTags whose values are stored in a HistorianTable, including dynamic references to external data. |
Historian Module Configuration Workflow | ||
---|---|---|
Action | Where | Comments |
Define the default TagHistorian SQL Database | Historian → Storage Location | By default, TagHistorian maps to a SQLite database named and located the same as the Solution itself, followed by the proper FileExtension. Learn more at Historian Storage Locations. |
If using Canary, modify the default target to the the Canary Historian | Historian → Storage Location | If using Canary, a connection with the local embedded Canary Historian is already included in the new solution. You can use that connection or modify it to connect to an external Canary System. Learn more at Historian Storage Locations. |
If necessary, add other Target Databases | Historian → Storage Location | If archiving or retrieving data from other Historian tools is necessary, add the connection in the Tag Providers. Mark the "Set as Historian Server" checkbox when creating the provider. Learn more at Historian Storage Locations. |
Create and Edit HistorianTables | Historian → Historian Tables | Add or modify HistorianTables, organizing how the Tags will be grouped for archiving and the Target Databases. Learn more at Historian Tables. |
Add Tags to the HistorianTables | Historian → Historian Tags | Connect Tags to the HistorianTables. Either by typing, browsing, pasting or any of the available import methods. Learn more at Historian Tags. |
When you create a new solution, the default database (Dataset.DB.TagHistorian) uses the embedded SQLite database provided in the Datasets Module. However, you can change the default option at any moment. The platform lets you choose from various Historian options, including SQL databases, Canary Historian, or any available TagProvider powered by Historian tools. For a large quantity of tags, you can create HistorianTables to organize the storage into groups. Data is saved to a SQLite database by default. You can customize this to save in any other SQL database or external storage.
The table below describes the options available.
Database Option | Description |
---|---|
SQLDatabase | You can use any SQL-style database defined in the object HistorianTag available on Datasets → DBs. |
CanaryHistorian | The platform includes an embedded Canary Labs Historian, and you can also use it with external Canary systems. Read more information on the Canary Labs page. |
External TagsHistorian (InfluxDB, others) | The External TatProviders feature allows you to seamlessly integrate with third-party products, which can act as native and fully integrated historian repositories. This feature enables you to use current interfaces or additional products, which can be incorporated using the driver toolkit. |
The SQLite database has a size limit of up to 10GB. It is recommended to use another option if the stored data exceeds this limit. You can use another SQL database for the TagHistorian, the Canary Historian, or any available External TagProvider Historian targets.
Despite the limited size, no other restrictions will prevent you from using SQLite in production.
Refer to the Dataset Module configuration to configure a different SQL Database for the TagHistorian connection.
For other TagProvider Historian targets, please refer to the UNS TagProviders Connections configuration to define and configure their use.
You can control the Historian module execution while running your solution. To Run, Pause, or Stop the Historian module directly from the platform, go to Access Runtime → Runtime Diagnostics to control the module.
When the Solution runs, the Historian Module operates in an isolated process on the server computer. The main procedures executed by the module include:
For deeper and advanced understanding of the execution see Historian Advanced Topics / Archiving Process |
When the solution is in runtime, the Historian Monitor menu provides a way to monitor real-time information related to the Historian Module operation.
→ Read more about the Historian Monitor.
It is possible to display charts to analyze and compare historical and real-time data.
That is accomplished on displays using the TrendChart Control
This enables querying and retrieving data from variables and historical tables through scripts.
it's accomplish by using directly the methods and properties available on the Historian Runtime Attributes.
The Archiving Process is the process of receiving new data from Tags and storing it in databases defined by the StorageLocation. You can define different configurations to trigger storing actions based on your needs and database restrictions.
→ Read more about the Archiving Process.
→ Read more about Historian Runtime Attributes.
The Historian module may encounter some issues in its operation. Here are some common issues and their solutions:
Check the Historian Table configuration, Trigger or TagChange settings, and Target Database. Ensure the settings are correctly set up, and the database connection is valid.
Ensure that the Historian module is started (IsStarted flag) and the archiving process is functioning correctly. Check for any error messages in the OpenStatusMessage string.
Enable the caching feature (EnableCache) to optimize performance when requesting large amounts of data.
Verify if the Store and Forward feature is enabled and configured correctly. Check the local database and target database connections.
Check the database connection settings and ensure that the database is reachable.
To ensure the smooth operation of the Historian module, follow these best practices:
Use clear and descriptive names for Historian Tables, tags, and other related objects.
Optimize data retrieval by enabling caching when working with large datasets.
Use Store and Forward to ensure data integrity in case of temporary database connection issues.
Determine how much data you want to store and for how long you want to store it. It is important to plan your data storage strategy in advance so that you can optimize the historian module for your specific requirements.
Document your historian module configuration to make it easier to manage and maintain. This includes documenting data sources, data types, sampling rates, storage options, and performance optimizations.
Protect the historian module from unauthorized access by implementing security best practices such as user authentication, access control, and data encryption.
In this section: