Animations for Historic Data
You can add animated historic values to a Mimic. This is useful when you want a Mimic to show calculated values, such as the daily average value of a point.
To use historic data in an expression, you need to include the Historic properties of a point. For example, you could animate a text box to show the daily average of a point by using the following expression to animate the Value property:
"<point path and name>.Historic.ProcessedValue ('D-1D', 'D+1D', 3)"
Where:
<point path and name>
defines the location and name of the point for which you want to show historic data. Do not enter the angle brackets < >.
.Historic
is the table that contains the point's historic values, and ProcessedValue is the historic value of the point. The remaining part of the expression defines the time scale and the type of calculation:
'D-1D'
is the start time of the time range (resample interval). It is a time in the OPC standard format, and in this case is the start of yesterday (Start of Current Day - 1 Day = start of previous day).
'D+1D'
is the end time for the time range. Again it is a time in the OPC standard format. In this case, the end time is the start of the next day (Start of Current Day + 1 Day = Start of Next Day).
3
is the number that corresponds to the type of algorithm (average).
NOTE: ClearSCADA only recalculates historic values when a point is updated. Therefore, a mimic may display false data if a point is not updated within a time range.
The possible types of algorithm and their corresponding number are:
Number for Expression | Algorithm | Meaning |
---|---|---|
1 |
Interpolated |
The interpolated value within the resample interval. |
2 |
Total |
The totalized value (time integral value) of the values in the resample interval. |
3 |
Average |
The mean average of the values in the resample interval. |
4 |
Count |
The number of raw values in the resample interval. |
5 |
StdDev |
The standard deviation of the values in the resample interval. This indicates how much the raw values in the resample interval deviate from the mean average values. |
6 |
Min |
The lowest value in the resample interval. |
7 |
MinTime |
The lowest value in the resample interval and the time stamp for the value. |
8 |
Max |
The highest value in the resample interval. |
9 |
MaxTime |
The highest value in the in the resample interval and the time stamp for the value. |
10 |
Start |
The value at the start of the resample interval. The timestamp is at the start of the interval. |
11 |
End |
The value at the end of the resample interval. The timestamp is at the end of the interval. |
12 |
Delta |
The difference between the first value and the last value in the resample interval. |
13 |
Variance |
The variance of the values in the resample interval. This indicates how much the raw values in the resample interval deviate from the mean average values. |
14 |
Range |
The difference between the minimum value and the maximum value in the resample interval. |
15 |
DurGood |
The amount of time (in seconds) for which the data in the resample interval is Good quality. |
16 |
DurBad |
The amount of time (in seconds) for which the data in the resample interval is Bad quality. |
17 |
PerGood |
The percentage of data in the resample interval that is Good (1=100%). |
18 |
PerBad |
The percentage of data in the resample interval that is Bad (1=100%). |
19 |
Sum |
The sum total of the values in the resample interval. |
20 |
24hAverage |
The average value during the previous 24 hours. The 24 hour period starts from the latest raw value. |
21 |
8hAverage |
The average value during the previous 8 hours. The 8 hour period starts from the latest raw value. |
22 |
1hAverage |
The average value during the previous hour. The hour period starts from the latest raw value. |
23 |
Stepped |
The stepped value. Typically, you would not use this algorithm in an expression as it returns the last value in the resample interval. |
24 |
MinLast |
The lowest last value in the resample interval. Last values are used when the resample interval contains null values—the last value is the previous raw value and it is used instead of a null value. |
25 |
MaxLast |
The highest last value in the resample interval. Last values are used when the resample interval contains null values—the last value is the previous raw value and it is used instead of a null value. |
26 |
AverageLast |
The average last value in the resample interval. Last values are used when the resample interval contains null values—the last value is the previous raw value and it is used instead of a null value. |
27 |
MinInterpolated |
The lowest interpolated value in the resample interval. Interpolated values are used when the resample interval contains null values—the interpolated value is the difference between the raw values and it is used instead of a null value. |
28 |
MaxInterpolated |
The highest interpolated value in the resample interval. Interpolated values are used when the resample interval contains null values—the interpolated value is the difference between the raw values and it is used instead of a null value. |
29 |
AverageInterpolated |
The average interpolated value in the resample interval. Interpolated values are used when the resample interval contains null values—the interpolated value is the difference between the raw values and it is used instead of a null value. |
30 |
Time Average |
A time-weighted average of the values in a resample. The Time Average algorithm takes into account the amount of time between value changes. Therefore, this average value is less influenced by a small number of unusual values. See Time Average. |
31 |
EndLast |
The value at the end of the resample interval or the last value prior to the resample interval (if there are no values for the resample interval). The timestamp is the time at the end of the resample interval, even if the value returned was not reported during the time span for the resample interval. |
32 |
Moving Range |
The sum of the absolute differences between each pair of values in the resample interval. |