Skip to main content
InSource Solutions

TN HistClient135 Using Analog Statistics in Historian Client Query




This article from InSource shows a new change in the Query Type of the Historian Client Query.   This explains some of the columns listed with some added commentary.   

  • Author: Glenn Yancey
  • Published: 03/20/2017
  • Applies to: Historian Client 2014 R2 SP1



There is a query type called "Analog Statistics" that is replacing the "Analog Summary Values" query type in the Wonderware Historian Client Query.  There are some pieces worth explaining further than what is listed in the help file.   I will be using this Query Type without defining a Summary Tag in the Wonderware Historian.  I will be using a regular analog tag in the Historian for my example.  


The following are the column options:
Tag Name: The name of the tag within the Wonderware Historian server. If the data values are coming from ArchestrA, the attribute reference is shown as the tag name. For ArchestrA attributes, you can also choose to show the hierarchical name along with the attribute reference. For more information see, ArchestrA Naming Conventions.
Description: The description of the tag.
SourceTag: The source tag of the tag.
SourceServer: The source server of the tag.
StartDateTime: The start time of the retrieval cycle.
EndDateTime: The end time of the retrieval cycle.
OPCQuality: The quality value received from the data source.
PercentGood: The percentage of rows with good quality in relation to the total number of rows in the retrieval cycle.
First: First value within the retrieval cycle or the most recent value prior to the cycle.
FirstDateTime: The time stamp associated with the first value of the retrieval cycle.
Last: The last value within the retrieval cycle or the most recent value prior to the cycle.
LastDateTime: The time stamp associated with the Last value, which can be earlier than the StartDateTime if this is the initial value for the retrieval cycle.
Minimum: The minimum value that occurred within the retrieval cycle.
MinDateTime: The time stamp associated with the minimum value.
Maximum: The maximum value that occurred within the retrieval cycle.
MaxDateTime: The time stamp associated with the maximum value.
Average: The time weighted average value of the retrieval cycle.   Unfortunately in this query type, you don't have an 
Standard Deviation: The time weighted standard deviation value of the retrieval cycle. Usually represent by the Greek letter (Sigma) 
σ.   The standard deviation is also used to describe where most of the data should fall, in a relative sense, compared to the time weighted average. For example, if your data have the form of a bell-shaped curve (also known as a normal distribution), about 95% of the data lie within two standard deviations of the mean. (This result is called the empirical rule, or the 68–95–99.7% rule.).  In other words, it's just a range from the average where the data fell most.  
Integral: The area under the value curve of the retrieval cycle.  Be sure to have a well-defined Engineering Unit for your flow rate.   If it isn't defined in the Historian, you will need to add it to the Historian.   See TN_HistClient108 for more information.
ValueCount: The number of values contributing to the summary.
wwCycleCount: The number of retrieval cycles (sub-interavls) for the specified time period. For more information, see Cycle Count (X Values over Equal Time Intervals) (wwCycleCount).
wwResolution: The sampling rate, in milliseconds, for retrieving the data in cyclic mode. For more information, see "Resolution (Values Spaced Every X ms) (wwResolution).
wwTimeZone: The time zone for retrieval is specified.
wwRetrievalMode: The processing of retrieved data is specified before it is returned to the client. For more information, see Understanding Retrieval Modes.
wwVersion: The version of data to be used if the original data value is changed.For more information, see History Version (wwVersion).


My Time tab (not fully pictured here) is looking at the last 5 minutes from now.  

The above picture shows that my Integral for 5 minutes worth of data.   My flow rate was gal/m (Gallons Per Minute).  The Integral tells me that for my last 5 minutes, that 365.70 gallons flowed through with my varied flow rate.

My Minimum is 70 gal/m and Maximum is 79.998 gal/m.  This shows that my flow rate has variation of about 10 gal/m.  

My time weighted average is 73.14 gal/m, and my StdDev (Standard Deviation) tells me that within a range of 3.82 gal/m from my average is where the majority of the data is stored.