Calling values from Tag_calc & Tag_history query into script

Hi everyone,

In my report, I have set up a tag calculation query data source 'Calc_Cold' that gets basic average, min, max, stddev for one specific tag. I have another data source that is a tag history query, this retrieves the LSL and USL values with a 'closest value' aggregation mode. Both queries have the same dynamic start and end range.

I am trying to write a script data source that returns two data keys 'Cp' and 'CpK'. How can I retrieve the avg, stddev, LSL and USL values from these data sources and do my calculations in the script?

Thank you

You can access the data from data sources above the script data source in the data sources list via the data map.

calcCold = data['Calc_Cold']

You can read about that in the manual:

1 Like