The advanced settings pertain to the variable Statistic and how the value is calculated. GE enables various methodologies to gather data from its archives, and these settings apply most of those capabilities.
1. Changing Sampling and/or Calculation Modes:
The Q11924 inteface uses dot notation in the STATISTIC field. This field can be extended to include sampling mode and calculated mode (when applicable). The format for this is: STATISTIC.SAMPLINGMODE.CALCULATIONMODE. The text entered here is not case sensitive so average.trend is the same as AVERAGE.TREND. Let's look at how we set this up. NOTE: INVENTORY and RAINGAUGE use sampling mode "RawByTime" and cannot be changed.
First, select the Statistic you want for this variable from the drop down list, for example: AVERAGE.
Second, type a dot "." after the statistic and type in the Sampling Mode (from the list below) that you want to use. If you want the Average of the Trend sampling mode, your variable Statistic would look like this: AVERAGE.Trend (as shown below)
Third, and optionally, you can define Calculation Mode if you selected Calculated for the Sampling Mode. Simply add a dot "." after the Sampling Mode and enter one of the Calculation Mode's listed below. If you want the Average of the Calculated Maximum, you would enter the following in the Statistic field: Average.Calculated.Maximum.
2. Sampling Modes:
(The following is taken directly from GE Proficy Historian Electronic Books from Proficy Historian version 3.1.0.1760)
Sampling Mode is the mode of sampling from the archive. The following is supported sampling modes, their definition, and a sample of the query using the statistic AVERAGE for example:
SAMPLING MODE |
DEFINITION |
SQL QUERY |
AVERAGE.INTERPOLATED |
Retrieves evenly spaced interpolated values based on NumberOfSamples and the time frame criteria. |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = INTERPOLATED AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.RAWBYTIME |
Retrieves raw archive values based on time frame criteria. NOTE: when selected, ROWCOUNT is set to zero (0) in order to retrieve all records for the Q11924 interface. WARNING: this sampling mode returns values for every second and will take significantly longer to process data. |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = RAWBYTIME AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND RowCount = 0 AND Quality > 0 GROUP BY Quality |
AVERAGE.RAWBYNUMBER |
Retrieves raw archive values based on the StartTime criteria, the NumberOfSamples, and Direction criteria. Note the EndTime criteria is ignored for this Sampling mode. |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = RAWBYNUMBER AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 and direction = backward AND Quality > 0 GROUP BY Quality |
AVERAGE.CALCULATED |
Retrieves evenly spaced calculated values based on NumberOfSamples, the time frame criteria, and the CalculationMode criteria. |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = AVERAGE AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.LAB |
Returns actual collected values without interpolation. |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = LAB AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND Quality > 0 GROUP BY Quality |
AVERAGE.TREND |
Returns the raw minimum and raw maximum value for each specified interval. Use the Trend sampling mode to maximize performance when retrieving data points for plotting. |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = TREND AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
3. Calculation Mode - The CalculationMode column only applies if the SamplingMode is set to Calculated. It represents the type of calculation to perform on archive data. The following is supported calculation modes:
CALCULATION MODE |
SQL QUERY |
AVERAGE.CALCULATED.AVERAGE |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = AVERAGE AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.CALCULATED.COUNT |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = COUNT AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.CALCULATED.MAXIMUM |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = MAXIMUM AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.CALCULATED.MINIMUM |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = MINIMUM AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.CALCULATED.STANDARDDEVIATION |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = STANDARDDEVIATION AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.CALCULATED.TOTAL |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = TOTAL AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.CALCULATED.RAWAVERAGE |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = RAWAVERAGE AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.CALCULATED.RAWSTANDARDDEVIATION |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = RAWSTANDARDDEVIATION AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.CALCULATED.RAWTOTAL |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = RAWTOTAL AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
AVERAGE.CALCULATED.TIMEGOOD |
select Avg(Value) as Value, Quality from ihRawData WHERE SamplingMode = CALCULATED AND CalculationMode = TIMEGOOD AND Tagname = 'FIX.COSINE_2A.F_CV' AND TimeStamp > '05/08/2008 23:59:59' AND TimeStamp < '05/10/2008 00:00:00' AND NumberOfSamples = 1440 AND Quality > 0 GROUP BY Quality |
4. Default Settings:
This interface has default settings depending on the statistic selected.
By default SAMPLINGMODE is set to LAB for all statistics except INVENTORY and RAINGAUGE which use RAWBYTIME.
If SAMPLINGMODE is set to CALCULATED, then the following rule is set by default (but can be changed):
If STATISTIC is, |
then CALCULATION MODE is |
MINIMUM.Calculated |
MINIMUM |
MAXIMUM.Calculated |
MAXIMUM |
COUNT.Calculated, CYCLE.Calculated, TIMELT.Calculated, TIMEGT.Calculated, and TIMEEQ.Calculated |
COUNT |
[ All Others ].Calculated |
AVERAGE |
This means if you only specify MINIMUM.CALCULATED then the CALCULATION MODE will be set to MINIMUM.