I've been looking at this for some time. Did not 100% figure it out yet, so i thought to call our on your combined smartness to enlighten me on this topic!
I use PI Point datareferences frequently, in combination with substitution parameters %@xxx% and %xxxx% and PI Point creation. The AF documentation states that when a PI Point DR is resolved, the PointID is stored in the Point attributes. However, just looking at PSE it's a but fuzzy to me when the PointID is determined and persisted on the attribute in the AFserver.
Let's look at my example:
- A simple Element, based on a template.
- One PI Point attribute, with the following configstring: "\\mypiserver\%@.|TagName%;ptclassname=classic;pointtype=Float32;location2=2;location4=1;pointsource=R"
- One child attribute (string) holding the PI Point name. Defaults to "CDT158". NOT a config item.
- I create the element based on the template, and in an instant, the Element is created, the Pi Point reference shows a value, and shows a configstring resolved to the PI Point CDT158.
- Change the tagname to SINUSOID. First nothing happens and stays at CDT158.. Press refresh on the attribute, or switch between elements or checkin: nothing happens and stays at CDT158.
- Choose Revert to Template: point is resolved to SINUSOID.
- Now it starts behaving differently: Whenever i change the tagname to CDT158 or SINUSOID, the change is instantly reflected in the Configstring. And after pressing refresh on the attribute, the value is shown of the PI Point in the configstring.
- I set a new TagName, of a non-existing tag: behaves as previous bullet (except no value of course).
- Now i press Create or Update Pi Point. Point gets created, but now Configstring is stripped from it's tag creation parts of the string.
- If i now press Reset to template, the tag creation parts return on the string.
- I now set a new TagName of a non-existing tag, and press Create or Update PI Point. Point gets created, configstring is stripped from tag creation parts.
- I now change the tagname to an existing tag. Tag creation parts stay off, but new tag is resolved and shown.
- Close and open PSE. Attribute still on previous value before change, creation part still absent. Now i can change the tagname, refresh, without that impacting the Pi Point: back to start situation.Only when i now press Reset to Template, the response to a tagname change is instant again.
AF help says on %@xxx%: PI AF does not update the attribute value over time. It uses the value of the attribute at that exact time that you created or updated the data reference (Create or update data references). This value is a constant. PI AF does not evaluate that attribute value again, unless you update the data reference.