An Alarm Engine for the LabVIEW Touch Panel Module
Overview
This document shows how to implement and use the Touch Panel Alarm Engine Component (TAE)
Table of Contents
Background and Scope
Machine Control systems require a mechanism to detect events, which is condition where certain tag values match a value or range of values. An alarm engine is a subsystem that detects when events occur and maintains a list of active events as well as a history of alarm events.
An alarm is a type of event that requires intervention by the operator. To illustrate the difference, a “Material Low” alarm might require the operator to load more raw materials into a intake hopper before normal operation can continue, while an “assembly complete” event might be used to count the units as they are produced.
This document describes the LabVIEW Touch Panel Alarm Engine (TAE) and its usage in machine control applications. It is intended for machine integrators who want to learn how to monitor events and alarms using HMIs that use the LabVIEW Touch Panel Module.
Usage and Implementation
An HMI is composed of several processes that run in parallel. The TAE is a VI that runs inside the Scan Loop process. Refer to the HMI Architecture for the LabVIEW Touch Panel Module document for more information on the HMI architecture and components.
Figure 1 HMI Architecture – TAE resides inside the Scan Loop
The tags and event conditions are defined using the Tag Configuration Editor (TCE). For each tag the configuration editor allows you to define
- Whether to monitor the tag for events
- The type of condition to look for
- Whether the resulting event is an alarm, and
- Whether the event or alarm should be logged.
For more information on the TCE, refer to the document A Tag Configuration Editor for Machine Control.
The HMI Initialize VI reads the tag configuration file and parses it to create a list of tags that need to be monitored for event and alarm conditions. The alarm list is passed to the scan loop where the TAE compares each tag to its configured condition.
The TAE VI is located within a sequence structure in the Scan Loop, together with the CVT Client Communication (CCC) VIs. For every loop iteration the TAE checks the each tag in the Alarm List for events and alarms. The scan loop rate defines how often the Alarm status is updated.
Figure 2. Scan Loop.
The conditions that the TAE uses to monitor Alarms include:
- Over Limit
- Under Limit
- Out-of-Range
- Boolean TRUE
- Boolean False
- Enum Equal
- Enum not Equal
For alarms, the TAE also keeps track of their status whether they are in alarm (active), waiting for an operator acknowledgement or out of alarm state. A history of current and previous alarm states is passed to the alarm displays as a global variable.
The following figure shows the block diagram of the example that is shipped with the TAE. This example shows the TAE as a standalone component.
Figure 3. Alarm Engine shipping example – block diagram
TAE API
The TAE component installs an API palette that allows users to initialize, run and finish the engine, as well as access the alarm events. The following paragraphs describe the TAE API.
Figure 4. TAE palette
TAE Init – This VI initializes the Touch Panel Alarm Engine. It receives an Alarm List, generated by the Tag Configuration Editor (TCE) with a list of tags that need to be monitored for alarms or events.
TAE – This VI is the actual Alarm Engine. It receives the Alarm List and the references to the queues that the engine uses. These two input parameters are passed by the TAE Init VI. The other two inputs are the Alarm Log file name and Event Log file name in case logging is enabled.
TAE_AlarmStatusGV- This is a global variable used by the engine to store a history of up to 40 alarms. This global variable is used by the HMI pages to access current and non active alarms.
TAE Close- This VI terminates the Alarm Engine and clears all the resources used by it.
TPD-TAE API
HMI Pages use the TAE_AlarmStatusGV global variable to access the most recent alarm events and their status. The following VIs are included under the TPD palette as the TPD TAE subpalette.
Figure 5. TPD-TAE subpalette
Format Active Alarm Display - Indexes the Alarm Status global variable and creates a formatted string to just display the Alarm events that are active, meaning that the tag is in alarm condition.
Format Alarm History - Reads the Alarm Status global variable and creates a formatted string for a determined number of alarms no matter their status.
Format Alarm Ticker - Functions the same as the Format Active Alarm Display but displays only one current alarm at a time. This is commonly used for Alarm Footers.
For more information on how to implement an HMI page, refer to the Creating HMI pages for LabVIEW Touch Panel document.
References
- Creating HMI pages for LabVIEW Touch Panel
- Component : A Tag Configuration Editor for Machine Control
- Overview: HMI Architecture for the LabVIEW Touch Panel Module
- TAE Component Files: LabVIEW Touch Panel Alarm Engine (TAE) Component
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
