12 Replies Latest reply on Oct 6, 2014 9:41 PM by tajuzma

# How PI data is retrieved for some PI products

I wanted to get some understanding on how some PI products retrieves data for points from the PI Server (e.g: make use of the servername/serverid, tagname/pointid).

The following is the observation made:

ProcessBook:  Retrieves the data information via PI Server name and by default uses point id unless PB2Tagresolution is set to true. Does processbook uses PI API or PI SDK to retrieve information from the server?

Datalink: Retrieves the data via PI Server ID and uses the tagname or pointid specified in the spreadsheet.  Also noticed that since the upgrade of PI SDK 2010 R2, unable to retrieve data from PI Servers with similar server ids and gives an error message 'Confirmed server entry with duplicate Server ID already exists.'  Does Datalink uses PI API or PI SDK to retrieve information from the PI Server?

PI SDK: Retrieves the data using PI Server ID.  Uses the tag name or pointid specified in the search.

PI AF (PI System Explorer):  A configuration string is specified for each attribute mapped to a pi tag (\\servername?serverid\tagame?pointid).  So far I have noticed since the PI SDK upgrade to 2010 R2 and later, the values are retrived using serverid and pointid.

If anyone knows, please feel free to provide feedback and let me know if the above observation is correct.

Thanks,

Uzma

• ###### Re: How PI data is retrieved for some PI products

Hello Uzma,

PI ProcessBook and PI DataLink uses PI SDK in order to connect to the PI Server and PI AF SDK to connect to the AF Server. I am not sure if PI DataLink 2014 will use PI SDK for the first task since PI AF SDK has a newer technology and a better performance compared to PI SDK. Therefore, from my understanding, those client applications should use PI AF SDK instead of PI SDK as the PI System access to connect to the PI Server on their future releases.

PI ProcessBook and PI DataLink creates PIPoint objects from the PI SDK library in order to retrieve data from the PI Server. So I guess your question would be what information is stored on the displays and spreadsheets in order to retrieve data? The simple answer would be PointiD for the PI ProcessBook and PI Point name for the PI DataLink.

Concerning the PI Server and AF Server, the PI SDK and PI AF SDK uses the host name, IP or FQDN to connect to the PI Server or AF Server. Then, it tries to update the ID stored on the known table list in case it is different from the one sent by the server. The ServerID of the PI Server is not used as a “Primary Key” when connecting to it.

Hope this helps you!

• ###### Re: How PI data is retrieved for some PI products

Thank you for response.

One particular question regarding PI AF (PI System Explorer) retrieval for values from PI Server.

The attributes which mapped to the pi tag have configstring as follows \\servername?serverid\tagame?pointid.

Does anyone know the precedence it follows between tagname and pointid when the value for the tag is retrieved?  If there is a setting which lets to choose the preference, that would be great.

Thanks, Uzma

• ###### Re: How PI data is retrieved for some PI products

In AF 2014, the PointID is preferred, previous to that, Tagname is preferred.  This is for the .NET 4 version of the AF SDK.  The .NET 3.5 version of the AF SDK continues to use PI SDK to retrieve data with the PI Data Archive so the behavior is governed by PI SDK.

As to your original question, in general, the behavior depends on the data access method the application uses.  To complicate matter, some of our applications use a combination of data access methods to gather data - an example would be PI Coresight, so it's not so simple to answer your questions :-).  So if you have specific questions, please post and we'll get back to you.

• ###### Re: How PI data is retrieved for some PI products

I forgot to ask, what are you trying to do?

• ###### Re: How PI data is retrieved for some PI products

Hello Steve,

We have two PI servers which have similar tag names but point ids are different since these are random numbers generated when pi points are created. We have PI AF tree, with attributes mapping to the pi points via tag name.  And this same PI AF tree is used to retrieve data from both the PI servers.  It worked good, until  with the new SDK upgrade to 2010 R2 and above, we are noticing that attributes are mapped to wrong tags for one of the PI servers. This is seen in PI System Explorer/PI AF.  And also you have mentioned earlier, the data is retrieved from PI using the pointid instead of the tag name for the configstring which is set to this - \\servername?serverid\tagame?pointid for the AF attributes.

Is there any configuration setting either in PI SDK, AF SDK, and PI System Explorer, to allow the application to use tagname rather than the pointid, if both are provided similar to the PI AF tree attribute configuration?

Thanks,

Uzma

• ###### Re: How PI data is retrieved for some PI products

FYI, Steve should have said, beginning in AF 2012 (2.5) the tag id is preferred.

However, in both cases, the tag id is only used if the PI Server ID stored in the configuration string matches the server connected to.  So, in your case, unless both your server's have the same ID, you should not see an issue.

You can generally correct issues by importing and exporting attributes through PI Builder (note that there is a setting option in PI Builder which allows you to see the saved IDs (Show simplified configuration strings).  If you have a use case which forces you to switch servers for the same attribute, then adding ;SaveIDs=false to the pi point configuration string will eliminate the use of tag id's for the specified point.

• ###### Re: How PI data is retrieved for some PI products

Chris

Great!. The SaveIDs=false, works as expected, and eliminates the use of pointid's for the specified point.

Can I set the SaveIDs=false by default, so for all new attributes created, it will take this configuration, and we do not have to specify it explicitly?

Thanks,

Uzma

• ###### Re: How PI data is retrieved for some PI products

There is not a way to have this done automatically.

• ###### Re: How PI data is retrieved for some PI products

If you add this string on the config string of your attribute template, you should save a lot of time. PI Builder is also a good alternative to help you automate this process.

• ###### Re: How PI data is retrieved for some PI products

Yes, I will move forward with PI AF Builder to automate this.

Does anyone know of any kind of similar setting with ACE?  We are running into the same issue of retrieving data by pointid for Aliases defined in PI MDB, which are used by custom ACE modules.

Thanks

• ###### Re: How PI data is retrieved for some PI products

Hello Uzma,

To my knowledge PI ACE is using the MDB path but inside MDB the point ID is used for the reference to a PI Tag. This said, the issue you are describing could only exist when moving an ACE calculation to a 'foreign' PI System and MDB Aliases pointing to other PI Tags or if your ACE calculations are directly referring PI Tags what I wouldn't recommend at all. Referencing PI Tags directly instead of MDB Aliases pointing to PI Tags means you are waiving one of the big advantages of PI ACE which allows you to apply existing modules to another MDB context.

Whatever the issue really is, you should be able to edit the context for a registered Module in PI ACE Manager

• ###### Re: How PI data is retrieved for some PI products

Hello,

Opening the thread again, as running into issue with viewing processbook displays in Coresight.

As mentioned earlier in this thread, we have two PI servers which have similar tag names but point ids are different since these are random numbers generated when pi points are created. We have PI ProcessBook display, with symbols mapping to the pi points via tag name.  And these displays are used to retrieve data from both PI Servers.  These displays are working well with clients using ProcessBook as we are using PB2TagResolution =1 (setting in procbook.ini) to retrieve data using tag names rather than pointID.

Now, we are testing PI Coresight 2014.  I am running into an issue, when I bring up the processbook displays created earlier in Coresight website, I get all data mapped to incorrect tags, tags mapped with pointID rather than tag name.

Would anyone know if there is a similar setting in Coresight which would resolve the issue?

Thanks,

Uzma