Tag History Providers
The Tag Historian module uses a concept of "History Providers" as a means to keep track of different storage configurations. Each provider is responsible for maintaining its own set of tables and records.
Tables used by the Tag Historian system are described on the Ignition Database Table Reference page.
Creating a History Provider​
Most history provider types need to be manually created. New providers can be created on the Gateway:
- Go to the Config section of the Gateway Webpage and select Tags > History.
- Click the "Create new Historical Tag Provider" link
- Select the type, and click Next.
- Give the new provider a name, and make any other configuration changes
- Click Create New Historical Tag Provider button when finished.
Datasource History Providers​
Datasource History Providers can not be created or deleted manually. Instead they are tied to a database connection. They are automatically created when a connection to a database is configured on a gateway. Deleting a database connection from a gateway will also delete the Datasource History Provider, although any tables used by the provider will persist in the database.
Datasource History Providers Settings​
The following table lists the settings for the Datasource History Providers. To access these settings, go to the Config tab of the Gateway Webpage and select Tags > History. Then click the Edit button for the provider you want to update.
Main​
Property | Description |
---|---|
Provider Name | Name of the Tag History Provider. By default, this will match up with the name of the database connection. |
Enabled | If the check box is selected (enabled), the provider is turned on and accepts tag history data. If disabled, the database is not shown in the list of history providers when configuring tag history from the Designer. Also, any data logged to the provider, will error out and be quarantined by the store and forward engine, if possible. |
Description | A user created description of the provider. |
Data Partitioning​
Property | Description |
---|---|
Enable Partitioning | To improve query performance, Tag Historian can partition the data based on time. Partitions will only be queried if the query time range includes their data, thereby avoiding partitions that aren't applicable and reducing database processing. On the other hand, the system must execute a query per partition. It is therefore best to avoid both very large partitions, and partitions that are too small and fragment the data too much. When choosing a partition size, it is also useful to examine the most common time span of queries. |
Partition Length and Units | The size of each partition, the default is one month. Many systems whose primary goal is to show only recent data might use smaller values, such as a week, or even a day. |
Enabled Pre-processed Partitions | Enables pre-processed partitions. |
Pre-processed Window Size (seconds) | When pre-processed partitions is turned on, this setting defines the window size. |
Data Pruning​
Property | Description |
---|---|
Enable Data Pruning | Partitions with data older than a specific age are deleted. The check box is not selected/enabled by default. Note: Data pruning works by deleting old partitions. Therefore, data will only be removed when a partition has no data younger than the prune age. |
Prune Age and Units | The maximum age of data. As mentioned, the data is deleted by the partition, and could therefore surpass this threshold by quite a bit before all of the data in the partition is old enough to be dropped. |
Advanced​
Property | Description |
---|---|
Enable Stale Data Detection | If enabled, tracks Tag Group executions to determine the difference between unchanging values, and values that are flat due to the system not running. |
Stale Detection Multiplier | The multiplier for Tag Group rate used to determine when values are stale. If Tag Group execution is not recorded within this amount of time, values will be considered bad on query. |
Pre-Processed Partitions​
Datasource history providers can opt into "pre-processed partitions". With pre-processed partitions enabled, records stored by the provider are stored in two different sets of partitions: the normal partitions, and a summarized "pre-processed" partition. In other words, the data that is stored in the normal partitions is summarized and then placed into an additional table in the database. While this takes up more space in the database, it can improve query speeds dramatically by reducing the amount of resulting data points. While enabled, tag history queries that request data in intervals greater than the specified Pre-processed Window Size setting will use the pre-processed tables.
For example, say a system.tag.queryTagHistory call was made with intervalSeconds set to 90. If the Pre-processed Window Size setting on the datasource history provider is set to something less than 90 seconds, such as the default value of 60 seconds, then the function would retrieve records from the pre-processed partitions. On the other hand, if the same function was used with intervalSeconds set to a value less than the Pre-processed Window Size, then the raw tables would be used. Both of these examples would retrieve data from the historian, but the first query's result set would be smaller than the second example's query.
When pre-processed partitions are enabled, a new partition table is created to store the pre-processed records. The pre-processed partitions use the following naming convention: sqlth_data_driverID_YYYY_MM_windowSize
.
More details on the pre-processed tables can be found on the Ignition Database Table Reference page.
Internal Historian Provider​
The Internal Historian is a historian that stores data within the Ignition installation directory, via SQLite. It is available on standard Ignition Gateways.
Records stored by the Internal Historian Provider don't contain information about Tag group execution, meaning stale execution data is not recorded.
The Internal Historian provider can choose to prune records when either the Time Limited Enabled? or Point Limit Enabled? settings are enabled. The check to prune records in these cases occur when the system tries to store a record.
Internal Historian Provider Settings​
Main​
Property | Description |
---|---|
Provider Name | Name of the internal history provider. |
Enabled | If the check box is selected (enabled), the provider is turned on and accepts tag history data. Default is true. |
Description | A description of the provider. |
Limits (Requires Historian Module Licensing)​
Property | Description |
---|---|
Time Limited Enabled? | Whether or not time limit is enabled. Default is true. |
Time Limit Size | Size of the time limit. Unit (seconds, weeks, etc) is set in the Time Limit UnitsDefault is 1. |
Time Limit Units? | Options are milliseconds, seconds, minutes, hours, days, weeks, months, or years. Default is WEEK. |
Point Limit Enabled? | Whether or not point limit is enabled. Default is true. |
Point Limit Size | Maximum number of data points the historian will store. Default is 10,000,000. |
Sync Settings​
Property | Description |
---|---|
Remote Sync Enabled | Allows you to turn Tag History Synchronization on or off. Default is false. |
Remote Gateway Name | The Gateway to target for remote synchronization. Must have the Tag Historian module installed, and allow remote storage. The Ignition Gateway's security settings will also need to be configured to allow remote storage. |
Remote Provider Name | The remote history provider to sync data to. |
Sync Frequency | The frequency with which data will be sent to the remote Gateway. This setting will be used in conjunction with the sync schedule, if enabled. Default is 10. |
Sync Frequency Units | The unit of time that will be used with the Sync Frequency. Options are milliseconds, seconds, minutes, hours, days, weeks, months, or years. Default is SEC. |
Max Batch Size | The maximum number of data points that will be sent per batch to the remote Gateway. Default is 10,000. |
Enable Schedule | If enabled, the data will only be synchronized during the times specified by the pattern provided. Default is false. |
Schedule Pattern | A comma separated list of time ranges. Examples:
|
Remote History Provider​
A Remote History Provider is a link to a historical provider on another Gateway. Since it is retrieving historical Tag data from another provider, its only configuration is to ensure it is pointed at the correct history provider on the remote system. You can't change any of the settings like partition length and prune age, but would instead have to change those settings on the original history provider on the remote Gateway. By default, the remote history provider will fall under the Default Security Zone and be read only.
Configuring a remote history provider involves some extra steps, when compared to the other provider types. Since they involve a tag provider on another Gateway, you'll be asked to select the target gateway. The list of Gateways is filled with gateways discoverable on the gateway network. If the Gateway is not currently available or displayed, you can specify its name manually.
Remote History Provider Settings​
Main​
Property | Description |
---|---|
Provider Name | Name of the Tag History Provider. |
Enabled | If the check box is selected (enabled), the provider is turned on and accepts Tag history data. Default is true. If disabled, the database is not shown in the list of history providers when configuring Tag history from the Designer. Also, any data logged to the provider, will error out and be quarantined by the store and forward engine, if possible. |
Description | A description of the provider. |
Remote Gateway​
Property | Description |
---|---|
Remote Gateway Name | The name of the remote Gateway. |
Remote History Provider | The name of the provider on the remote Gateway. This does not have to match the provider name on the local Gateway. |
Storage​
Property | Description |
---|---|
Allow Storage | If false, the provider will only be used for querying historical data. If true, the provider will create a store and forward pipeline for sending data to a remote Gateway. Default is true. This setting also requires that Service Security on the remote system allows for storage to the specified provider. When enabled, storage for this tag in the remote system will not include execution rate (which is normally logged into the sqth_sce table by local providers). |
Max Bundle Size | The maximum number of data points that can be sent per request. This value is used in conjunction with the store and forward settings to dictate how much data is sent at once. Set to 0 for an unlimited size. |
Tag History Splitter​
Like the Remote History Provider, the Tag History Splitter Provider doesn't store history on its own, instead relying on having other providers already configured. A Splitter provider simply logs Tag History into multiple other History Providers.
When setting up a Tag to store history, selecting this provider will write the same data to both providers that it has selected. The Tag History Splitter is useful for automatically creating a backup of your data, or for reading history from two separate providers.
Tag History Splitter Provider Properties​
Below are the properties available on the Historical Tag Provider.
Main​
Property | Description |
---|---|
Provider Name | Name of the connection. |
Enabled | Enables and disables the connection. |
Description | Description of the connection. The description appears on the Historical Tag Providers page of the Gateway. |
Storage​
Property | Description |
---|---|
First Connection | Data is stored to both connections equally. However, all tag history queries (tag history bindings, system.tag.queryTagHistory calls, reporting tag historian queries, etc.) execute against the first connection, unless a limit is imposed using the settings below, or the first connection is unavailable. |
Second Connection | The second connection to store Tag history. |
Querying​
Property | Description |
---|---|
Limit First Connection Query | If enabled, only queries that are within the time frame specified below will be executed against the first connection. Queries that go further back will execute against the second connection. |
Limit Length and Units | The unit and length of the time frame limitation mentioned above. |
DB Table Historian Provider​
This provider allows the Tag Historian module to retrieve data from tables that weren't created by the module, such as tables created with Transaction Groups or third party systems.
Read more about this provider type on the DB Table Historian Provider page.
Historian Simulator​
The Historian Simulator allows the Tag Historian module to create simulated records that can be used for testing.
Read more about this provider type on the Historian Simulator page.
OPC HDA Properties​
Establishes a connection to an OPC-HDA Server to read history data that may be stored there from a third party. Ignition can not write to this type of history provider.
This type of provider can only be created if the OPC COM module is installed and the gateway is running on a Windows operating system.
Main​
Property | Description |
---|---|
Provider Name | Name of the Tag History Provider. |
Enabled | If the check box is selected (enabled), the provider is turned on and will expose historical data. |
Description | A description of the provider. |
Server​
Property | Description |
---|---|
ProgId | A description of the provider. |
Use Flat Browsing | Flat browsing returns all items at once. This is less efficient than normal browsing, but if a server only supports flat browsing, then this needs to be checked. |
Remote Connection​
Property | Description |
---|---|
Remote Server | If selected, DCOM will be used to connect to the server on the specified Host with the given ProgId or CLSID. |
Host Machine | The name or IP address of the machine hosting the server. Leave empty for local machine. |
CLSID | The CLSID of the server. If not specified, will be obtained using the ProgId. |