Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


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 <br> (Time-Series Data)</h1>

</div>



Introduction to the Historian Module

Image Added

The Historian Module enables the storage of

AnchorAboutHistorianModuleAboutHistorianModuleIntroduction the Historian moduleThe Tag Historian module provides several tools to manage, collect, and store time-series data. It offers a robust solution for storing

tag values and their corresponding timestamps in SQL databases or third-party time-series databases.

Data Logging is essential for many industrial processes, collecting and storing data in the context of its time frame. Typically, users utilize this data to create trend charts, perform data analytics, monitor performance, ensure regulatory compliance, manage operations, and control processes.

This module is designed to streamline the collection and storage of data in its time context.

The Historian Module

This module

provides an out-of-the-box solution for archiving historical data without programming requirements.

It provides users with flexibility in terms of storage options and advanced features. While you can include additional

Although custom data logging procedures can be included in your

project

solution using Scripts (.NET programming) and Datasets (SQL storage), the

Historian module's

standard configuration tools of the Historian Module can fulfill most typical data logging

requirements.It leads to improved efficiency, increased productivity, and reduced downtime, resulting in a more profitable and sustainable industrial operation

needs.

On this page:

Table of Contents
maxLevel3

 

minLevel

anchor

2

HistorianPurposeAndKeyConcepts

style

HistorianPurposeAndKeyConcepts

none


Purpose and

Key Concepts and Terms

Purpose

The Historian module ensures that essential process data is securely stored and easily accessible for analysis and decision-making. Organizations can monitor equipment performance, optimize processes, track trends, and improve efficiency by collecting and storing time-series data. The configuration of the Historian module is performed on the sections: Target Database, Historian Table, and Historian Tag.

Target Database

HistorianTag

Tags whose values are stored in a HistorianTable, including dynamic references to external data.

HistorianTables

Groups Tags for historical archiving, defining settings for storage and retention.

StorageLocation

Defines where historian The Target Database defines the database where variables will be archived or read to be used in for charts and calculations. The Target Database can be any SQL Database or, using the TagProvider Extensibility, it can also use third-party products designed to store long-term time-related values, known as time-series databases or Historian tools. The configuration of the Target Database is on the Project Explorer, at Historian → TargetDB.

Historian Table

The Historian Table is a logical organization that groups Tags for historical archiving. Each Historian Table has a definition of which Target Database the group of Tags will be archived. You can also configure other standard settings that apply to all tags in that group in the Historian Table, such as when to save new data or how long to keep the data. The configuration of the Historian Tables is on the Project Explorer, at Historian → Tables.

Historian Tag

The Historian Tag refers to any value contained in a Historian Table to be archived, whether an internal Tag or an external data reference. These variables are typically Tags defined in this platform, but you can also include dynamic references to external data using the TagProvider functionality. The configuration of Historian Tags can be found in the Project Explorer, under the section Historian → Tags.

AnchorHowHistorianWorksHowHistorianWorksHow the Historian module works


Understanding the Historian Module

Module Features

  • Embedded Canary Historian includes 100 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 HistorianTable 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 HistorianTable is associated with a StorageLocation, determining where the data will reside.
  • The Historian Module regularly samples the tag's value and writes the time-series data to the designated StorageLocation according to the settings in the Historian Table.

Configuring the Historian Module

Configuration Workflow

Historian Module Configuration Workflow

Action

Where 

In this section we present the summary on the execution of the Historian Module, including:

  • The Archiving Process
  • Events to start the archiving
Tip

For a detailed Historian execution explanation, check Arching process.

Archiving process

The module Historian process to archive data is composed of 3 steps:

Step 1. An Event starts the request to archive the value of a group of variables.

There are two types of events (Trigger or TagChange). The events that start the archiving are configured in the Historian Tables section, and the variables that are archived in response to that event are configured in the Historian Tags section.

Step 2. The Historian archives the values in the Target database.

The Target Database can be a SQL Database or a third package, like Canary, InfluxDB, configured to act as a historian.

Step 3. If Store and Forward are enabled, the data synchronization is executed.

With this option, if the Target Database is unavailable, the data is stored in a local database and sent to the target when it becomes available.

Events to start the Archiving

Trigger
The Trigger can be a Tag Value, a Tag Property, or any object from the runtime namespace (e.g., server.minute will save data every minute). When a value change in the object is detected, the archive request event is generated. Only Tags of server domains or objects residing in server-side namespaces can be used as Triggers since the Historian process runs on the Server computer. The Trigger is configured in the Historian Table. All tags and objects connected to that HistorianTable will be requested to be archived, regardless of having or not a new value.

