Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

ValueState retrieval query 1: minimum time in state

ValueState retrieval query 1: minimum time in state

  • Last UpdatedFeb 06, 2025
  • 1 minute read

The following query finds the minimum time-in-state for the SteamValve discrete tag. Note that minimum times are returned for each state for both the five-minute phantom cycle before the query start time and for the single retrieval cycle between 10:00 and 10:05.

SELECT DateTime, TagName, vValue, StateTime, wwStateCalc FROM History

WHERE TagName IN ('SteamValve')

AND DateTime >= '2005-04-17 10:00:00'

AND DateTime <= '2005-04-17 10:05:00'

AND wwCycleCount = 1

AND wwRetrievalMode = 'ValueState'

AND wwStateCalc = 'Min'

The results are:

DateTime

TagName

vValue

StateTime

wwStateCalc

2005-04-17 10:00:00.000

SteamValve

0

35359.0

MINIMUM

2005-04-17 10:00:00.000

SteamValve

1

43749.0

MINIMUM

2005-04-17 10:05:00.000

SteamValve

0

37887.0

MINIMUM

2005-04-17 10:05:00.000

SteamValve

1

43749.0

MINIMUM

TitleResults for “How to create a CRG?”Also Available in