0 Replies Latest reply on Dec 17, 2018 8:22 PM by alanquadros

    Analysis Calculation and Runtime Input Values

    alanquadros

      Hey guys,

       

      I need some help on this scenario.

       

      I have three tags:
      Inferior Limit (IL)
      Superior Limit (SL)
      Tag Value (TV)

       

      I need to calculate total time where TagValue is greater than superior or TagValue is lesser than inferior limit.

       

      So i setup an analysis where:

       

      timeGreater = timeGT('TV',starttime,endtime,'SL');
      timeLesser  = timeLT('TV',starttime,endtime,'IL');

       

      dTime = timeGreater + timeLesser

       

      it works fine, when i know starttime and endtime and input it via PI System Explorer.

       

      But, now i need to put it on web application and set starttime and endtime on runtime. How can i do that ?!

       

      I'm trying to use AFAnalysis to input (starttime, endtime), run then analysis and get the results... is that possible ?!
      it's the correct way to do it !?

       

      thanks