I need some on help get the maximum value of tag when a boolean tag is true at specific time range.
What I have is a pump with two tags:
1 - Pump/Pressure
2 - Pump/Run
I want to get the minimum value of Pump/Pressure when Pump/Run = True.
Because I use ignition historian using name query is really hard and system.tag.queryTagCalculations is much easier here but for case I don’t have any idea how use it.
The tag historian doesn’t really do relationships between tags. You’ll have to script this with two queries: one with the boolean to find the relevant times, and then one for each time span with the process calculation.
Or you can use the correct tool: a transaction group that records multiple items together, letting you easily construct queries that depend on relationships/conditions between columns. In a simple case like this, you could even not record at all while Run is false.
(This sort of stuff is why I hardly ever use the tag historian.)