Sampling Modes
Sampling modes are used to specify how the data will be retrieved from Historian. Several modes are available, such as CurrentValue, Interpolated, Calculated and RawByTime. Sampling modes are specified in the client you use to retrieve data from Historian.
For more information, refer to the Advanced Topics section in the online help.
- For the Trend sampling mode, Historian ignores any leftover values at the end, rather than putting them into a smaller interval.
- For the Trend2 sampling mode, Historian creates as many intervals of the interval length as will fit into the sampling period, and then creates a remainder interval from whatever time is left.
- Spacing of timestamps returned:
- For the Trend sampling mode, Historian returns evenly-spaced interval timestamps.
- For the Trend2 sampling mode, Historian returns raw sample timestamps. These timestamps can be unevenly spaced, since raw data can be unevenly spaced.
- Inclusion of start and end times entered:
- The Trend sampling mode is start time exclusive and end time inclusive.
- The Trend2 sampling mode is start time inclusive and end time inclusive.
Trend sampling mode is more suitable for plotting applications that prefer evenly-spaced data.
Trend2 sampling mode is more suitable for analysis of mins and maxes and for plotting programs that can handle unevenly spaced data.
TrendtoRaw2: The TrendtoRaw2 sampling mode is a modified version of the TrendtoRaw sampling mode.
The TrendtoRaw2 sampling mode almost always produces the same results as the Trend2 sampling mode. The exception is that, when more samples are requested than there are raw data points, the TrendtoRaw2 sampling mode returns all of the available raw data points with no further processing.
Calculated: Returns samples based on a selected Calculation mode.
RawByFilterToggle: RawByFilterToggle returns filtered time ranges. The values returned are 0 and 1. If the value is 1, then the condition is true and 0 means false.
This sampling mode is used with the time range and filter tag conditions. The result starts with a starting time stamp and ends with an ending timestamp