HTML |
---|
<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 and Time Series Data</h1>
</div> |
Introduction to Historian Module
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 it is possible to include 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:
Table of Contents | ||||
---|---|---|---|---|
|
Key Concepts
Storage Location
The Storage Location defines in whichand Terms
Panel | ||
---|---|---|
| ||
StorageLocationThe StorageLocation defines where database variables will be stored or read |
for use in charts and calculations. You can use any SQL Database. |
For integration with third-party products designed to store long-term time-related values, known as time-series databases or Historian tools, you need to use the |
TagProvider. |
Historian Tables
Historian Tables groupPanel | ||
---|---|---|
| ||
HistorianTablesHistorianTables groups Tags for historical archiving. Using the Historian Table, you can define the Tags to be stored |
in each Target Database. |
Additionally, you can configure |
standard settings |
for all tags in |
a group, such as when to save new data |
and how long to keep |
it in the database. |
Panel | ||
---|---|---|
| ||
HistorianTag |
A |
HistorianTag refers to any internal or external Tag whose values are stored |
in a |
HistorianTable. In addition to Tags from the platform, you can include dynamic references to external data using the |
TagProvider function. |
Understanding the Historian Module
Module Highlights
- Embedded Canary Historian includes 500 free Canary Historian Tags with any license.
- The Historian Module works with the industry's major players (OSISoftPI, InfluxDB).
- Store and Forward function ensures your data will not be lost if the database is unavailable.
- Universal Time and Daylight Saving
Technical Overview
- You can define a
- Tag
- representing
- any data point you want to track over time.
- You can then add this
- Tag
- to a
- Historian Table
- and configure settings like:
- How often to sample and store
- data (e.g., every second, every minute)
- Conditions to store the data (e.g., only when the value changes)
- Data retention policies (e.g., keep data for 1 year)
- The
- Historian Table
- is associated with a
- Storage Location, determining where the data will
- reside.
- The historian module regularly samples the tag's value and
- writes the time-series data to the designated Storage Location according to the settings in the Historian Table.
Feature Highlights
- Embedded Canary Historian includes 500 free Canary Historian Tags with any license – Edge to Unlimited.
- The Historian Module works with the industry's major players (OSISoftPI, InfluxDB, and more).
- Store and Forward function ensures your data will not be lost if the database is unavailable.
- Universal Time and Daylight Saving
Children Display
style h4 excerptType rich content
Configuring the Historian Module
To configure the Historian Module is necessary to add tags to HistorianTags. For higher quantity of tags, you can create HistorianTables to organize the storage of the variables into groups. Bt default we save the date to a SQLite database - you can customize to save in any other SQL database or external storage.
The complete configuration workflow for a more generic application is:
Historian Module configuration workflow | ||
---|---|---|
Action | Where |
Configuring the Historian module
Configuration Workflow
The typical configuration workflow for the Historian Module has the following sequence:
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 equal the same as the Solution itself, followed by the proper FileExtension. You're able to change it as needed. Learn more at 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. Just You can use that connection , or modify it willing to connect to an external Canary System instead. Learn more at Storage Locations. |
If necessary, add other Target Databases | Historian → Storage Location | If archiving or retrieving data from other Historian tools is necessary, such as InfluxDB or OSIsoft PI, add the connection in the Tag Providers, making sure to mark . Mark the "Set as Historian Server" checkbox when creating the provider. Learn more at 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 Historian tables. Either by typing, browsing, pasting or any of the available import methods. Learn more at Historian Tags. |
Default Storage Location
When you create a new solution with the platform, the default database (Tag Historian) uses , by default, 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 External Tags Historian.
The table below describes the options available.
Database Option | Description |
---|---|
SQL Database | You can use any SQL-style database defined in the object Tag HistorianHistorianTag available on Datasets → DBs. |
Canary Historian | 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 Tags Historian (InfluxDB, OSIsoft PI) | The External Tags 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. |
When to use the SQLite database
The SQLite database is suitable for databases with 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 Tag Historian, the Canary Historian, or any available External Tags Historian targets.
Despite the limited size, no other restrictions prevent you from using SQLite in a production application.
Refer to the Dataset Module configuration to configure a different SQL Database for the Tag Historian connection.
For other External Tags Historian targets, please refer to the External Tags configuration to define and configure their use.
Working with the Historian Module
Runtime Execution
You can control the Historian module execution while running your solution. You can can Run, Pause, or or Stop the Historian module directly from the from the platform. Access Go to Access Runtime → Runtime Diagnostics to to find the three buttons that you can use tools used to control the module.
When the Solution runs, the Historian Module Historian runs operates in an isolated process on the Server Computer. The main procedures executed by the module include:
- Check Checking if a request to store from a HistorianTable Historian Table was generated (by the Trigger or OnTagChange events).
- Archive Archiving the Data as needed.
- Synchronize Synchronizing with remote archives if store and forward or redundancy is enabled.
- Reply Replying to requests from Displays and Scripts on querying the archived data.
Those procedures as described in detail in the Storage Archiving Process page page.
Monitoring Historian
When the solution is in runtime, the Historian Monitor menu provides a way to monitor real-time information related to the Historian Module operation.
You can read more information an see a list of properties on the Historian Monitor page.
Intra-Module interaction
Displaying TrendCharts
It is possible to display Trend Charts to analyze and compare historical and real-time data. This functionality makes it easy to identify patterns and trends in system performance.
For more information, see the the Displaying Trend Charts or Examples page.
Unified Namespace Module
The Historian Module creates creates a time-series archive of tag values , by storing them and their corresponding timestamps in SQL or third-party time-series databases.
Querying Data on Scripts
It This enables the querying and retrieving of data from variables and historical tables through scripts. This functionality empowers the creation of custom logic and solution-specific analysis.
For a comprehensive understanding, refer to the Querying Data on Scripts.
Wrong link, note to myself: find and fix!
External System Interaction
Trough the Datasets Module, the Historian module can integrate with external databases to create a time-series archive. The following is a list of possible databases you can connect:
- SQL Server
- PostgreSQL
- Excel
Read more information on the Dataset DBs page and its sub-pages.
Advanced Historian Topics
StorageArchiving Process
The Storage Archiving Process is the process of receiving new data from Tags and storing it in databases defined by the Storage LocationStorageLocation. You can define different configurations to trigger storing actions based on your needs and database restrictions. Access the Storage Archiving Process for further information about the process and configurations available.
Historian Runtime Attributes
The Historian Namespace exposes properties and methods from the .NET objects used by the Historian Module execution. You can use these properties and methods on your Displays or to create Scripts and Alarms. The Historian Runtime Attributes page lists all options available.
Troubleshooting and Best Practices
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Troubleshooting and Common #Issues
The Historian module may encounter some issues in its operation. Here are some common issues and their solutions:
#Data not being stored
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.
#Incomplete data
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.
#Slow data retrieval
Enable the caching feature (EnableCache) to optimize performance when requesting large amounts of data.
#Store and Forward not working
Verify if the Store and Forward feature is enabled and configured correctly. Check the local database and target database connections.
#Database connection error
Check the database connection settings and ensure that the database is reachable.
Best Practices and #Recommendations
To ensure the smooth operation of the Historian module, follow these best practices:
#Use descriptive names for Historian objects
Use clear and descriptive names for Historian Tables, tags, and other related objects.
#Optimize data retrieval
Optimize data retrieval by enabling caching when working with large datasets.
#Ensure data integrity with Store and Forward
Use Store and Forward to ensure data integrity in case of temporary database connection issues.
#Plan your data storage strategy
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 yours historians configurations
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.
#Use security best practices
Protect the historian module from unauthorized access by implementing security best practices such as user authentication, access control, and data encryption.
In this section:
Page Tree | ||||
---|---|---|---|---|
|
...