Tag Change
The Tag Change is a checkbox on the TableHistorian configuration. When enabling the Tag Change checkbox, the Historian process will verify all tags connected to that Historian Table. When the tag has a new value, the archive request event is generated. The request to archive will be generated only for the Tag with a new value. But, according to the Historian Target Database, only the tag or all tags in the group with be archived. Further information on that is included in the next section of this page.

AnchorHistorianConfigurationsHistorianConfigurationsConfiguring the Historian module

Configuration workflow 

The typical configuration workflow for the Historian Module has the following sequence:

Historian module configuration workflowActionWhere 

Comments

Define the default TagHistorian  SQL Database

Historian

→ TargetDB

/ Storage Location

By default, TagHistorian maps to a SQLite database named and located the same as the

Project Name. Modify it as needed

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

→ TargetDB

/ Storage Location

If using Canary, a connection with the local embedded Canary Historian is already included in the new

project

solution.

Just

You can use that connection

,

or modify it

willing

to connect to an external Canary System

instead

. Learn more at Historian Storage Locations.

If necessary, add other Target Databases

Historian

→ TargetDB

/ 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 setup the  "Historian Provider" checkbox. 

.  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

Historian tables

HistorianTables. Either by typing, browsing, pasting or any of the available import methods. Learn more at Historian Tags.

Default

Target Database

By default, when a new project is created, the TagHistorian is defined to use the built-in embedded SQLite database, as defined in the Datasets module.

The Historian Target Database can be selected among the following options:

Historian Database optionsTarget Database Description SQL DatabaseAny SQL style database, defined in the object TagHistorian on Datasets → DBs.Canary HistorianEmbedded CabaryLabs engine included in the framework, or connection with external Canary systems.TagProvider Historian (InfluxDB, OSIsoft PI)Using TagProvider, connect with third-party products that can act as native, fully integrated historian repositories.In addition to current interfaces, additional products can be easily added using the driver toolkit.
Info

The SQLite database may be used for databases up to around 10GB. If the amount of tags and the save interval is expected to create more than that, it is recommended to use another SQL database for the Tag Historian or the Canary Historian, or any of the available TagProvider Historian target.

To define another SQL Database to the TagHistorian connection, refer to the Dataset module configuration.

To define other Tag Provider Historian targets, refer to the Tag Provider configuration.

Configuring Historian Tables

By default, there is one HistorianTable created using Dataset-TagHistorian SQL as the Target Database, and if Canary Historian is enabled, another HistorianTable using Canary target. 

The settings on the HistorianTable provide rules for saving the tags connected with HistorianTable. You can set a trigger that determine when tags will be saved — a time deadband that defines the minimum interval between saves, and a lifetime value that determines how long the saved tag values will be retained. According to the target database selected, some options may not be available. 

It is a good practice to store only the data that is necessary, and with the time frequency that your process requires. Using features as headbands, OnTagChange or Trigger events, you organize your storage to save what is needed, without overload the system or slowing the data recovery. 

HistorianTable configuration fields

New HistorianTables can be create with the NEW button, on Tags → Historian, or editing the table on Tags → HistorianTables.

To modify History Tables, on Tags → Historian, select the Table in the ComboBox and Config button, or editing the datagrid on Tags → HistorianTables.

Either using the Dialog view or datagrid view, the HistorianTable has the following configuration fields:

HistorianTable configuration properties

Field

Description

Target

Defines the Historian Target Database. By default, SQL or Canary, or other TagProvider Historian connections.

Info
titleHistorian Target Database

According to the Target Database selected in this field, some other fields on the configuration may be disabled

Table Name

Name of the HistorianTable object. For SQL databases, this name is also the table name inside the SQL DB. For other databases, this name is used as a logical grouping name..

Auto Create

When checked, Historian module will check if this table is already created in your SQL DB. If not, a new one will be created.

Save on Change

When checked, whenever your Tags value has changed, the event to archive the tag is generated.

Trigger

Here you can define the event that triggers the archiving of all the tags in the HistorianTable group to the database. The trigger can be any tag, or any object or property from the objects namespaces.

Info
titleFor example
When you click on "" elypses button, a window will appear listing your Tags, Objects and Properties, allowing to select which one will act as a Trigger.

Storage Location

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. Our 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.


Tip

You can use multiple Historian system with the same solution. One, already pre-defined, is the platform's built-in Historian using SQL databases. Additionally, you can use other Historian engines to solution, using the TagProviders to Historian packages, or using Script extensions.

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.

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.

