Tag History Gateway Settings
Configuring Tag History Settings
Storing Tag History is easy to get setup quickly, but there are also some settings that can be adjusted to allow for differences in database storage space and performance needs.
Table Partitioning
Ignition has the ability to automatically break up data into different tables of fixed duration. This can help make data maintenance easier, by preventing tables from becoming too large. Tables can easily be deleted in order to prune old data, and the database is able to better optimize access to frequently retrieved rows. The built-in partitioning feature can be used with any database.
It is important to note the difference between this feature and any partitioning options that the database might provide. Most modern databases offer their own faculties for defining "partitions", offering similar and greater benefits. While Ignition cannot use these features directly, advanced users may choose to apply these features on top of what Ignition currently offers.
Data Compression
As mentioned above, Ignition does not perform any binary compression on the data. That is, values are stored directly in standard database tables. However, to reduce the number of values stored, Ignition offers two different algorithms for pre-compressing the data (trimming unnecessary values). The two modes correspond to the value mode property of the tag. The value mode (Discrete or Analog) dictates the type of value that the tag represents, affects how the deadband is applied to values, and how interpolation is performed when querying.
-
Discrete
The value uses a simple deadband and is only stored when a new value is + /- the deadband value away from the previously stored value. -
Analog
The deadband is used to form a corridor along the trajectory of the value. A new value is only stored when it falls outside the previous corridor. When this occurs, the trajectory is recalculated and a new corridor is formed.
Typically, Discrete is used for boolean or integers that represent state, and Analog is used for floats or integers that change more often (which is why you want to perform compression).
You choose and set the Value Mode on the History section of the Tag Editor window.
While advanced users can change the table according to their database to be more efficient (for example, using a compressed engine), Ignition does not perform binary compression or encrypt the data in any way. See Value Mode, in History Properties for more information about the difference between Discrete and Analog values.
Datasource History Providers
Datasource History Providers can't be created or deleted, but are instead tied to a database connection. They are automatically added when connecting to a new database and removed after the database connection is removed. It comes pre-configured to partition every month, but the provider can be edited to change it's behavior. There are two other major options to configure on the provider: pre-processed partitions and data pruning. With pre-processed partitions, the data that is stored is then summarized and then placed into another table in the database. While this takes up more space in the database, it can improve query speed by reducing the amount of data points that must be loaded. Data pruning will automatically remove old data from your system after it reaches an age that you set. It will only remove whole tables though, so if each partitioned table represents a month and the pruning system removes data that is 3 months old, it will wait until all the data in the oldest table is 3 months old before pruning it.
Datasource History ProviderProvider that gets automatically created from a database connection. |
|
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 description of the provider. |
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 |
Pre-processed partitions will use more space in the database, but can improve query speed by summarizing data, reducing the amount that must be loaded. |
Pre-processed Window Size (seconds) |
When pre-processing is turned on, the data will be summarized into blocks of this size. |
Enable Data Pruning |
Partitions with data older than a specific age are deleted. The check box is not selected/enabled by default. Important: 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. |
Enable Stale Data Detection |
If enabled, tracks scan class 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 scan class rate used to determine when values are stale. If scan class execution is not recorded within this amount of time, values will be considered bad on query. |
Remote History Provider
A Remote History Provider is a link to a historical provider on another gateway. Since it is grabbing historical tag data from another provider, its only configuration is to ensure it is pointed at the correct tag provider. 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.
Remote History ProviderProvider that links to a provider on another Gateway in the Gateway Network. |
|
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. 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 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. |
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. |
Similar Topics ...