1 of 1 people found this helpful
If you can create points in PI Data Archive, consider creating a new PI Point of class Totalizer for such simple calculation. You don't need to program at all. You can do it using PI Points option in the PI-SMT application.
If you need to calculate, there is a PI-SDK method PiPoint.Data.Summary with the option astTotal, which does the job. There are many parameters to set, but it's well documented in the PI-SDK help file.
+1 on the totalizer points suggestion. Whenever possible, I recommend configuring totalizer points vs making SDK summary calls, since totalizer points already have the total value [pre-]calculated, and clients can just query for this value directly. Whereas SDK summary calls will always force a calculation at run-time, which can be very expensive, depending on number of events involved and other factors.
Consider reading this reference as well: http://techsupport.osisoft.com/Troubleshooting/KB/KB01585/
2 of 2 people found this helpful
Like Pawel suggested you could use the PIPoint.Data.Summary method and you will have to force multiple by result by a conversion factor. If this wasn't PI ProcessBook I would of course direct you to the AF SDK and perhaps Event Frames!