This article from InSource shows how the use the value state (time in state) retrieval mode using the Wonderware Historian Client (also showing the MSSQL).
- Author: Lewis Talley
- Published: 03/08/2018
- Applies to: Historian 9.0+
What is value state retrieval ? (taken from the Historian Docs)
ValueState retrieval returns information on how long a tag has been in
a particular value state during each retrieval cycle. That is, a
time-in-state calculation is applied to the tag value.
This retrieval mode is useful for determining how long a machine has
been running or stopped, how much time a process spent in a
particular state, how long a valve has been open or closed, and so on.
For example, you might have a steam valve that releases steam into a
reactor, and you want to know the average amount of time the valve
was in the open position during the last hour. ValueState retrieval can
return the shortest, longest, average, or total time a tag spent in a
state, or the time spent in a state as a percentage of the total cycle
Using the Historian client makes this task super easy as it becomes one of the options when selecting data..
First we will select a tag and set the retrieval mode to "ValueState"
Next set the options depending on what you are trying to do. In my case I am trying to understand the percentage of the Agitator was running (and not) over a 12 hour period.
You should now be able to select the data tab at the bottom to see the data values (note you may have to turn on the state time column in the display - click columns tab)
We can even treat other data types as discretes to allow us to answer other types of questions. In my next example I wondered what percentage of time my level transmitter was reading above 22. We perform a transformation on the data to "Convert analog values to discrete". We can see from below that my level was above 22 78% of the time!