Hi,
I have a tag history provider set using the Internal Historian, and it seems to be logging:
Test code:
def browse(path=''):
for result in system.tag.browseHistoricalTags(path).getResults():
print result.getPath()
if result.hasChildren():
browse(result.getPath())
browse()
endTime = system.date.now()
startTime = system.date.addSeconds(endTime, -30)
data = system.dataset.toPyDataSet(system.tag.queryTagHistory( paths=['histprov:Historian:/drv:default:/tag:testhistory'], \
startDate=startTime, \
endDate=endTime, \
returnSize=10, \
aggregationMode="Average", \
returnFormat='Wide'))
for row in data:
print 'dt=' + str(row[0]) + ', value=' + str(row[1])
Results:
histprov:Historian
histprov:Historian:/drv:default
histprov:Historian:/drv:default:/tag:testhistory
dt=Mon Aug 17 15:22:51 CAT 2020, value=52.2655885295
dt=Mon Aug 17 15:22:54 CAT 2020, value=55.2635878626
dt=Mon Aug 17 15:22:57 CAT 2020, value=53.0305101701
dt=Mon Aug 17 15:23:00 CAT 2020, value=1.26125375125
dt=Mon Aug 17 15:23:03 CAT 2020, value=4.26025341781
...
I cannot seem to get the Tag History binding to return any values:
The above gives the following issue in tags.history.InternalHistorian.Query
Is there a different tag path syntax one must use?
Thanks,
Deon