Querying Calculated Data

About this task

Querying Calculated Data retrieves data that is the result of performing specified calculations on raw data values in the archive.
Note: If you attempt to perform a calculated data query with two worksheets open, the Excel Add-In may become unstable and lock up. This is a known Microsoft Excel issue. To avoid locking up Excel while performing queries with the Excel Add-In, work with only one Excel document at a time.

Procedure

  1. Select Query Calculated Data from the Historian menu.
    The Historian Calculated Data Query window appears.
  2. Select a server from the drop-down list. If you do not specify a server, the Add-In queries the default server.
    To set the selected server as default, ensure the Set Server to Default option is enabled
  3. Select a tag or group of tags on your worksheet or enter the tag names manually separating each name by a colon (:).
    Note: If your tag name has a colon within it, then you should select the tag names via cell references only.
    Optionally, you can select the tags from the Advance Tag Search window. For more information, refer to Searching a Tag Using Advance Search Criteria topic.
  4. In the Query Time section, enter values of time in the Start Time and End Time fields.
    You can also use relative time entries to this field. For more information, refer to Relative Time Entries.
  5. In the Query Criteria String, enter the query criteria along with the # symbol.
    For example, if the query criteria string is to retrieve only good data quality values, then you should specify #ONLYGOOD as the Query Criteria String. See Query Modifiers.
  6. In the Sampling Type section, select a type from the drop-down list.
    See Sample Types.

    The Calculation field is active only aver you select Sampling Type.

  7. Select a Calculation Algorithm type from the drop-down list.
  8. Enter the state value.
    The State Value is active only after you select Sampling Type as Calculated and Calculation Field as State Count or State Time.
  9. In the Sampling Interval section, select either the By Interval or By Samples option.
    • The By Interval option displays two entry fields, Interval and Time Unit. Enter values in both. For example, to sample at 10 minute intervals, enter 10 in the interval field and select Minutes in the Time Unit field.
    • The By Samples option displays a Number of Samples field. To specify a number of samples for the data query, enter a number in this field. For example, to query 100 samples, enter 100 in this field.
  10. In the Output Display field, select one or more parameters for the output.
    Select a name to select it. To select multiple individual tags, press the Control key and select the tagnames. To select a sequence of tags, press the Shift key and select the first and last tagname of the sequence.
  11. Select in the Output Range field and select a range of cells in a single row or column to determine where the returned data is placed.
  12. Select either Columns or Rows for the output display.
    Selecting Columns displays a table of values with parameters arranged in columns with header labels at the top. Selecting Rows rotates the table 90 degrees.
    Note: When selecting multiple tags, the orientation of the return data is based on the orientation of the selected tags and the Row/Col selection is ignored.
  13. Select either Ascending or Descending to set the order of the retrieved data in either ascending or descending time order.
  14. Select OK to initiate the query. Select Cancel to abort the operation and close the window.
    Note: For an Array Tag, each element is displayed in separate rows with the tag name and index.

    TagStats Calculation mode is not supported.