Did you know that you can use AF to create PI tags. AF has a mechanism to be able to easily create tags and through the use
of templates and substitution parameters, it can make building a PI data archive database much simpler. The best
way to accomplish this is to utilize templates that describe all of the attributes for a PI tag in each of the attributes. You will likely need to use formulas that
will resolve when the AF element is created using the template.
you define an attribute that is to be a PI point created by AF, you should include more than just the tag in the configuration string. Typically when configuring a PI point attribute in an AF Element Template, you would use something like "\\%Server%\%Element%.%Attribute%" where items inside of the percent signs are substitution parameters. In this default case, it replaces %Server% with the name of the default PI data archive server, the %Element% with the name of the element that instantiates the template, and %Attribute% with the name of the attribute. There are more substitution parameters available which I'll discuss in a future blog.
If you intend the attribute to create a PI point, you should append the configuration string with settings for the point's attributes, each attribute separated by a semicolon. For example: \\%Server%\%Element%.%Attribute%";PointType=float32;PointSource=OPC1;Location1=1;Location4=1"
It should be noted that the substitution parameters do not only work for the server name and the tag, but they can be used anywhere within the configuration string. So you could use the following where some of the attributes for the point can be contained in a child attribute such as: \\%Server%\%Element%.%Attribute%";PointType=%@.|PointType%;PointSource=%@.|PointSource%;Location1=%@.|Location1%;Location4=%@.|Location4%". In this example, the attribute would have child attributes for each PI point attribute (i.e.: PointType, PointSource, Location1, and Location4).