1 of 1 people found this helpful
Thanks for reaching out to us on PI Square.
When you say you're trying to do a Percent True on a calculation, are we talking about are you trying to use the calculation controller to do something like find a Total or a count, but only if there are enough good data points during the interval? Some thing like the below:
I'm a little confused as to what you're after exactly. Could you post a sample URL that you're looking to get working? Some more concrete information could help us help you better.
Thank you for answering this quick. In the AFSDK there's a method called AFCalculation.PercentTrue, which allows you to evaluate a performance equation over a period of time and get a percentage of how much time the equation equals a certain value (I usually use this with bool values). I didn't find anything like it on the WebAPI.
The goal is trying to calculate if a performance equation has had a certain value for a period of time in order to raise an alarm only in the event that it's been active more than the configured period.
I hope I'm explaining myself. Let me know if i'm missing something. Now that you mention streams, there might be a better way of achieving this that i'm not aware of.
2 of 2 people found this helpful
I believe AFCalculation.PercentTrue method is not currently implemented through any of the Controllers in PI Web API.
If you like this feature in future releases, please let us know through Customer Feedback for OSIsoft & the PI System: Developer Technologies, so it can be taken up for consideration.