Roger Palmen

When exactly are PI Point references resolved?

Discussion created by Roger Palmen on Jun 12, 2014
Latest reply on Jun 17, 2014 by jking

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.
Now let's start playing:
  • 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. 

 

 

This 1) appears to me there are some minor inconsistencies in the handling of the configstring and 2) i'm unsure when a substitution value is resolved, when the PointID is written back to the AF server, what actions trigger a refresh of the substitution parameters & PointID. Documentation does not really explain in detail how this works.
Anybody able to shine some light on this? 
Using 32bit PSE2014 (2.6.0.5843) against a AFserver 2.5.0.5039.
I did find this great post, that shows the (did not now!) hidden feature to shift-click to show the parsed / un-parsed configstring: http://vcampus.osisoft.com/discussion_hall/Development_with_OSIsoft_SDKs/f/28/p/4267/22670.aspx#22670
too bad it does not show if the attribute is resolved, and what the PI PointID is if resolved.

Outcomes