I am trying to use TagMax to determine when two tags evaluated with an expression are at a maximum. Essentially, I have one data point that is Real Power and another that is Reactive Power and I would like to calculate the Apparent Power and determine when it was at a maximum over a specified historical period. Apparent Power = SQRT [(Real Power)^2 + (Reactive Power)^2].
Here is the formula that I would like to use but throws an error:
TagMax(Sqr('TAG1'^2+'TAG2'^2),' 01-Jan-09', '10-Sep-14')
I can plot Sqr('TAG1'^2+'TAG2'^2) over time in Excel and determine when this is a maximum, but for simplicity I would like to evaluate this in a PI ProcessBook using the Define Value function.