Working with Alarms and Events Data
Alarms and Events Queries in the Excel Add-In
Querying Alarms and Events data in the Excel Add-In retrieves alarms and events 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 Alarms and Events Data in the Excel Add-In
Procedure
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 window. 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 alarms and events 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 Alarms and Events Data
Procedure
Output Display and Sorting
The Output Settings section of the Alarm Query window is separated into five sections.
Output Range
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.
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 alarms and events 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 fields 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 alarms and events database. |
Sorting Alarms and Events Data by Specific Attributes
Procedure
Joining Alarms and Events Data with Tag Data (Excel Add-In)
The Excel Add-In allows you to retrieve limited Alarms and Events data when you query tag data from the Historian archive. The available Alarms and Events 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 windows.
Two options for alarm data appear:
- Alarm Message
- Alarm ID
Importing Alarms and Events Data in the Excel Add-in
About this task
Alarms and Events data can be imported into Historian through the Excel Add-In. This is useful to include alarms and events 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 alarms and events data in the Historian Excel Add-In:
Procedure
Exporting Alarms and Events Data in the Historian Excel Add-In
About this task
Historian Alarms and Events data can be exported as XML or CSV files or to a new worksheet. Exporting alarms and events data is similar to querying alarms and events data, and generally has the same query types and criteria.
To export alarms and events data in the Historian Excel Add-In:
Procedure
OLEDB Provider and Historian Alarms and Events
The Historian OLE DB provider has been extended to include alarms and events data. For more information refer to: