Hi,
I can pull a tag history from the edge historian using script (system.tag.queryTagHistory()). This works fine in the Script Console but I can't seem to get a value (other than zero) when I run the same script in either a gateway scoped script, or even in a binding in Perspective.
Is there some limitation on using system.tag.queryTagHistory() in Edge?
Sample code that works in Designer but only gives zero else where:
path = "[Edge Historian]rio/crc_t_1"
start_date = system.date.parse("29/12/2024 0:00", "dd/MM/yyyy hh:mm")
end_date = system.date.parse("1/1/2025 0:00", "dd/MM/yyyy hh:mm")
v_avg = system.tag.queryTagHistory(paths=[path], startDate=start_date, endDate=end_date, aggregationMode="Average", returnSize=1)
v_avg = v_avg.getValueAt(0,1)
A print(v_avg) in designer gives me 51.212...... where as in gateway event I get 0 ??
Thanks for your insights.