3 Replies Latest reply on Jun 4, 2014 12:40 PM by Gregor

    Datalink - Deviation calculation Issue




      I want to calculate a min & max deviation of a parameter but in that i want to consider only those values which are remained deviated for some amount of time.


      Lets say i have parameter named 'abc' whose min value is 10 & max value is 30 . If the value of that parameter deviates frequently then i don't want to consider all those values. But if value is deviated & remains deviated for some time say for 30s then & then only i want consider those values for min & max deviation otherwise just ignore rest of the values.


      In Excel using DataLink function "PIAdvCalExpDat()" i have calculated all  the deviated values but i'm not able to calculate values which are deviated for some time.









        • Re: Datalink - Deviation calculation Issue

          Hi Ulhas,


          You could use the time filters to get the time where the value was in deviation. Youtube video on using the PITimeFilter formula. Once you have this dataset you could use a Pivot table to filter the results set to only show the value of interest. There is a problem with this scheme; if you have a tag that goes in and out of deviation then the total "true" time will be returned. 


          Another (better) approach would be to use EventFrames. Create an EF whenever the attribute (it will be an AF Element and attribute now) exceeds the limits. In Excel you can simple return the EventFrames with a duration greater than the desired threshold. This will have the benefit of avoid the problem above, will have far better performance and your logic is only in one place. With AF 2.6 (Asset Based Analytics) and Datalink 5.1 this would be pretty easy to do.