AnsweredAssumed Answered

PIPoint.RecordedValue is timing out ([-10010] PI System Timed Out)

Question asked by Hans_Drost on Feb 6, 2017
Latest reply on Feb 9, 2017 by Guilherme Ferreira

Hi all,


I am trying to get the PIPoint.RecordedValue to work. Yet it keeps giving me a timeout ([-10010] PI System Timed Out).

Currently I am trying out the following code in C# with the AFSDK:

            var AFServer = new PISystems().DefaultPISystem;
            var AFDB = AFServer.Databases.DefaultDatabase;
            var piservers = new PIServers();
            var piServer = piservers.DefaultPIServer;
            var point = PIPoint.FindPIPoint(piServer, "Sinusoid");
            var time = point.RecordedValue(DateTime.UtcNow, OSIsoft.AF.Data.AFRetrievalMode.AtOrBefore);


The timeout is given at line 6. This seems very weird to me since the values are available in SMT.

Can anyone give me a better understanding of what I am doing wrong?


Also, the reason why I am trying to get the value is because I need the DateTime when the current value has been inserted into the archive.

If anyone knows a better way then I am open to it.


Kind regards,


Hans Drost