Versions Compared

Key

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

Overview

The Historian module implements data storage based on classical table systems. Although an SQLite database is integrated into FrameworkX, the module is also compatible with various other types of databases.

In order to streamline the table creation process across different database types, it is feasible to define generic characteristics. These characteristics will subsequently be employed for table creation in the selected database, designated as ArchiveLocation. This procedure can also be independently conducted directly within the Database Management System (DBMS) in use. The introduction of this abstraction layer enables users to customize settings such as table name, data type, data lifespan, and so forth. This not only facilitates the automatic creation of the table but also provides numerous advantages from the perspective of potential database architectural migrations.

On this page:

Table of Contents
maxLevel3


Understanding Historian Tables

Historian Tables encompass the organization of tags read from Historian archives, arranging them systematically into Logical tables. These tables play a defining role by specifying the Target Archive database and settings, dictating when and how a specific group of tags is archived.

Definition

Historian Tables constitute a structured organization of tags from Historian archives, logically arranged into tables with defined settings for archiving within a specified Target Archive database.

Purpose

Provide user convenience with a configuration interface that encompasses all databases supported by the software.

Function

Automate the process of creating Historian tables in the database and define how and when groups of tags and properties will have their values recorded.

Operation

In operation, Historian Tables define the criteria for archiving, including the Target Archive database and specific settings, establishing a comprehensive framework for the storage and retrieval of tagged data.

Application

Historian Tables find application in the structured organization and storage of tagged data within the Historian system, notably by defining the parameters for archiving in the Target Archive database.

Usage

To use Historian Tables, users configure settings within the Historian system, specifying the Target Archive database and defining criteria for when and how the associated group of tags should be archived. This feature streamlines data management and retrieval within the Historian system, optimizing efficiency. 


Historian Tables Configuration

A historian table delineates some characteristics regarding how data will be written to its target, standardizing requirements for different types of databases. In practice, the software incorporates distinct implementations for various databases, aiming to accomplish identical tasks. However, for the user, the interface remains consistent irrespective of the chosen target.

By default, there is a table automatically created with the project, this table name is "Table1" and your ArchiveLocation is SQLite.

Properties

The Historian module creates a default HistorianTable using Dataset-TagHistorian SQL as the Target Database, with an additional HistorianTable being created if the Canary Historian is enabled. This setup offers a range of flexible options to choose from when selecting and configuring the target database for your solution's specific needs.

The HistorianTable settings allow you to define rules for saving the tags connected with it. You can set triggers such as a time deadband, specifying the minimum interval between saves, and a lifetime value, determining how long saved tag values will be retained. Note that certain options may be unavailable depending on the target database selected, so it's important to carefully consider your options.

Storing only the necessary data at the required frequency is a good practice to follow. You can use features such as deadbands, OnTagChange or Trigger events to organize your storage and save only what's required without overloading the system or slowing down data recovery.

HistorianTable configuration fields

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

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

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

PropertyDescriptionNameChose a name for the table, the name is chosen by the user, respecting the naming rules.ArchiveLocationThe Target DB's name. For more information, see the Database configuration section.AutoCreateIf true, when run a project with a HistorianTable properly configured, the table will be created automatically into de TargetDB.SaveOnChangeSelect to store data in the table (add a row) every time a tag changes that is associated with the table.TimeDeadBandEnter the minimum logging interval.

HistorianTable configuration properties

Field

Description

TargetDB

Defines the Historian TargetDB. By default, SQL. Can only be changed while creating the HistorianTable.

According to the Target option, 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.

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

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

the

one value of a tag

and

, before storing a new value.

Use with the Save on Change

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

LifeTimeNumber of days to retain the historian data. After that time, the older rows are automatically deleted from the database. To never delete data, leave this field blank or enter 0 (zero).SaveQualityEnable or disable the quality of the tag to be stored on the historian tableValueTypeTriggerUse to store data in the table every time a tag or tag property changes. With the Save on Change option, the system stores data in the table when either the tag value changes or the trigger value changes.NormalizedEnable or disable to configure the schema to be used on the historian tableLevelCategoryLockStateLockOwwnerDateCreatedDate the object was created.DateModifiedDate of last editing of the object.DescriptionBrief description of the historian table

Historian Tables Creation

To create a new table for the historian, follow the steps bellow.

1 - Go to Historian → Historian Table.

From here, the user needs to choose between the two ways, or fill the first line on the grid with the desired parameters or click on Add "+" button on grid top and a new popup window will appear

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:00Yes
2012:05:07:00No
2512: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. 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

, only fill out the form

.



In this section...

Page Tree
root@parent
spacesV10