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

AVEVA™ Historian

Retrieve time in state

  • Last UpdatedMar 05, 2025
  • 4 minute read

Note: The Time in State query only applies to Discrete or String tags. Analog tags are not supported.

To retrieve time in state values:

  1. Select Time In State from the AVEVA Historian add-in menu. If the add-in is already displayed, you can also select Time In State from the hamburger menu Hamburger menu button. The AVEVA Historian add-in panel displays.

    Workbook showing Time in State sidebar.

  2. To choose the list of tags to retrieve information for, click Up arrow button beside the Tags field, and select a range of cells containing a list of tag names.

  3. Click Up arrow button beside the Results field, and select the cell where you want to insert the results.

  4. Select Down to list the results in rows by tag name, or Across to list the results in columns by tag name.

  5. You can choose the Time to retrieve the tag values for in two ways:

    1. Select Time selection, and choose a time value from the drop-down list.

    2. Select Cell reference, and choose cells in your spreadsheet containing datetime values for the start and end time.

  6. Select the time Interval over which to retrieve values.

  7. Click NEXT. The next page of the add-in displays.

    Workbook showing next page of Time in State sidebar.

  8. Select which Values to include for each tag. You can choose to include any combination of:

    • Count - The number of values occurring within the time interval.

    • Minimum Time (split) - The minimum time spent in this state for the tag over the time interval, including occurrences that only fall partially within the interval.

    • Minimum Time (complete) - The minimum time spent in state for the tag over the time interval, excluding occurrences that do not fall completely within the interval.

    • Maximum Time (split) - The maximum time spent in state for the tag over the time interval, including occurrences that only fall partially within the interval.

    • Maximum Time (complete) - The maximum time spent in state for the tag over the time interval, excluding occurrences that do not fall completely within the interval.

    • Average Time (split) - The average time spent in state for the tag over the time interval, including occurrences that only fall partially within the interval.

    • Average Time (complete) - The average time spent in state for the tag over the time interval, excluding occurrences that do not fall completely within the interval.

    • Total Time (split) - The total time spent in state for the tag over the time interval, including occurrences that only fall partially within the interval.

    • Total Time (complete) - The total time spent in state for the tag over the time interval, excluding occurrences that do not fall completely within the interval.

    • Percent (split) - The percentage of the total time spent in state for the tag over the time interval, including occurrences that only fall partially within the interval.

    • Percent (complete) - The percentage of the total time spent in state for the tag over the time interval, excluding occurrences that do not fall completely within the interval.

  9. Select whether to display Discrete Values in Label format, Numeric format, or Boolean format.

    Note: A discrete tag has two states, and these tags can have labels associated with the two states. For example, for a tag representing a valve's position, the Label values might be "Open" or "Closed", the Numeric values are 0 or 1, and the Boolean values are True or False.

  10. Select which Details to retrieve along with the values for the selected tags. You can choose to include any combination of Start Date Time, End Date Time, OPC Quality, Interpolation Type, and Resolution.

  11. If there are discrete tags in the list, the Filter option is available.

    You can use this option to filter your results, based on the selected format for displaying discrete values.

    1. Turn on the Filter by activating the toggle switch Filter toggle switch.

    2. A list of state filter options displays below the toggle switch when it is activated. The items in the list are dependent on the selected Discrete Values format:

      • Label - All labels for the selected discrete tags are available to choose from.

      • Numeric - The values 0 and 1 are available.

      • Boolean - True and False values are available.

    3. Select the state values from the filter list that you want to include in your results. Any state values not selected are filtered from the results. For example, for a tag representing a valve's position, you may not want both Open and Closed states included in your report, since you can infer the time spent in one state from the time spent in the other.

  12. Select whether to sort the data in Ascending or Descending order.

  13. Click FINISH. The selected tag information is retrieved and copied to your spreadsheet.

    Workbook showing final Time in State retrieval.

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