TagProviders for Historians (InfluxDB, others)

The TagProviders 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.

See the list of Historian TagProvider at the page UNS TagProvider Connections.

Custom

There is a programming Interface that allows a class within the Script Module to act as the Historian repository, the call to archive and retrieved data are directly to that Script Class, and your solution has the complete freedom on customizing the responses to those requests.


Using SQLite or other SQL databases

By default, the SQLite is selected when creating new solution, but our built-in SQL Historian can work with any other SQL database.

See at Dataset Module configuration how to set a different SQL Database for the TagHistorian connection.

For other TagProvider Historian targets, please refer to the UNS TagProvider Connections 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. To Run, Pause, or Stop the Historian module directly from the platform, go to Access Runtime / Runtime Diagnostics to control the module.

Image Added


When the Solution runs, the Historian Module operates in an isolated process on the server computer.

TimeDeadband

Enter the minimum logging interval. You must define in this format HH:MM:SS:MS (Hours, minutes, seconds, milliseconds). If left with zeros, this setting is not used.

This is how long the system must wait after storing one value of a tag, before storing a new value.

This field is used in conjunction with SaveOnChange option to avoid creating too many records in the database.

Info
titleFor example
Consider that you have a 5 seconds Deadband, the Deadband count will start when your Tag value changes. When Deadband count starts, any changes in Tag value in this range will not be saved on your DB if the time dead-end has not elapsed yet.. Your Tag’s value will only be saved in DB after TimeDeadband ends. 
Tag's valueCurrent TimeWill be saved on DB?512:05:05:00Yes2012:05:07:00No2512:05:10:00Yes

Life Time

Here you can set in days how long the records will be stay on the Target Database.

Every day, if the Historian Modules find data on the HistorianTables older than the lifetime, that data is automatically deleted.

If its the value is 0 or blank, no automatic data deletion is executed.

Data is no longer automatically deleted.

Save Quality

When checked, a column in your SQL DB store the Quality property of the Tag argon with the value. The quality level defines how much reliable is the Tag value and it follows the OPC standard specification. 

Normalized

When checked, uses the Normalize table schema for SQL database, or the Standard schema otherwise.

Info
For more information on SQL database schemes refer to Archiving Process.

Value Columns Type

Select the Type for Value Columns used to store the tag values in the SQL database. This field can be edited ONLY when first creating the HistorianTable 

Options:

  • Float (4 bytes) - Default option
  • Double (8 bytes)

GetSamples Method

Name of a method defined on Script → Class to allow customization when retrieving data from this tables.

Description

Description for this HistorianTable object.

Adding Tags for Data Logging

After configuring the HistorianTables, or just keeping the predefined ones, the next step is to list the tags to be archived in connection with those HistorianTables.

  • Go to Tags → Historian.
  • Type or select tags in the TagName column, or copy and paste tags from Tags → Objects.
  • Configure any required additional fields.

  • Only the TagName and TableName fields are mandatory.

HistorianItem Configuration Properties

Field / Column

Description

TagName

Enter a tag name or click "..." to select the tag for historian archiving.

DeadBand

When using the SaveOnChange option in the HistorianTable, the DeadBand is how much the value must change (in Units) in order to the system store the value.

Deviation

This value can override the Time Deadband logging interval.

If the tag changes more than the Deviation value, the event to archive the tag is generated, even the deadband specified in TimeDeadBand has not elapsed yet. 

RateOfChange

This value can overrides the Time Deadband logging interval.

If the Rate of Change of that is higher than this value, the event to archive the tag is generated, even the deadband specified in TimeDeadBand has not elapsed yet. 

The Rate of Change of a tag, is the difference on consecutive value changes, divided by the time in seconds between the changes.

HistorianTable

Select the HistoranTable that this tag will be connected with.

AnchorWorkingWithHistorianWorkingWithHistorianWorking with the Historian

Runtime execution

When the Project runs, the Module Historian runs in an isolated process on the Server Computer. 

The main procedures executed by the module include:

  • Check Checking if a request to archive store from a HistorianTable was generated (by the Trigger or OnTagChange events).
  • Archive Archiving the Data data as needed.
  • Synchronize Synchronizing with remote archives if store and forward or redundancy is enabled.
  • Reply Replying to requests from Displays displays and Scripts scripts on querying the archived data.

Those procedures as described in detail in the Archiving Process page.

