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', 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 Relative Time Format, and in this case is the start of yesterday (Start of Current Day - 1 Day = start of previous day).
'D'
is the end time for the time range. Again it is a time in the OPC Relative Time Format. In this case, the end time is the start of the current day.
3
is the number that corresponds to the type of algorithm ('Average'). As an alternative to specifying the number of the algorithm, you can enter the algorithm's name enclosed between single quotation marks. This results in a more readable, but slightly less efficient, expression. The name of each algorithm appears in the Algorithm column in the table below. Use the table to determine whether the algorithm names comprise single words, multiple words with spaces, or are camel case (also known as 'medial capitals').
If the above expression used the algorithm name, rather than the algorithm number, it would appear as:
"<point path and name>.Historic.ProcessedValue ('D-1D', 'D', 'Average')"
You can also specify any custom historic algorithms that have been created on your system (see Historic Algorithms (Custom) in the ClearSCADA Guide to Server Administration). With custom algorithms, you have to specify the algorithm name (as the numbers of custom algorithms are not visible).
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 built-in algorithms and their corresponding numbers are shown in the table below. With some of the options, you can access further information by clicking on the entry in the Algorithm column.
Number for Expression | Algorithm | Meaning |
---|---|---|
1 |
The interpolated value within the resample interval. |
|
2 |
The totalized value (time integral value) of the values in the resample interval. |
|
3 |
The mean average of the values in the resample interval. |
|
4 |
The number of raw values in the resample interval. |
|
5 |
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 |
The lowest value in the resample interval. |
|
7 |
The lowest value in the resample interval and the time stamp for the value. |
|
8 |
The highest value in the resample interval. |
|
9 |
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 |
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 |
The sum total of the values in the resample interval. |
|
20 |
The average value during the previous 24 hours. The 24 hour period starts from the latest raw value. |
|
21 |
The average value during the previous 8 hours. The 8 hour period starts from the latest raw value. |
|
22 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
End Last |
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. |