My C++ application was build using PI API and it used to work with PI Server.
Recently, we tried using that application against PI Collective setup and it failed to connect.
Does PI API support connecting to PI Collective Setup?
Using PI API, you can connect to a single PI Data Archive. So you should to establish a connection to the primary and another one to the secondary. However, the API connection will not recognize that the servers are members of the same collective.
Does this answer your question? Are you able to connect to any member of the PI Data Archive Collective?
If you really want to take advantage of all new features of the PI System programmatically, we recommend using PI AF SDK instead of PI API.
My application is designed and capable to connect to only to One PI server at a time. We are trying to access it and see how it behaves with PI Collective setup. Usually we use to give the PI Server node name/IP address to connect. In the PI Collective case, we are trying to connect by using the PI Collective name. Is that the right way to approach? I just want to know if there a way around using PI API.
I know it is easily achievable with PI AF SDK. But don't want to end up re-writing my application which is already build based on PI API.
Please suggest your opinion on how to make my application work with PI collective using PI API.
The PI API has no awareness of collectives, so if you want to stick to using the PI API you will have to implement the logic yourself.
You need to use the PI Server name(s) to connect. Not the collective name. We do have PI interfaces that use PI API, and sending data to a collective is managed by the PI Buffer Subsystem.
If you can (and are willing to) add Managed C++ to your project, you could use AFSDK with the C++ language as stated here.
Hope this helps,
OK. Now it is clear that PI API doesn't support connecting to PI Collective system.
Our project management team is reluctant in converting our project to Managed C++/.Net so I cannot go with AF SDK here for now.
Can I Use PI SDK here, as part of my application already uses PI SDK and those calls are working good against PI Collective setup. I have to retrieve the data from few PI Points from PI Collective system. So can I use PI SDK to achieve the same?
PI SDK will work with collectives and could be a solution in your situation. However please make sure to understand that the PI SDK as it is now considered deprecated . So you should not expect any new features coming into this technology.
If in the future you expect to have a need to access to things such as Event Frames, AF Elements, AF Attributes, Notifications, etc.; you should really consider creating a Data Access Layer for you application based on the AF SDK to leverage all the options of the PI System. AF SDK offers a complete access to all the PI System ( PI Data archive included).
I hope this answers your question.
Thank you for your clarification.
I will go with implementing the data retrieval calls (to read Data from PI System) using PI SDK. I have to replace my existing PI API Data retrieval calls with PI SDK calls.
It would be great if you could refer me the optimal Data retrieval calls available with PI SDK. Even a sample code would really help.
We have published the Optimizing your PI SDK Applications in 2011. I think this is a great material for you to refer to.
But again, as you will have to rewrite your application, this is a perfect time to choose PI AF SDK instead PI SDK. PI AF SDK provides more functionality and better performance. It is very likely that in a few years, you will find a good reason to rewrite your application from PI SDK to PI AF SDK.
Developing with PI SDK and PI AF SDK is very similar. Please download the vCampus Live 2013 Hands-on labs and take a look at the "Migrating from PI SDK to AF SDK" document.
Hope it helps!
Retrieving data ...