11 Replies Latest reply on Apr 6, 2018 8:54 PM by stuart.watson

    What is the best way to turn multiple attributes into template based elements?

    jhartin

      I have an AF structure that has about 5 Elements.  Each element has about 20 attributes and each of those attributes has the full set of limits (Hi Hi, Hi, Target, Lo, Lo Lo)

      It looks something like this

      I would like to turn each attribute into a template based element.  The end goal is a element relative display in Vision that is capable of switching between each of these new elements while keeping the same color configurations for the limits

      The final structure would look like this

      I'm wondering what is the best way to go about this.  I've been reading the manuals for the AF Transformer but I've been having some trouble defining my <Search Shapes> section.  Would it be better to do this through PI Builder?

        • Re: What is the best way to turn multiple attributes into template based elements?
          rborges

          AF Transformer is not the tool you are looking for. Considering that you already have your elements created, the easiest way to go is to convert into a template and recreating your elements based on the newly created template. If you are not familiar with templates, I suggest you first watch this video and convert elements to template following this tutorial.

            • Re: What is the best way to turn multiple attributes into template based elements?
              jhartin

              The element creation part is the piece I'm missing.  I want to create elements that will become parent elements of existing attributes.

               

              A practical example:

              If I have a Boiler Element that has many attributes and I want to convert all of those attributes into child elements of the Boiler element

              Boiler (Element)

                   Steam Pressure Process Value (Attribute)

                   Drum Level Process Value (Attribute)

                   ...

               

              How do I turn that.

               

              Into this

              Boiler (Element)

                   Steam Pressure (Element)

                        Steam Pressure Process Value (Attribute)

                   Drum Level (Element)

                        Drum Level Process Value (Attribute)

                   ...

               

              Once I get that then I can  use your example to apply a template to the newly created elements

                • Re: What is the best way to turn multiple attributes into template based elements?
                  rborges

                  There is no way to create a template that has a child element, but you can create templates that have groups of attributes or attributes with children.

                   

                  Let me give my opinion here. I see elements as the representation of something physical and - most important - templatable. A boiler is an element for sure. Although you have different properties for different boilers, the concept is pretty much the same. Now, when you mention drum level and steam pressure, that sounds more like a property, not as an element. What would be the point of a template called "steam pressure"? Outside of the equipment context it's useless.

                   

                  Now, from your first screenshot I see that you are using child attributes to store limits, right? There is no need to do that at all, as AF already allows you to set limits and targets to a given attribute! All you have to do is select an attribute and click on the "limits" link on the lower right bottom of PI System Explorer. You will be presented with a table where you can set the limits.

                   

                  2018-04-05 10_13_37-Limits.png

                   

                  This will make it much easier for you to manage your attributes.

                   

                  What you think?

              • Re: What is the best way to turn multiple attributes into template based elements?
                JimGavigan

                Here is what I have been doing. I am even doing a table lookup to get the tag (when appropriate, but you have to worry about client performance, so this can be a string builder also - I do this in case my customer wants to see what tag I have configured for an attribute). I am using a limits table which can be input into PSE, linked to a spreadsheet, or linked to another application like Envoy Process Monitor or some other database to pull limits from.