In ProcessBook, I need to calculate the Maximum value for an AF element defined as a PI tag over several different intervals. I could create attrjbutes, tags, and AF analysis calculations for each of these intervals, but, with hundreds of parents, this could require thousands of tags.
Is there a way to retrieve the PI tagname from the attribute I need to use as the basis of the calculation? More Specifically, if I am calculating a 15 minute average in an AF ANalysis block, storing that result in an AF Attribute, V_15_Min_Avg, defining that attrbute as a PI point, PI_Point_15_Min_Avg.. I want to retrieve that PI Point Name(PI_Point_15_Min_Avg) in VBA and do 15 - 20 different calculations on data from that tag, with the calculations being performed in VBA so that I do not need to have 20 x number of parents(Several Hundred) of tags used to do the calcs in AF Analysis.
The best I have come up with is to create a new attribute with the tag name in it, store that string in a value cell on the display, hide the value cell, and use that string in calculations. I am not sure how to make the reference between the tag name in the PI Point field in the template and the new attribute I would create. It is a little dirty, but should work.
I have not gone through the process of using the AF SDK in a wrapper to try to accomplish this. I was trying to find something easier or slicker.