Hi,

I'm looking for and expression to calculate the average valu over one minute of a point, then every ten minute calculate the maximum of those 10 average.

I'm using calculated data

Hi,

I'm looking for and expression to calculate the average valu over one minute of a point, then every ten minute calculate the maximum of those 10 average.

I'm using calculated data

- 1 person found this helpful
Hello Daniel,

In order to get the average value every minute you would use calculated data. For example if you want to calculate the average value of the tag CDT158 every ten minutes for the last 24 hours, the configuration would be similar to the below screenshot. You can adjust the configuration based on the frequency that you would like to get the average values.

Now for getting the maximum value of the average values every ten minutes you could use the MAX function in EXCEL.

If you want to do this with PI Datalink using the Expression option with the Calculated Data function should give you the result you want. Your expression would using Performance Equation syntax to calculate the average value of the tag for the last minute: tagavg('tagname','*-1m','*'). Then you would set the time interval to ten minutes. By expanding the advanced options, if you want to use interpolated values you can use a sampling frequency of one minute or if you want the expression to be evaluated for each compressed value you can leave the default, which is compressed.

See an example configuration below for one day of calculations, where the results are calculated every ten minutes and the expression is the average values of the tag cdt158 for the last minute.

For more information on the options for the Calculated Data function see the Live Library Link below:

Let me know if you have any questions about what I recommended.

Hello Daniel,

In order to get the average value every minute you would use calculated data. For example if you want to calculate the average value of the tag CDT158 every ten minutes for the last 24 hours, the configuration would be similar to the below screenshot. You can adjust the configuration based on the frequency that you would like to get the average values.

Now for getting the maximum value of the average values every ten minutes you could use the MAX function in EXCEL.

If you want to do this with PI Datalink using the Expression option with the Calculated Data function should give you the result you want. Your expression would using Performance Equation syntax to calculate the average value of the tag for the last minute: tagavg('tagname','*-1m','*'). Then you would set the time interval to ten minutes. By expanding the advanced options, if you want to use interpolated values you can use a sampling frequency of one minute or if you want the expression to be evaluated for each compressed value you can leave the default, which is compressed.

See an example configuration below for one day of calculations, where the results are calculated every ten minutes and the expression is the average values of the tag cdt158 for the last minute.

For more information on the options for the Calculated Data function see the Live Library Link below:

https://livelibrary.osisoft.com/LiveLibrary/content/en/datalink-v5/GUID-0453BFA5-1E81-4911-896E-C8F551218476

Let me know if you have any questions about what I recommended.