I am trying to use InterpolatedValues2. The function call seems to work and I get the correct number of values back but all of the values are the same. The values are clearly changing over time. Here is the code snippet. Am I missing something obvious? I am just trying to get 1hr values over a specific time frame.
Period = "1h"
StartDate = "01-MAR-17 12:06:33"
EndDate = "21-MAR-17 12:06:33"
Set ppoint = server.PIPoints.Item(tagnm)
Set pdata = ppoint.Data
Set ipdata2 = pdata
Set pvalues = ipdata2.InterpolatedValues2(StartDate, EndDate, Period)
For j = 1 To pvalues.Count
ArrayRecords(i, j) = pvalues(i).value