Querying Current Values

About this task

Querying current values retrieves the most recently updated value of one or more Tags or process variables.
Note: If you attempt to perform a Query Current Value 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 Raw Data from the Historian menu.
    The Historian Raw 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 on your worksheet and, while it is selected, select in the Tag Name field of the window.
    This enters the tagname for you automatically. You can also enter the tag names manually in the Tag Name field of the window.
    Optionally, you can select the tag from the Advance Tag Search window. For more information, refer to Advance Tag Search topic.
  4. In the Query Type section, select the type of data search from three options:
    • By Time — Selecting the By Time option means that you search for data values between a start time and an end time. You must enter values for starting and ending times in the fields displayed at the right of the option. You can also use relative time entries to this field. For more information, refer to Relative Time Entries topic.
    • By Number Forward — Selecting the By Number Forward means searching for a number of values after a specified time. Enter values into the After Time and Number of Values fields.
    • By Number Backward — Selecting the By Number Backward means searching for a number of values before a specified time. The display changes from start and end times to Values Before Time and Number of Values. Enter appropriate parameters in these fields.
  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. For more information, see Query Modifiers.
  6. In the Output Display field, select one or more parameters for the output.
    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.
  7. 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.
  8. 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.
  9. Select either Ascending or Descending to set the order of the retrieved data in either ascending or descending order.
  10. 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.