I am reporting a Max daily value of OPC analog tag. I would like to know how to report the max value of this tag only when it is operating not in backwash mode.
How are you determining when the tag is in backwash mode? Is there an additional tag that shows the state?
You could run a Gateway tag change event that will check the mode and see if the latest value is higher than the current stored 'highest' value. If the new value is higher, overwrite the stored value.
If you are trying to report this off historical data, then you'll need to write a script to determine 'windows' of time in the historical data to omit from the dataset based off the recorded mode. After removing said windows of time, you can utilize system.math.max to give you the largest value.