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.
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
Analog
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 (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: The sequence starts with the second stored compressed value on the chart.
|