2 Replies Latest reply on Apr 10, 2017 6:16 AM by calmandrysdale

    AF - Formula Data Reference - How to check if Attribute Excluded

    calmandrysdale

      Hola,

       

      Using a Formula Data Reference how does one go about testing if an attribute is excluded?

       

      I need to be able to test if a value is bad or excluded (so just using badval won't work) and produce two different results based on that.

       

      Thoughts?

       

      Cheers,

       

      Calman

        • Re: AF - Formula Data Reference - How to check if Attribute Excluded
          Duc Ta Hieu

          Hi Calman,

           

          I found a similar discussion here: Excluded Attribute in Analyses

           

          Currently, it seems that there is no straight forward way to do this and the 'IsExcluded' function is not yet available.

          Furthermore, the functions in a Formula DR are much more limited compared to an AF Analysis.

          In the short term, I would say that the likelihood of an elegant solution using a Formula DR is very slim.

          Is there any particular reason why you prefer to use a Formula DR?

           

          If you are open to using an AF Analysis, I feel that there is a possible immediate solution.

          During my tests, I noticed the following behaviour:

           

          If the data in your PI Point never assumes the "No Result" digital state, then you could try the following logic:

          If 'MyAttribute' = "No Result" Then <insert EXCLUDED logic> Else If BadVal('MyAttribute') Then <insert BAD logic> Else <insert GOOD logic>

           

          Just FYI, I also tried using the same strategy with a Formula DR but I couldn't find a way to make it recognize the "No Result" digital state.

          Again, this seems to be a limitation with the Formula DR.

            • Re: AF - Formula Data Reference - How to check if Attribute Excluded
              calmandrysdale

              Hi Duc,

              Thanks for your detailed answer!

               

              I guess I was hoping to use a Formula DR as this is a templated element, of which there are many and i'm doing a simple "is element faulted" check based on a number of fault tags. Unfortunately a number of the elements inheriting from this template have not got all the alarms (and no it can't be broken down nicely into an inherited template style).

              I went through and excluded these attributes on the instances however then my formula (which checks for bad values on the real fault tags) fails.

               

              Quite frustrating.

              I feel the Formula Data Reference is due for an upgrade

               

              Thanks again for your answer.

               

              Cheers.

               

              Calman