Just updated from 8.0 to 8.1 and have an issue now with a script that creates a trend for some motors. I have tried to add in different ‘value’ items, but still receive the same error message.
Any help is appreciated.
def transform(self, value, quality, timestamp):
paths = [path.value for path in value.historyParameters.paths.value]
columnNames = [columnName.value for columnName in value.historyParameters.columnNames.value]
for pen in self.view.custom.pens:
axisName = pen['axis']
penAxis = None
for i in range(len(self.view.custome.axes)):
axis = self.view.custom.axes[i]
if axis['name'] == axisName:
penAxis = i
break
if penAxis is not None and self.view.custom.axes[penAxis]['autoRange']:
try:
max = system.tag.queryTagHistory(paths=[pen['path']], startDate=value.startDate, endDate=value.endDate, returnSize=1, aggregationMode='Maximum')
upperBound = max.getValueAt(0,1)
self.view.custom.axes[i]['upperBound'] = upperBound + (1 if upperBound > 0 else -1)
min = system.tag.queryTagHistory(paths=[pen['path']], startDate=value.startDate, endDate=value.endDate, returnSize=1, aggregationMode='Minimum')
lowerBound = max.getValueAt(0,1)
self.view.custom.axes[i]['lowerBound'] = lowerBound + (1 if lowerBound > 0 else -1)
except:
pass
return system.tag.queryTagHistory(paths=paths, columnNames=columnNames, startDate=value.startDate, endDate=value.endDate, returnSize=300, aggregationMode='MinMax')