Hi all,

I would be grateful if someone has simple automatic method for summing up ramping data (pump running hours) that resets periodically.

Data trend looks like this:

Where on x axis is time and on y axis is summarized running time.

I would like to summarize all peak data and latest accumulation in excel and preferably later on in PE, Totalizer or Analysis to track running hours.

Data could be:

- for past 5 years
- starting at some point
- ending at some point
- reset as some point

Questions:

- What is the easiest way to summarize data for one time analysis?
- What is best practice to accumulate past data and continue accumulating in real-time?

Thanks

BR

Sergej

Hello Sregej .. Thanks for posting on PI Square .. our community !

The difficult part about your request is how to detect the peak. I am not sure how your data set looks like, but according to the example, the criteria of determining a peak of 'y' is the following :

1- y is greater than 0 or any reasonable value.

2- y stabilizes for certain time 'x'.

So what you can do is to implement PI Asset Analytics to store 'y-value' when it did not change for a specified time interval 'x minutes'. Please refer to Expression functions reference to see the available expression functions and their syntax.

For instance, in your case:

1- You can check if the value is changed or no using 'haschanged' function and specify the 'x minutes' to consider a peak situation. If the answer is false, then this is a peak.

2- You can use an if statement to check if the value is greater than 0 and the peak flag is false. If the condition is valid it stores the 'y_Value"

3- You can use the 'TagTot' function to sum all the stored "Y_values" when the peak condition is valid.

The same idea can be achieved by using performance equations. But Asset Analytics will not consume a PI Tag if you are not historizing the results and you can back-fill it to cover any time interval in the past (Which answers your second question).

Please let me know if you have further questions regarding this !