Working with Alarm and Event Data
Alarm and Event Queries in the Excel Add-In
Querying Alarm and Event data in the Excel Add-In retrieves alarm and event data according to your Query Criteria. Three query types are available: Alarm, Alarm history, and Events. For more detail refer to the Alarm Query Types topic.
Querying Alarm and Event Data in the Excel Add-In
Alarm Query Types
Three query types are provided by the Excel Add-In. These types are described in the following table.
Query Type | Description |
---|---|
Alarms | In Historian, an alarm's entire life cycle is stored as a single record in the alarm archive. Thus, when retrieving from the archive, the entire life cycle of an alarm will be returned in a single record. |
Alarm History | If the Alarm History query type is chosen, each change in the alarm's state will be returned in a single record. |
Events | One row per event is returned to the Excel spreadsheet. |
Query Criteria
The Excel Add-In can be set up to filter by one or more of an alarm's attributes with the Query Criteria section of the dialog. For example, you may want to include alarms where the Alarm ID is equal to a specific Alarm ID occurring after a specific start time.
Several query criteria are provided by the Excel Add-In to retrieve alarm and event data from Historian. In addition to specifying which criteria to use in your query, you can specify which attributes will be displayed, and how the results are sorted in your Excel spreadsheet.
Filtering Alarm and Event Data
Output Display and Sorting
The Output Settings section of the Alarm Query dialog box is separated into five sections.
Output Range
Click 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.
Output Orientation
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.
Maximum Results
Enter a maximum number of results for the query to return
Output Display
The Output Display section specifies which attributes the Excel Add-In should return to the spreadsheet. Multiple selections can be made by holding the CTRL key and selecting.
Output Sorting
Before displaying the returned alarm and event data in your Excel spreadsheet, the Excel Add-In can sort the values according to the criteria you specify in the Output Sorting section. The following table describes how the different sorting options sorts values:
Sorting Options | Values Displayed |
---|---|
Alarm Time | Sorts the returned alarms or events by the alarm or event's Start Time attribute. The results will be sorted in descending order. |
Custom Sort | Allows you to select which field(s) to sort the returned alarms and events by. You can also specify whether to sort in ascending or descending order. Multiple sort conditions are supported. |
None | The returned alarms and events are not sorted at all. They will be returned in the order they are received from the alarm and event database. |
Sorting Alarm and Event Data by Specific Attributes
Joining Alarm and Event Data with Tag Data (Excel Add-In)
The Excel Add-In allows you to retrieve limited Alarm and Event data when you query tag data from the Historian archive. The available Alarm and Event data appears as additional options in the Output Display list box in the Query Current Values, Query Raw Data, Query Calculated Data, and Query Filtered Data dialog boxes.
Two options for alarm data appear:
- Alarm Message
- Alarm ID
Importing Alarm and Event Data in the Excel Add-in
Alarm and Event data can be imported into Historian through the Excel Add-In. This is useful to include alarm and event data into the Historian archive that is not normally collected by Historian or when you are migrating data from an older system into Historian.
To import alarm and event data in the Historian Excel Add-In:
Exporting Alarm and Event Data in the Historian Excel Add-In
Historian Alarm and Event data can be exported as XML or CSV files or to a new worksheet. Exporting alarm and event data is similar to querying alarm and event data, and generally has the same query types and criteria.
To export alarm and event data in the Historian Excel Add-In:
OLEDB Provider and Historian Alarms and Events
The Historian OLE DB Provider has been extended to include alarm and event data. For more information refer to: