kqin

Retriving PI Point Data for use in Custom AF Data Reference

Discussion created by kqin on Nov 12, 2011
Latest reply on Nov 14, 2011 by cmanhard

Is there a way to use the PI Point Data Reference programmatically using AF SDK?

 

For instance, I am writing a custom AF DR GetValues method, and part of the code requires that I retrieve a PIPoint archive value (the tagname, timestamp is generated programmatically by other portions of the GetValues code). The way I envisioned, is to create a "dynamic" PIPoint datareference utility object", pass it some input (tagname and timestamp), use it to get the data that I need and destroy it at the end of the method. I intend to do this without creating any additional Attributes in my AF database to do this (because the tagname and timestamps are generated dynamically and there are too many combinations that makes it impractical to create statically-defined PIPoint Attributes in my AF Database). Can this be done? How can I do this?

 

I know I can just use the PI SDK to do functionally the same thing (feed it tagname, timestamp and get a value), however, in that way I have to create a PISDK object, make and destroy a PISDK connection every time the GetValues executes, and that's very time consuming.

 

What is a "best practice"?

 

Thanks very much.

 

Kent

Outcomes