Top | Previous | Next |
Alarm Journal |
An alarm journal stores historical information about alarms in a database. It can store basic data about alarms that have occurred, such as their source and timestamp, along with associated data on the alarm, and the values of the alarm's properties at the time the event occurred. The alarm journal is used by the Alarm History Component, and can be accessed through scripting functions and direct database queries.
Creating a new Alarm Journal Alarm journals can be created by going to Alarming>Journal in the Ignition gateway, and selecting "Create new...". The only required setting is the Datasource, which must be a valid database connection.
Filtering Settings The minimum priority and store shelved events options filter what time of alarm events are stored in the journal. "Shelved" events are alarms that have been temporarily silenced by operators. Though they are not displayed to users, these events continue to be generated, and can be stored if the journal settings permit it. When stored, they will have a special flag indicating that they were shelved at the time.
Use Store and Forward If enabled, the alarm events will go through the Store and Forward system. This system protects data from being lost due to temporary database connectivity issues.
Event Data Alarm events consist of two main types of data: the primary information about the alarm, such as transition state, time, etc, and the "event data". These settings specify what type of event data is stored:
Data Pruning If enable, the system will periodically delete data older than the specified timeframe. Note that since the data is stored directly in a database, an administrator is free to manually delete data at any time.
Advanced Properties - Table Names These settings allow you to specify your own table names. This is especially useful when trying to use multiple alarm profiles within a single database (not common, but can happen, especially with multiple systems sharing a single database).
Table Definitions The alarm journal system will automatically create the necessary tables for you, and scripting functions can be used to query the system without having to know about the table structure. However, understanding the structure of the alarm journal tables can be useful for accessing the data in situations where SQL queries are more convenient.
Alarm Events (alarm_events) This table stores the core data for each event that occurs. An event is a transition for an alarm between active, cleared, or acknowledged. Additionally, other events may be stored in this table that aren't directly related to an alarm, such as a system shutdown event. This table defines a primary key "id", that is used as a foreign key by the Alarm Event Data table, which stores additional information for each event.
Alarm Event Data (alarm_event_data) This table stores the properties associated with an alarm event. The individual event is referenced through the "id" column, against the alarm event table.
Note: Although the dtype column indicates which data column should be used, since null will be stored in the unused columns, using "coalesce(intvalue, floatvalue, strvalue)" provided by most databases is an effective way to query the value.
About System Events System events are stored in the journal to record actions that aren't directly related to a particular alarm. Currently the following events are stored:
Qualified Paths A qualified path in Ignition is a path to an object, described by various annotated components. Each component has a type identifier, and a value, separated by a colon (":"), and each component is separated by colon-foward slash (":/"). For example, an alarm is identified by "alm:Alarm Name". It usually exists under a tag, in which case its fuller path would be "tag:Path/To/Tag:/alm:Alarm Name". Paths can be built up further depending on the level of specificity required by the situation. |