AnsweredAssumed Answered

Get time series from RecordedValues

Question asked by Philipp_Gattig on Sep 6, 2019
Latest reply on Sep 10, 2019 by jyi


i use Python to access data in the PI system. This also works fine with the method "RecordedValue".
If I want to download a whole series of data I use the function "RecordedValues". Unfortunately I am not able to display this data.
If I use the function "Count", many entries are displayed - but with the function "GetValueArrays" I only get empty Arryas. What am I doing wrong? See my code below:


knownSystems = PISystems()
piSys = knownSystems["xx"]


time1 = "01.09.2018 12:00:00"
time2 = "06.09.2018 12:00:00"

nowTime = AFTimeRange(time1, time2)

l = ["\\xx1", "\\xx2"]



aa = np.array([])
bb = np.array([])
cc = np.array([])

for ll in range(0,len(l)):

      bm = AFAttribute.FindAttribute(l[ll], piSys)

      snapshot = bm.Data.RecordedValues(nowTime, AFBoundaryType.Inside, None, None, False)




I'm grateful for every help I can get. Probably it's not that difficult either.