Top  | Previous | Next

History Properties

The properties on the History tab detail if and how the tag's history will be stored in the Tag Historian system.

 

Property

Binding Name

Description

Store History

HistoryEnabled

Whether the tag will report its history to the Tag Historian system.

History Provider

PrimaryHistoryProvider

Which Tag Historian data store the tag will target. A particular tag can only target one history store.

Historical Scan Class

HistoricalScanclass

The scan class to use to evaluate tag history. This allows the tag's history to be stored at a slower rate than the status is updated at. If set to evaluate on change, history will be evaluated each time the tag's value is updated.

Historical Deadband

HistoricalDeadband

A deadband that applies only to historical evaluation.

Historical Deadband Mode

HistoricalDeadbandMode

Determines how the deadband value is interpreted. If "percent", it will interpret the deadband (0-100) as a percentage of the tag's engineering limit range, which is defined in the Metadata category of the tag.

Value Mode

InterpolationMode

How interpolation will be handled for the tag in querying. See below for more information.

Max Time Between Records

HistoryMaxAgeMode / HistoryMaxAge

The maximum amount of time that can pass before a new record is logged for the tag.

Timestamp Source

HistoryTimestampSource

Which timestamp is used for the value of the tag.

 

Value Mode

The value mode, analog or discrete, dictates the type of value that the tag represents, and will affect how the deadband is applied to values, and how interpolation should be performed when querying. Interpolation is the method in which the Tag Historian query system generates values for a tag when the desired time does not fall directly on a sample timestamp.

 

Discrete

Storage - The deadband will be applied directly to the value. That is, a new value (V1) will only be stored when: |V1-V0| >= Deadband.
Interpolation - The value will not be interpolated. The value returned will be the previous known value, up until the point at which the next value was recorded.

Analog

Storage - 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 formed. See below for an example.
Interpolation - The value will be interpolated linearly between the last value and the next value. For example, if the value at Time0 was 1, and the value at Time2 is 3, selecting Time1 will return 2.

Max Time Between Records

Normally the Tag Historian only stores records when values change. By default, an "unlimited" amount of time can pass between records- if the value doesn't change, a new row is never inserted in the database. By modifying this setting, it is possible to specify the maximum number of time or scan class execution cycles that can occur before a value is recorded. If the value is set to "execution" mode, the execution count is that of the historical scan class. Since this setting generally leads to more data being stored in the database, it is important to only change this property when necessary.

 

Timestamp Source

When a tag executes, there are two possible timestamps that can be observed: the time associated with the data, and the time that the tag was evaluated. The first case is generally only interesting when the value is provided by an OPC server. In most cases, the time provided by OPC, which in Ignition is referred to as the "Value" time, will be very close to the system time. Some servers, however, either due to their location or how they function (history playback, for example), will provide times that are very different than the current time.

 

It is generally desirable to store the System time, as it is the time that the value was actually observed by the system, and it creates a uniform timeframe for all realtime data. However, in the later case described above, it is necessary to store the time provided by the OPC server. Using the Value timestamp source has several consequences: the system is no longer able to validate the tag quality against the scan class' execution, and tag value interpolation will behave differently.

 

The validation of the scan class execution is generally not a concern when recording historical playback data. Interpolation only occurs when the value mode is Analog, and when there is not a value for every time window. Using System time, the value is only interpolated during the last "scan class execution window", that is, one scan class timeframe before the next value. Using Value time, however, the value is interpolated for the entire time between two data points.

 

The Deadband, and Analog Compression

As described above, the deadband value is used differently depending on whether the tag is configured as a Discrete tag, or an Analog tag. Its use with discrete values is straight forward, registered a change any time the value moves +/- the specified amount from the last stored value. With Analog tags, however, the deadband value is used more as a compression threshold, in an algorithm similar to that employed in other Historian packages. Its behavior may not be immediately clear, so the following images show the process in action, comparing a raw value trend to a "compressed" trend.

 

raw_vs_compress_details

Raw (blue) vs. Compressed (red) Data

 

In this image, an analog value has been stored. The graph has been zoomed in to show detail; the value changes often and ranges over time +/- 10 points from around 1490.0. The compressed value was stored using a deadband value of 1.0, which is only about .06% of the raw value, or about 5% of the effective range. The raw value was stored using the Analog tag mode, but with a deadband of 0.0. While not exactly pertinent to the explanation of the algorithm, it is worth noting that the data size of the compressed value, in this instance, was 54% less than that of the raw value.

 

By looking at one specific sequence, we can see how the algorithm works:

raw_vs_compress_details_explained

The sequence starts with the second stored compressed value on the chart.

1.A value is stored. No further action is taken.
2.The next value arrives. A line is made through the value, with the size of the specified deadband value. A line is projected from the last stored value to the upper (line U1), and lower (line L1), bounds of this new value line. This establishes the initial corridor.
3.A new value arrives. The same procedure is taken, and new lines are created. However, only lines that are more restrictive than the previous are used. In this case, that means only line U2, the new upper line.
4.Another value arrives, causing a new lower line (L3) to be used.
5.Finally, a value arrives that falls outside of our corridor. The last received value (value 4) is stored, and a the process is started again from that point.