On this page, we have covered the essentials of the Historian module, which provides a comprehensive solution for managing time-related data in industrial equipment and systems. To further enhance your understanding and optimize the use of this module, we recommend exploring the following sections:

Module integration

You can learn how to seamlessly integrate the Historian module with other platform modules, such as the Security, Scripts, Displays, or Alarm module, to create a robust, cohesive, and efficient system tailored to your needs.

You can easily use the information from the historian archives in other modules, like creating TrendChart plots, or using in calculation scripts. 

The page Integration with Other Modules presents information on that integration.

Tip
See Historian modules integrations.

Advanced features and options

Dive deeper into the Historian module's advanced features and options, such as data compression, data aggregation, and custom data queries. Discover how these features can help you unlock the full potential of your data analysis and process optimization.

Tip

See Historian advanced features.

Troubleshooting and common issues

You'll be able to familiarize yourself with common problems that may arise when using the Historian module and learn effective troubleshooting techniques to resolve these problems quickly and efficiently.

Tip

Diagnostics information about the historian module execution is located in the Historian troubleshooting page.

Bestpractices and recommendations

Benefit from the knowledge of experts and experienced users by following our curated list of best practices and recommendations. These guidelines will help you ensure the successful implementation of the Historian module and maximize its impact on your industrial operations.

Tip

Please take a look at Historian's best practices and recommendations.

By exploring these sections, you will gain a deeper understanding of the Historian module's capabilities and learn how to leverage its full potential to improve your industrial processes, increase efficiency, and drive sustainable growth.


Info

For deeper and advanced understanding of the execution see Historian Advanced Topics / Archiving Process


Monitoring the Historian Module Execution

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.

Displaying TrendCharts

It is possible to display charts to analyze and compare historical and real-time data. 

That is accomplished on displays using the TrendChart Control.

Querying Data on Scripts

This enables querying and retrieving data from variables and historical tables through scripts. 

That is accomplish by using directly the methods and properties available on the Historian Runtime Attributes.  


Historian Advanced Topics

Archiving Process

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 at Archiving Process.

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. 

→ Read more about Historian Runtime Attributes.


Anchor
BestPractices
BestPractices
Best Practices and Troubleshooting

Common Issues and Solutions

Data Not Being Stored

Check the HistorianTable 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 HistorianTables, 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 Your 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:

Historian module highlights

Tip

Connectivity is the software platform key feature.

Data integration

The platform streamlines data integration from multiple sources, such as field devices, ERP systems, MES, and databases, enabling centralized collection and storage. Utilizing various communication protocols like OPC UA, Modbus, MQTT, and RESTful APIs, ensures compatibility with diverse systems. Users can configure real-time data collection to be scheduled or event-driven, defining acquisition intervals or trigger conditions as needed. This integrated approach enhances analytical capabilities across the system without needing separate historians at each layer.

Data management

A secure, reliable, and scalable data storage infrastructure handles large data volumes generated by industrial equipment and systems. This infrastructure supports popular databases like Microsoft SQL Server, Oracle, and MySQL, ensuring data integrity and security. Data management features include data redundancy, version control, and automatic backups to protect against data loss.

Data analysis

Built-in analytics tools empower users to perform in-depth data analysis. Various visualization options, such as charts, graphs, and dashboards, provide intuitive data representation. Trend analysis functions enable users to monitor process performance over time and identify irregularities. Additionally, statistical tools like standard deviation, moving average, and linear regression are available for further data evaluation.

AnchorHistorianRuntimeObjectsHistorianRuntimeObjectsThe Historian Runtime objects

The Historian namespace exposes properties and methods of the .NET objects used by the Tag Historian Module execution.

Info
For general information on namespace and object concepts, go to the section Objects and Attributes.

This section describes only some commonly used properties.

Examples of Historian Module properties 

Property

Type

Description

IsStarted

Boolean

Flag indicating if the Module Historian has started.

OpenStatusMessage

String

Message OK or error when initiating the Module.

EnableCache

Boolean

When enabled, temporary binary files are created on the server computer in order to optimize the performance of the TrendChart object requesting large amounts of data.

Examples of Tag Runtime Properties on Historian

Property

Type

Description

HasHistorian

Boolean

Flag indicating if Tag is confirmed in a Historian Table.

Historian.HistorianTable

String

HistorianTable related to this tag. Usage: Tag.Test.Historian.HistorianTable.

Historian

Object

Entry point to access the Historian Item settings connect with this tag.

Tip

See Namespaces Reference for the complete list of properties and available methods.

In this section...

Page Tree
root@self
spacesV10

...