Definitions

Aggregation
Sampling Type
Description
Average
Retrieve the average data over the resample interval.
The Average sampling type is an aggregation sampling technique that adds up the values of all good raw data within each defined Sampling Interval, and divides the sum by the number of good values.
If one or more non-good raw values are also found within a Sampling Interval, the quality of the average aggregate for that Sampling Interval will be returned as "Uncertain".
Cumulative Total
The CumulativeTotal sampling type is an aggregation sampling technique that returns the cumulative total of all good raw values within each defined Sampling interval. This is useful when used with a counter, for when the counter resets to zero, the cumulative total will not be zero'ed out but continue counting up from the point of the reset.
If one or more non-good raw values are also found within a Sampling interval, the quality of the cumulative total aggregate for that Sampling interval will be returned as "Uncertain".
Count
Retrieve the number of raw values over the resample interval.
The Count sampling type is an aggregation sampling technique that returns the number of good raw values within each defined Sampling Interval.
If one or more non-good raw values are also found within a Sampling Interval, the quality of the count aggregate for that Sampling Interval will be returned as "Uncertain".
Delta
Retrieve the difference between the first and last value in the resample interval.
The Delta sampling type is an aggregation sampling technique that retrieves the difference between the earliest and latest good raw values within each defined Sampling Interval. If the last value is less than the first value, the result will be negative. If the last value is the same as the first value, the result will be zero. If the last value is greater than the first value, the result will be positive. If any non-good values exist earlier or later than the earliest and latest good values, respectively, the quality of the aggregate for that Sampling Interval will be returned as "Uncertain".
DurationBad
Retrieve the duration (in seconds) of time in the interval during which the data is bad.
The DurationBad sampling type is an aggregation sampling technique that retrieves the total time (in 100-nanosecond units) during which the Quality of the raw values is Bad within each defined Sampling Interval. This aggregate only considers truly Bad values; Uncertain values are not considered bad for purposes of calculating this aggregate. Duration Bad is not simply the interval minus duration good, since the interval may contain Uncertain data. If no initial bounding value exists, the quality is assumed to be bad at the start of the interval, until the first non-bad value is encountered.
DurationGood
Retrieve the duration (in seconds) of time in the interval during which the data is good.
The DurationGood sampling type is an aggregation sampling technique that retrieves the total time (in 100-nanosecond units) during which the Quality of the raw values is Good within each defined Sampling Interval. This aggregate only considers truly Good values; Uncertain values are not considered good for purposes of calculating this aggregate. If no initial bounding value exists, the quality is assumed to be bad at the start of the interval, until the first Good value is encountered.
End
Retrieve the value at the end of the resample interval. The time stamp is the time stamp of the end of the interval.
The End sampling type is an aggregation sampling technique that retrieves the last raw value within each defined Sampling Interval, and returns it with the timestamp at which that value occurs.
If the value is non-good, the quality of the aggregate for that Sampling Interval will be returned as "Uncertain".
Interpolative
Retrieve an interpolative value over the resample interval.
The Interpolative sampling type returns an interpolated value for each defined Sampling Interval boundary. The type of interpolation performed will be dependent on the data provider, but will be either SampleAndHold or Linear Interpolation. The default interpolation type for the Incuity server is SampleAndHold, which returns the last raw value prior to each defined Sampling Interval boundary.
Linear
Take all values that came back in the time interval, draw a straight line through the data, and return the data value in the middle of the line.
The Linear sampling type is an interpolative sampling technique that returns the good raw value (if available) at each defined Sampling Interval boundary;  or, if no good raw value is available at the boundary, the calculated linear straight-line interpolation between the nearest good raw values preceding and following the boundary. The formula utilized in this case is: BoundaryVALUE = (((BoundaryTIME - PreceedingTIME) /  (FollowingTIME - PreceedingTIME)) X (FollowingVALUE - PreceedingVALUE)) + PreceedingVALUE.
Maximum
Retrieve the maximum value in the resample interval.
The Maximum sampling type is an aggregation sampling technique that retrieves the maximum good raw value within each defined Sampling Interval, and returns that value with the timestamp of the start of the interval.  If the same maximum exists at more than one timestamp, the oldest one is retrieved. If a non-good raw value within a Sampling Interval is higher than the good maximum,  the quality of the aggregate for that Sampling Interval will be returned as "Uncertain".
MaximumActualTime
Retrieve the maximum value in the resample interval and the timestamp of the maximum value.
The MaximumActualTime sampling type is an aggregation sampling technique that retrieves the maximum good raw value within each defined Sampling Interval, and returns that value with the timestamp at which the value occurs.  If the same maximum exists at more than one timestamp, the oldest one is retrieved. If a non-good raw value within a Sampling Interval is higher than the good maximum,  the quality of the aggregate for that Sampling Interval will be returned as "Uncertain".
MaximumSampleAndHold
The MaxSampleAndHold sampling type is an aggregation sampling technique that retrieves the maximum good raw value within each defined Sampling Interval, and returns that value with the timestamp of the start of the interval. If the same maximum exists at more than one timestamp, the oldest one is retrieved. If a non-good raw value within a Sampling Interval is greater than the good maximum,  the quality of the aggregate for that Sampling Interval will be returned as Uncertain.
This sampling type differs from the Maximum sampling type in that it utilizes SampleAndHold interpolation to determine the beginning held value at the start of each interval. (This held value is the last good raw value occuring on or before the starting time of that interval).  This beginning held value is also considered to be within the interval, and is therefore taken into consideration as a possible maximum. It will be the maximum when no other values are present in the interval.
Minimum
Retrieve the minimum value in the resample interval.
The Minimum sampling type is an aggregation sampling technique that retrieves the minimum good raw value within each defined Sampling Interval, and returns that value with the timestamp of the start of the interval.  If the same minimum exists at more than one timestamp, the oldest one is retrieved. If a non-good raw value within a Sampling Interval is lower than the good minimum,  the quality of the aggregate for that Sampling Interval will be returned as "Uncertain".
MinimumActualTime
Retrieve the minimum value in the resample interval and the timestamp of the minimum value.
The MinimumActualTime sampling type is an aggregation sampling technique that retrieves the minimum good raw value within each defined Sampling Interval, and returns that value with the timestamp at which the value occurs.  If the same minimum exists at more than one timestamp, the oldest one is retrieved. If a non-good raw value within a Sampling Interval is lower than the good minimum,  the quality of the aggregate for that Sampling Interval will be returned as "Uncertain".
MinimumSampleAndHold
The MinSampleAndHold sampling type is an aggregation sampling technique that retrieves the minimum good raw value within each defined Sampling Interval, and returns that value with the timestamp of the start of the interval. If the same minimum exists at more than one timestamp, the oldest one is retrieved. If a non-good raw value within a Sampling Interval is less than the good minimum,  the quality of the aggregate for that Sampling Interval will be returned as Uncertain.
This sampling type differs from the Minimum sampling type in that it utilizes SampleAndHold interpolation to determine the beginning held value at the start of each interval. (This held value is the last good raw value occurring on or before the starting time of that interval).  This beginning held value is also considered to be within the interval, and is therefore taken into consideration as a possible minimum. It will be the minimum when no other values are present in the interval.
PercentBad
Retrieve the percent of data (1 equals 100 percent) in the interval which has bad quality.
The PercentBad sampling type is an aggregation sampling technique that first utilizes Duration Bad sampling to return the total time during which the Quality of the raw values is Bad within each defined Sampling Interval (see DurationBad description). This aggregate only considers truly Bad values; Uncertain values are not considered bad for purposes of calculating this aggregate.  The percent bad for each interval is then calculated as DurationBad / Interval Length.  The interval_length is the entire sample interval, regardless of quality.
PercentGood
Retrieve the percent of data (1 equals 100 percent) in the interval which has good quality.
The PercentGood sampling type is an aggregation sampling technique that first utilizes DurationGood sampling to return the total time during which the Quality of the raw values is Good within each defined Sampling Interval (see DurationGood description). This aggregate only considers truly Good values; Uncertain values are not considered good for purposes of calculating this aggregate.  The percent good for each interval is then calculated as DurationGood / Interval Length.  The interval_length is the entire sample interval, regardless of quality.
Range
Retrieve the difference between the minimum and maximum value over the sample interval.
The Range sampling type is an aggregation sampling technique that retrieves the difference between the raw maximum and raw minimum values within each defined Sampling Interval. If only one value exists in the interval, the range is zero. Note that the range is always zero or positive. If any non-good values exist in the interval, they are ignored, and the quality of the aggregate for that interval will be returned as "Uncertain".
Raw
The value available in the PLC server reflects in the application.
SampleAndHold
Retrieve a value and keep it until it changes.
SampleAndHold is an interpolative sampling technique that returns the last raw value prior to each defined Sampling Interval boundary. The quality of the returned value will match that of the raw value.
Because the last raw values are held across intervals, the same raw value may potentially be returned for more than one interval boundary.
Standard Deviation
Retrieve the standard deviation over the resample interval.
The Standard Deviation sampling type is an aggregation sampling technique that returns the standard deviation of good raw values within each defined Sampling Interval, calculated using the formula SQRT( SUM ( ((X - Avg(X))**2 ) / (n - 1))  where X is each good raw value in the interval, Avg(X) is the average of the good raw values, and n is the number of good raw values in the interval. For intervals where n=1, then a value of 0 is returned.
Start
Retrieve the value at the beginning of the resample interval. The time stamp is the time stamp of the beginning of the interval.
The Start sampling type is an aggregation sampling technique that retrieves the first raw value within each defined Sampling Interval, and returns it with the timestamp at which that value occurs.
If the value is non-good, the quality of the aggregate for that Sampling Interval will be returned as "Uncertain".
Sum
The Sum sampling type is an aggregation sampling technique that returns the sum of all good raw values within each defined Sampling Interval.
If one or more non-good raw values are also found within a Sampling Interval, the quality of the sum aggregate for that Sampling Interval will be returned as "Uncertain".
TimeAverage
Retrieve the time weighted average data over the resample interval.
The TimeAverage sampling type is an aggregate sampling technique that first utilizes Linear sampling to return a boundary value for each defined Sampling Interval boundary (see Linear description). A straight line is then drawn between the starting and ending boundary values of each interval, and the area under the line calculated (1/2 base X height) + (base X height)). The area under the line is the divided by the length of the interval to yield the time-weighted average for each bounded interval.
TimeAverageSampleAndHold
The TimeAverageSampleAndHold sampling type is an aggregate sampling technique that first utilizes SampleAndHold interpolation to return a boundary value for each defined Sampling Interval boundary (see SampleAndHold description).
This differs from the TimeAverage sampling type, which utilizes Linear interpolation to determine the boundary values, and also differs from TimeAverage in the assumption made as to the value between raw data values.  Whereas for TimeAverage the value between each Good raw value is assumed to change continuously (in a straight line) from the first value to the second, for TimeAverageSampleAndHold the value is instead assumed to hold at the first value for the entire length of time prior to receipt of the second value.
The rectangular area between each value is calculated using the formula  ((end time – start time) * start value).  Each of these areas is then added to the total interval area. The total interval area is then divided by the total time of the interval to yield the time-weighted average for that interval.
Total
Retrieve the totalized value (time integral) of the data over the resample interval.
The Total sampling type is an aggregate sampling technique that first utilizes TimeAverage sampling to return a time-weighted average for each defined Sampling Interval  (see TimeAverage description). The time-weighted average is multiplied by the length of the interval, in seconds, to give the Total value normalized to seconds.
TotalSampleAndHold
The TotalSampleAndHold sampling type is an aggregate sampling technique that first utilizes TimeAverageSampleAndHold sampling to return a time-weighted average for each defined Sampling Interval  (see TimeAverageSampleAndHold description). The time-weighted average is multiplied by the length of the interval, in seconds, to give the TotalSampleAndHold value normalized to seconds.
Variance
Retrieve the variance over the sample interval.
The Variance sampling type is an aggregate sampling technique that first utilizes Standard Deviation sampling to return the standard deviation for each defined Sampling Interval (refer Standard Deviation description). The standard deviation is squared to give the Variance for the interval.
WorstQuality
Retrieve the worst quality of data in the interval.
The WorstQuality sampling type is an aggregation sampling technique that retrieves the worst quality of the raw values within each Sampling Interval. That is, bad qualities are worse than uncertain, which are worse than good. No distinction is made between the specific reasons for the quality.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.