AnsweredAssumed Answered

Connecting to PI Server Through Python

Question asked by BriJo on Feb 16, 2017
Latest reply on Feb 16, 2017 by cvillanua

Hi,

 

I'm running PI-SDK and trying to optimize the way my code connects to the server to pull data through a Python Script.

 

One method I have is:

         
            pisdk = w32lc.Dispatch('PISDK.PISDK')
            server = pisdk.Server('SERVER')
            con = w32lc.Dispatch('PISDKDlg.Connections')
            con.Login(server, '', '', 1, 0)
            point = server.PIPoints(pi_tag)

Another Method:

point = pisdk.Servers.Item('SERVER').PIPoints(pi_tag)

 


The 2nd method seems to be going slower. Just wondering if anyone knows of a faster way to establish connection to the server as I am processing many points and need to optimise the speed.

 

Any help would be appreciated or pointing in the direction of documentation which explains this.

 

Cheers.

Outcomes