I am using PI Module Database to define plant sensor attribute. Can anyone direct me to C# code examples detailing how to access the PI Module Database programmatically or suggest an alternative approach.
Have you considered using PI AF as a storage of these plant sensor attribute? Or have you considered using PI AF but decided to stick to Module Database (MDB) for some reasons?
The reason for this question is because PI AF can be used to store the same information but is more scalable and extensible compared to MDB. Not to mentioned PI AF has a wide range of search methods that allows you to get the required information faster. You would be able to use AF SDK to access these information from PI AF programmatically.
It is possible to access MDB information using PI SDK, but just want to make sure that you have consider the better alternative before going down this route.
Many thanks for your reply Han Yong, it is appreciated. I had not considered AF as an alternative but it does appear to be a viable method to meeting the requirements of the aplication I am currently scoping. I will review the available documentation on AF.
That's great. There are some short videos on PI AF available on our OSIsoft Youtube Learning Channel that would probably be helpful to you, like this one. These should help you to learn about PI AF.
Han Yong is 100% right: you should look into the PI Asset Framework (AF) for this. Not only is PI AF some sort of "PI MDB on steroids", it is also the foundation for a growing list of PI System components and capabilities. Also, there are no further development plans around PI MDB; as a matter of fact, PI Server 2010 (3.4.385) which was released 04-Aug-2010, features the PI AF Link Subsystem whose primary function is to keep both MDB and AF synchronized. This way, what customers created in MDB beforehand remains available for more recent, AF-based clients.
Many thanks for your comments Steve. The discussion revolves around the use of PI-MDB or PI-AF programmatically from a C# application. Having discussed this with the client, one concern raised was the need for Microsoft SQL-Server with AF. Does this create an additional burder for the PI system administrator? I can envisage a situation where PI is running but SQL-Server, for whatever reason, is not available. Am I correct in assuming that I cannot now query or update AF but could stillo make queries or updates programmatically to PI-MDB?
Dr Nicholas MatchamAm I correct in assuming that I cannot now query or update AF but could still make queries or updates programmatically to PI-MDB?
I think that you can sill use PI SDK to have deal with MDB, but I doesn't recommend this strictly. It's COM-based techique, and in case you'll write .NET-based application, you'll encounter at least Interop overhead and (maybe) some promblems with performance too.
Sorry, I wanted to comment on the C# programmability question but I forgot. Both the PI MDB and PI AF are accessible via C# using the PI SDK and the AF SDK, respectively. As Sergey pointed out, the PI SDK is based on COM-based technologies and, combined with the not-so-efficient nature of the PI MDB, doesn't make for the best performance.
Regarding your comments about PI AF requiring SQL Server, I am afraid this is a reality your client will have to face: starting with PI Server 2010 (2+ years ago) PI AF is a core (and hence mandatory) part of the PI Server installation, which means SQL Server is required. The good news is, SQL Server Express Edition (which is free) is sufficient for systems with few users and reasonably low usage of the PI Asset Framework. You can even get it directly from our Technical Support Download Center.
Please consult the "PI Server 2012 Installation and Upgrade Guide" for more information, and feel free to contact our regular Technical Support if you need assistance with installation/configuration topics.
Many thanks to you all for the advice and information provided. Having considered this, it is apparent that PI AF is the obvious technology to use. I have been reviewing the videos detailed by Han and have downloaded some documentation. I will now considered this discussion as concluded.
Thank you for your comments Sergey.
Retrieving data ...