Good morning everyone,
I’ve recently been stumped by a problem and I am hoping someone else can offer me some insight into it.
I have a database which stores all my analog values. I need to pull the minimum and maximum from those values for given times. I have attached a .csv file with the actual values in the database for reference.
My problem is I am trying to get the minimum and maximum value for the Well Pump 1 Hours column between 10/22 6:00am and 10/23 6:00am. To do this I use the function system.tag.queryTagCalculation like this:
tagPaths = ['Well Pump 1/Words/H_TOTAL'] calcs = ['Minimum', 'Maximum', 'Range'] startTime = event.source.parent.getComponent('Date Range').startDate endTime = event.source.parent.getComponent('Date Range').endDate event.source.parent.getComponent('Table').data = system.tag.queryTagCalculations(paths=tagPaths, calculations=calcs,startDate=startTime,endDate=endTime)
However the query returns 973.0 as the minimum instead of the expected 969.69. When I do a tag historian query using the same start and end time I get the attached CSV file.
KM_Data_2019-10-20.csv (37.8 KB)