dsabin

Best Way to Store Min-Avg-Max in PI

Discussion created by dsabin on May 24, 2010
Latest reply on May 25, 2010 by dsabin

I have a sensor that provides a minimum value, average value, and maximum value of numerous data streams every five minutes.  I am using PI SDK to add these values to a PI Server.  Here is a simple example of the values:

 

Time, Min, Avg, Max
2010-05-23 00:00:00, 0.99, 1.01, 1.02
2010-05-23 00:05:00, 0.98, 1.00, 1.03
2010-05-23 00:10:00, 0.97, 1.01, 1.02
2010-05-23 00:15:00, 0.85, 1.00, 1.03
2010-05-23 00:20:00, 1.01, 1.02, 1.04
2010-05-23 00:25:00, 1.00, 1.02, 1.05

 

What is the best way to store the minimum, average, and maximum values?  I could store the minimum, average, and maximum values for each stream in different tags, but this would require that I use three tags for each channel of the sensor, which is costly.

 

I could store the minimum, average, and maximum value in a single tag for a specified period of time, offsetting the min, avg, and max slightly in time so that they can be distinctly queried.  But then it makes it hard to write queries that handle the values differently.  I thought that I could annotate the minimum values with a description that identifies them as so, but from what I understand annotations are not cached as afficiently as the samples themselves so that would not be optimal.

 

Do other PI users have some suggestions?

 

Thanks!

Attachments

Outcomes