Example Configuration

This example demonstrates how a Historic Calculation can be used to provide a Target point with data from one of two points, depending on the values of those points. (In this particular example, when the source data values fall below a certain level, the Target point is provided with data from the source point that has the more accurate readings.)

Example:

The flow of gas in a pipe is measured by two signals—one with a range of 0-200 (source point ‘Pipe3 0-200’) and another that has a range of 0-20 (source point ‘Pipe3 0-20’). When the flow is less than 20, the 0-20 signal gives a more accurate reading than the 0-200 signal.

To allow ClearSCADA to use the appropriate point when monitoring the flow, a Historic Calculation is used. The result of the Historic Calculation allows ClearSCADA to determine whether the 0-200 signal or the 0-20 signal should be used. If the flow in the pipe is lower than 20, the 0-20 signal is used, but if the flow is 20 or above, the 0-200 signal is used instead.

An Internal Analog point, ‘Pipe3 Flow’, is to store the result of the Historic Calculation. The point is configured to have a range of 0 to 200, and has Historic enabled.

The Historic Calculation ‘Pipe3 Flow Calculation’ is configured to use ‘Pipe3 Flow’ as its Target point:

The Historic Calculation is to produce 3 days’ worth of historic data and is to calculate historic values at 15-minute intervals.

The Expression used for the Historic Calculation needs to take account of the value for the Analog point ‘Pipe3 0-200’ unless the value of the point drops to 20, whereupon it needs to take account of the value of the Analog point ‘Pipe3 0-20’. This can be calculated using an IIF statement.

The Select Historic Calculation Tag window is used to specify the blocks of historic data that ClearSCADA is to access for the Expression.

The browse button adjacent to the Expression field is used to display the Select Historic Calculation Tag window. The window is used to select the Analog point ‘Pipe3 0-200’. As the calculation is to provide historic data at 15-minute intervals, the Search Range is set to 15M. If no historic values are found within this period, a Max Search Range of 30M allows ClearSCADA to search back a further 15 minutes. The Offset is left at its default of 0—no allowance is needed to allow for any time difference between the source and resultant historic values.

The settings specified in the Select Historic Calculation Tag window result in the syntax

"..Eastern Group.PSTN.Pipe3 0-200:0:15M:30M"

being displayed in the Expression field on the Historic Calculation Form.

The Select Historic Calculation Tag window is used to specify similar settings for the Analog point ‘Pipe3 0-20’.

The full syntax used in the Expression field (entered by a mix of manual typing and by specifying settings using the Select Historic Calculation Tag window) is:

As the Historic Calculation is to produce 3 days’ worth of historic data, and calculate historic values at 15-minute intervals, the remaining fields on the Historic Calculation tab of the Historic Calculation Form are configured to have these settings:

This specifies that ClearSCADA is to calculate historic values at 15-minute intervals, starting three days before the beginning of the present minute, and finishing at the beginning of the present minute.

The Historic Calculation’s Execute pick action is used to produce historic values for the Target point ‘Pipe3 Flow’. This includes the following values:

Time Value of Source Point ‘Pipe3
0-20’
Value of Source Point ‘Pipe3
0-200’
Value of
Target Point ‘Pipe3 Flow’
Comments

10:00

20.00

75

75.00

As the value of ‘Pipe3 0-200’ is over 20, its value is written to the Target point.

10:15

20.00

53

53.00

10:30

20.00

36

36.00

10:45

12.47

18

12.47

The value of ‘Pipe3 0-200’ drops below 20, so the value of ‘Pipe3 0-20’ is written to the Target point.

11:00

10.38

17

10.38

11:15

15.69

24

24.00

The value of ‘Pipe3 0-200’ rises above 20, so the value of ‘Pipe3 0-200’ is written to the Target point.

11:30

17.45

---

24.00

There is no value for ‘Pipe3 0-200’ at 11:30, therefore the previous value of 24.00 is written to the Target point. This is still within the 15-minute ‘Search Range’ so is deemed Good Quality.

11:45

19.99

26

26.00

12:00

---

20

18.34

The value of ‘Pipe3 0-200’ drops below 20, so the value of ‘Pipe3 0-20’ is written to the Target point. As no value exists for ‘Pipe3 0-20’ at 12:00, the previous value of 19.99 is written to the Target point.

12:15

---

16

18.34

There is no value for ‘Pipe3 0-20’ at 12:15 so ClearSCADA extends its search back. The last known value of 19.99 is written to the Target point. As this value is outside of the ‘Search Range’ but within the ‘Max Search Range’, the value of the Target point is deemed to be of Uncertain Quality.

12:30

---

19

---

The value of ‘Pipe3 0-200’ is still below 20, so ClearSCADA attempts to use the value of ‘Pipe3 0-20’ for the Target point. However, there has been no value for ‘Pipe3 0-20’ for longer than the ‘Max Search Range’. Therefore, ClearSCADA searches further back and uses the last known value of 19.99 for the Historic Calculation.

As this value is outside of the ‘Max Search Range’, it is deemed Bad Quality and therefore no Target value is stored for this time interval.

12:45

20.00

27

27.00

The value of ‘Pipe3 0-200’ rises above 20 and is written to the Target Point. The value is deemed Good Quality.


Disclaimer

ClearSCADA 2017 R2