AnsweredAssumed Answered

reading all data in a time interval using sdk

Question asked by jramirez on Jan 23, 2015
Latest reply on Jan 26, 2015 by dng

HI:

 

I am in need to read all the data from a point in a time interval, I am using this piece of code of the AF SDK:

 

                'Connect to PI

                Pi.Connect(ID)

 

 

                'Get Default Database   

                dB = Pi.Databases.DefaultDatabase

 

 

                ' Create the Attribute

                Dim myAttribute = New AFAttribute(dB)

                myAttribute.Type = GetType(Double)

                myAttribute.DataReferencePlugIn = AFDataReference.GetPIPointDataReference(Pi)

 

 

                'Get Values in Time Range for Selected Tag

                myAttribute.Name = Get_Tag

                myAttribute.ConfigString = "\\%Server%\" & Get_Tag

                ' Read each Value of the Attribute during the Time Range

                Dim Data_Values As AFValues = myAttribute.GetValues(myTimeRange, 100, Nothing)

 

I am getting data back from the server, but the amount of data values is not the same that I see when checking the archive editor in SMT for the same time interval....Any ideas?

 

Jaime

Outcomes