Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

Override DefaultServer property in PI SDK call

$
0
0

Hello All,

 

Good Day!

 

I am trying to fetch data from PI tag using some PI-SDK functions in one of our .Net application (in C#).

 

I have used Servers.DefaultServer property to get all connection configuration (user name, password, server name etc). This works fine, however, it is getting limited to the type of default server configuration in PI-SDK where the application is hosted.

 

I want to use a specific PI server (e.g. ServerXX) even if the PI-SDK configuration has a default server as ServerYY.

 

Code sample-

 

var mysdk = new PISDK.PISDK();

Server objServer = mysdk.Servers.DefaultServer;

PIPoints objPiPoint = null;

PIPoint snapPoint = null;

objPiPoint = objServer.PIPoints;

snapPoint = objPiPoint[strPiTagName];

 

Please let me know for any details required.

 

Thanks,

Souvik


Viewing all articles
Browse latest Browse all 1120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>