Query Current Values

About this task

You can query the following types of data using the add-in:
  • Current values: Retrieves the most recently updated value of one or more tags or process variables.
    Note: If you attempt to perform a query with two worksheets open, the add-in may become unstable and unresponsive. This is a known Microsoft Excel issue. To avoid this issue, work with only one Excel spreadsheet at a time.
  • Raw data: Raw data values are the values actually stored in the archive, after applying collector and archive compression, but before applying any interpolation, smoothing, or other signal processing calculations. Querying raw data retrieves these values for a selected tag.
In addition, you can query filtered data and calculated data.

Procedure

  1. Open an Excel worksheet.
  2. If you want to query current values, select Historian > Query Current Value. If you want to query raw data, select Historian > Query Raw Data.
    The Historian Current Value Query or the Historian Raw Data Query window appears.
  3. Select the Historian server from the drop-down list box. If you do not specify a server, the default server is considered.
    Tip: To set the selected server as default, ensure that the Set Server to Default option is enabled.
  4. Select a tag on your worksheet, and then place the cursor in the Tag Name field.
    Optionally, you can select the tag from the Advance Tag Search window. For more information, refer to Advanced Tag Search.
    The tag name is automatically entered. You can also enter a tag name manually in the Tag Name field.
  5. Enter values as described in the following table.
    Field Description
    Query Type Select the type of data search:
    • By Time: Using this option, you can search for data values between a start time and an end time. You can also use relative time entries to this field.
    • By Number Forward: Using this option, you can search for a number of values after a specified time. Enter values into the After Time and Number of Values fields.
    • By Number Backward: Using this option, you can search for a number of values before a specified time. Enter values in the Values Before Time and Number of Values fields.
    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, enter #ONLYGOOD. For more information, see Query Modifiers.
    Output Display Select one or more parameters for the output.
    Output Range Select a range of cells in a single row or column to determine where the returned data is placed.
    Rows or Columns 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.
    Ascending or Descending Specify the order of the retrieved data.
  6. Select OK.
    The query returns a number of data points based on the number of rows or columns specified in the output range. If all the data points do not appear, select enough rows or columns to display all the data.