hi,
I am trying to do some scripting, but I am totally out of my depth. I have a tag, [default]_25_FI_110X_Total, and I need to get the average of the last 3 days for just the first three hours of the day, 0000-0300.
I think this works for today 0000-0300 but I have no idea how to do multiple time periods to get data for all three days, if that can even be done. Do I need to do three separate functions and then average those three numbers?
here is what I have for today’s time period:
paths = ['[default]_25_FI_110X_Total']
startDate = system.date.midnight(system.date.now())
endDate = system.date.addHours(startDate, 3)
dataSet=system.tag.queryTagHistory(paths=paths, startDate=startDate, endDate=endDate, aggregationMode = 'SimpleAverage', intervalMinutes = 1, returnFormat='Wide')
return dataSet