We have reports that need access to hundreds of quality test tags, grouped on the machines.

Rather than having to keep track of the different tags and mapping either manually or via PI Builder, we decided to use a table in AF, and use Table Lookup references, and substitutions.

By putting the configuration properties in a table we can then use the table lookup data reference with substitution parameters to build the PI Point references.

Our AF hierarchy that reflects that the grouping of tests by machine (machine -> test).

In a table, we store the mapping of the machine and test names

2018-04-05_9-18-34.jpg

We can then use String Builder references to build the PI Point reference and then substitute.

There is a gotcha about semicolons in String Builder, we actually had to create an attribute called semicolon that is a semicolon, and use it wherever we wanted a semicolon in the final string - not sure if it is version specific.

So the tag definition looks something like thiswith Server, TagBase, and UOM being table lookup references 2018-04-05_9-45-16.jpg.

 

You can see that we use both an attribute value (the machine name) and a substitution parameter (the test / element name).

Once you have fully built the tag, you can use that as a substitution parameter in the final tag

2018-04-05_9-49-45.jpg.

Using the Value Type "Anything" lets AF pick up the attribute type from the PI point. Including the UOM in the PI Point definition means that it too is picked up by the attribute.

And that's it.

Adding a test is a matter of adding the line in the configuration table with the right settings, then creating an element with a name that matches the column entry (in my case Test).

 

If you data is static (such as many high and low attribute properties) you can put these in a table too.

If the table lookup data reference uses the attribute or element or parent name substitution parameters as a search criteria, all you have to do is change the attribute or element or parent name and the values pulled from the tables will match the new attribute or element or parent. Just substitute your column name in the lookup below. If your attribute has the UOM set right, your highs, lows etc. should pick that up too.

2018-04-05_9-35-55.jpg