Hi Perfo,
From what I can gather from your post, your second option sounds the best approach. Querying PI data for 6 pumps x (24hours x 7days data search) is perfectly fine for PI to handle, even if you were storing uncompressed values every second.
How I would look to approach this:
- Make the assumption that if a pump is running during the night, the pump flow finishes at midnight. For the next day, assume the pump started flowing at midnight. This way, you will always have a start/end pair for a pump that overlaps midnight.
- Either create a digital performance equation tag for each pump that signifies "Pumping/Not Pumping" based on the power conumption of a pump - OR - just query the data based on the power consumption. Assuming here there is a baseline power consumption that you will see rise when pumping.
- Get the data for a 24 hour period for a pump. If it has been pumping, find the start time (standard deviation from the baseline power OR use the digital tag created above), end time is either when the power returns to baseline or time is midnight (flowing over midnight).
etc.
The more you can get the PI server to resolve for you the better, means you have less crunching to do on a client.
Principal Consultant
Real-Time Data Management @ Wipro Technologies