Supported AggregateId Values
With a trace that displays processed historic data, use the AggregateId identifier to define the algorithm that ClearSCADA uses to process that historic data. TrendSpec’s AggregateId identifier is equivalent to the Algorithm property on pre-configured Trends (see Configure a Trace).
Take care with End and End Last Historic Algorithms used on clients, or with ClearSCADA features, that run in Local Time with Daylight Saving Time. Ensure that the start and end times specified for the sample interval do not coincide exactly with the time at which the clock jumps backward. Include a small offset in the sample time, to offset the calculation to avoid the sample end or start time exactly matching the time that the clock jumps backward at the transition from Daylight Saving Time to Standard Time. A small offset of 1s or even 1ms should suffice. For more information about Daylight Saving Time, see The Effects of Daylight Saving Time Adjustments.
To specify the algorithm that ClearSCADA is to use when processing historic data, you assign the SOURCE’s AggregateId the appropriate long value.
If a TRACE’s Interval identifier is set to a specific time period, you can assign the corresponding SOURCE’s AggregateId any one of a number of long values, including:
Long Value |
Algorithm |
Long Value |
Algorithm |
---|---|---|---|
1 |
Interpolated |
20 |
DurBad |
2 |
Total |
21 |
PerGood |
3 |
Average |
22 |
PerBad |
4 |
Time Average |
25 |
Sum |
5 |
Count |
26 |
24hAverage |
6 |
StdDev |
27 |
8hAverage |
7 |
MinTime |
28 |
1hAverage |
8 |
Min |
29 |
Stepped |
9 |
MaxTime |
30 |
Min Last |
10 |
Max |
31 |
Max Last |
11 |
Start |
32 |
Average Last |
12 |
End |
33 |
Min Interpolated |
13 |
Delta |
34 |
Max Interpolated |
17 |
Variance |
35 |
Average Interpolated |
18 |
Range |
36 |
End Last |
19 |
DurGood |
37 |
Moving Range |
If the TRACE’s Interval identifier is set to PerPixel, the long value that you can assign to the SOURCE’s AggregateId is limited to one of the following:
Long Value |
Algorithm |
Long Value |
Algorithm |
---|---|---|---|
3 |
Average |
32 |
Average Last |
8 |
Min |
33 |
Min Interpolated |
10 |
Max |
34 |
Max Interpolated |
30 |
Min Last |
35 |
Average Interpolated |
31 |
Max Last |
--- |
--- |
Example:
A ‘custom’ ad hoc Trend is to show a trace of processed historic data.
The TrendSpec definition’s TRACE section includes this configuration:
Interval = ‘15M’
The SOURCE section within the TRACE section includes:
AggregateId = 3
This results in the trace showing the mean average value that ClearSCADA retrieved from the data source during each 15-minute interval. (AggregateId = 3 triggers ClearSCADA to calculate the mean average from the raw data values that it retrieved during each resample interval.)
Further Information
AggregateId identifier: see SOURCE Optional Values.
Historic algorithms used on Trends: see Built-In Historic Algorithms for Processed Historic Data.