Historical Functions
Historical functions retrieve and analyze historical data for a specified variable and time range. Because these functions access historical storage, they can take longer to execute than non-historical functions.
Function Reference:
|
Function |
Name |
Description |
Format |
Returned Value |
|---|---|---|---|---|
|
tagfind |
Find Timestamp |
Returns the first timestamp matching the specified criteria. |
|
DateTime |
|
tagfindstate |
Find Timestamp for State |
Returns the first timestamp matching a specified Boolean state. |
|
DateTime |
|
Average |
Returns the average value. |
|
DataValue |
|
|
tagtavg |
Time Weighted Average |
Returns the time-weighted average value. |
|
DataValue |
|
tagtotalize |
Totalize |
Returns the totalized value. |
|
DataValue |
|
tagtotal |
Total |
Returns the sum of values. |
|
DataValue |
|
tagmin |
Minimum |
Returns the minimum value. |
|
DataValue |
|
tagmax |
Maximum |
Returns the maximum value. |
|
DataValue |
|
tagdelta |
Delta |
Returns the difference between the first and last good values. |
|
DataValue |
|
tagrange |
Range |
Returns the difference between the maximum and minimum values. |
|
DataValue |
|
tagcount |
Samples Count |
Returns the number of samples. |
|
DataValue |
|
tagtimestate0 |
Time Duration in State 0 |
Returns the duration spent in state 0. |
|
DataValue |
|
tagtimestate1 |
Time Duration in State 1 |
Returns the duration spent in a nonzero state. |
|
DataValue |
|
tagntrans |
Number of Transitions |
Returns the number of state transitions. |
|
DataValue |
|
tagpctgood |
Percent Good |
Returns the percentage of time with good quality. |
|
DataValue |
|
tagpctbad |
Percent Bad |
Returns the percentage of time with bad quality. |
|
DataValue |
|
tagtimegood |
Good Quality Duration |
Returns the duration with good quality. |
|
DataValue |
|
tagtimebad |
Bad Quality Duration |
Returns the duration with bad quality. |
|
DataValue |
|
tagworstqual |
Worst Quality |
Returns the worst quality value. |
|
DataValue |
|
Value-Based Time Duration |
Returns the time values match specified criteria. |
|
DataValue |
|
|
tagstddev |
Standard Deviation (N−1) |
Returns standard deviation using Bessel's correction. |
|
DataValue |
|
tagstddev2 |
Standard Deviation (N) |
Returns standard deviation using N. |
|
DataValue |
|
tagvariance |
Variance (N−1) |
Returns variance using Bessel's correction. |
|
DataValue |
|
tagvariance2 |
Variance (N) |
Returns variance using N. |
|
DataValue |