You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python version: 2.7.13 |Anaconda custom (32-bit)| (default, May 11 2017, 14:07:41) [MSC v.1500 32 bit (Intel)]
Operating System: Windows 10 Enterprise x64
Description
Tried to get interpolated values for a long period (years) with high interval (minutes). System gives a runetime error
What I Did
start = "01-01-2014"
eind = "13-03-2018"
interval = '2m'
for item in lijst:
with PI.PIServer() as server:
tags = server.search(item)
for tag in tags:
data = tag.interpolated_values(start, eind, interval)
data.to_csv(tag.tag + ".csv")
PITimeoutException: [-10722] PINET: Timeout on PI RPC or System Call.
bij OSIsoft.AF.PI.PIException.ConvertAndThrowException(PIServer piServer, Exception ex, String message)
bij OSIsoft.AF.PI.PIPoint.InterpolatedValuesByCount(AFTimeRange timeRange, Int32 numberOfValues, String filterExpression, Boolean includeFilteredValues)
bij OSIsoft.AF.PI.PIPoint.InterpolatedValues(AFTimeRange timeRange, AFTimeSpan interval, String filterExpression, Boolean includeFilteredValues)
The text was updated successfully, but these errors were encountered:
Thanks for your report. I think this can be solved by extending the OperationTimeout, I'll try to add it as an option to the PI.PIServer() constructor.
@Hugovdberg I was wondering if you could provide some hints or a bit more guidance on this and I can try to add the option myself. I am facing the same issue.
The PIServer object has an attribute connection which is an AF.PI.PIServer() object. This itself has a property ConnectionInfo.OperationTimeOut which is a System.TimeSpan object containing the maximum time an operation can take. To override this I think you could do something similar to the following for now:
To implement this in PIconnect, an extra argument could be added to the PIserver.__init__ method to which sets the property on initialisation. This is necessary because once connected (as inside the context manager) the ConnectionInfo is read only.
Description
Tried to get interpolated values for a long period (years) with high interval (minutes). System gives a runetime error
What I Did
The text was updated successfully, but these errors were encountered: