I wrote a Python Script to extract some data from a PI server using the PISDK and the Dispatch module from win32com.client.dynamic library. It works perfectly but when I put this script to run as a windows services I am getting an error using the PIPoints method. The error message I receive is this one.
(-2147352567, 'Exception occurred.', (0, 'PISDK', None, 'pisdk.chm', 0, -2147467262), None)
To put the application to work I created a scheduled task in window to run the script. This is working fine.
Does any one have experience with this kind of implementation?
Regards,
I manage to solve the problem by using the PIconnect python module. You can find more about it in the link below.
PIconnect documentation — PIconnect 0.7.1 documentation
The only detail is that you need to start the service with a user allowed to access the PI servers. If you start the service with Local System it gives a error.
Regards,
Leandro