It seems like you are asking for this.
Given a varying flow rate, what is the time taken so that the time weighted total is 1000L. Am I right? I know we can do it the forward way where by we provide the time and the flow rate as inputs to calculate the time weighted total. But I am not sure if we are able to do the reverse integration.
Thanks for the help Eugene!
This is exactly my problem. I know how to get the totalize by passing a start time and a end time.
What I want is pass the initial time and the target totalization and know the end time to get this totalization.
This is possible?
I think in create an atrribute "Flow Rate Total" with a variable initial time and the end time is "*". And then call a TimeLE() function in piwebapi. If I create an atribute with TimeLE() the Analisys forces to create a PIPoint.
If I call the piwebapi calculation for the attribute "Flow Rate Total" I get an error. This is a new aproach, diferent of the fist aproach.
https://<WEBAPISERVER>/piwebapi/calculation/intervals?webid=<WEBID>&starttime=2018-09-07T4:30:00.000Z&endtime=*&expression=TimeLE('<ATTRIBUTEPAHT>', '2018-09-07T14:30:00.000Z', '*', 1000)
But I still getting the error:
"An exception has occurred. Please contact your PI Web API administrator for help in enabling debug mode."
1 of 1 people found this helpful
I was able to get this syntax to work. For example:
https://<webapiserver>/piwebapi/calculation/intervals?webid=<afserverwebid>&starttime=2018-09-11T04:30:00.000Z&endtime=*&expression=TimeLE('\database1\element1|attribute1', '7-Sep-2018 14:30:00', '*', 1000)
To use the TimeLE function, you need a PI Point.
Your expression will calculate the amount of time in seconds that your attribute is below 1000 in the time range starting from the starttime to the endtime.