5 Replies Latest reply on Jul 6, 2016 11:29 AM by MPetro

    Default value when there is no PI Point?

    MPetro

      Is it possible to set an attribute to use a default value when there is no PI Point?

       

      I have a template that is used for several equipments. When there is a specific measurement, I would like the template to use it. Otherwise I would like the template to use a default value.  I used the function not badval to check the PI Point.

       

      if not badval('Attribute PI Point') then 'Attribute Pi Point' else Defaultvalue

       

      But the analysis remains in 'error and warning' state with the message: Failed to sign up some input(s) for receiving updates.

       

      I think I am missing something here.

        • Re: Default value when there is no PI Point?
          dsouzarich

          For the element in question you could override the template attribute. So for the attribute in the element select the Data Reference <None> , then set the value to the desired default value.

           

          It is a shame that an attribute that has been overridden from a template is not highlighted/marked as that in some way.

            • Re: Default value when there is no PI Point?
              MPetro

              Thanks for your suggestion.

               

              Yes, override is hard to keep track of. So although it is very effective in the short run, I don't like as a solution.

               

              So far, I have two options:

              - a modified version of your advice: to create a derived template with the override.

              - to create a TAG with fixed value 1 and use it. Then a formula (default value)*1.

                • Re: Default value when there is no PI Point?
                  gregor

                  Hello Mauricio,

                   

                  I just read the PI Server documentation about Attribute Properties. It's not exactly what you've been asking for but Excluded is intended for Attributes that may for some equipment not exist.

                    • Re: Default value when there is no PI Point?
                      MPetro

                      Hello Gregor,

                       

                      thank you!

                       

                      I changed the atribute in some specific elements to 'Excluded'. It worked partially. I still get a bad output from the calculation, but the analysis isn't anymore refusing to do the calculatation. The drawback is that I must configure each specific element. And also, I can't set to use a default value instead.

                       

                      From the 3 solutions below, the scalable solution is to create a TAG with fixed 1 or 0 value and configuring the default value in a table.

                      1) override the template atribute to DR <none> or to Property 'Excluded'. Cons: the deviation from the template will not be evident, configuration is one by one.

                      2) create a derived template with the override and apply to the specific elements. Cons: I will have many templates differing only by the number of PI Point input.

                      3) create a TAG with fixed value 1 or zero and use it. Pro: one template for all.