- Download the reference library installer and unzip it into an empty directory.
- Run the setup.exe located in the Volume folder.
- Restart LabVIEW if it is already running. A new palette will have been added to the Functions»User Libraries palette called TAE.
- Open the example project named TAE_Example.lvproj located at
Note: Additional information on features, installation and licensing are available in ReadMe files included in the attached source distribution.
The TAE reference library (tae20_installer.zip) requires:
- LabVIEW 8.6.1 or later
- Current Value Table (CVT) Reference Library
The TAE reference library (tae20_installer.zip) is supported by LabVIEW running on the following targets:
- Windows XP and Vista
- Windows XP Embedded
- Windows CE
The ability to configure alarms in the Tag Configuration Editor (TCE) has been removed with the latest release of the TCE. If you still want to have alarm monitoring capabilities, you have multiple options.
- Create your own Alarm List array for the TAE Init. This method is illustrated in the TAE example discussed below.
- Use the alarm monitoring capabilities provided with the LabVIEW Datalogging and Supervisory Control module (Windows and Windows XP Embedded Only).
- Request the feature be added on the TAE discussion forum linked below.
Human Machine Interface (HMI) applications commonly require a mechanism for comparing variable (tag) values against a set of criteria to determine if an event has occurred. If an event occurs, this mechanism is often required to log and display that event to the operator.
An alarm is a specific 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 how to use the LabVIEW Touch Panel Alarm Engine (TAE) application programming interface (API) for monitoring, logging and displaying active and historical alarms on a HMI.
Note: The TAE is designed specifically for alarms.
2. Theory of Operation
As stated above, the goal of this API is to monitor tags for alarms, log alarms, and display active and historical alarms to the operator. The provided LabVIEW example achieves this using a scan loop that is programmed to monitor tag values and compares them against different alarm criteria. If an alarm is detected, that tag is added to a global alarm status list, classified as an active alarm and then logged to disk. When the tag value no longer meets the alarm criteria, it becomes a historical alarm. The global alarm status list caches up to 40 active and historical alarms and can be used for displaying this information to the operator.
3. Touch Panel Alarm Engine (TAE) Implementation
The TAE API and a design pattern based on this API are both required to architect a solution for monitoring, logging and displaying alarms.
Touch Panel Alarm Engine (TAE) API Palette
Figure 1. TAE Palette
TAE Init – This VI initializes the alarm engine. It accepts an Alarm List cluster that contains the list of tags to be monitored as well as the alarm criteria. The alarm criteria include:
- Over Limit
- Under Limit
- Boolean TRUE
- Boolean False
- Enum Equal
- Enum not Equal
TAE Alarm Engine – This VI is the actual alarm engine. It receives the Alarm List and a queue reference from the TAE Init VI. The other inputs include Alarm Logging?, which enables logging of alarms to disk and AlarmLog Path, which is the path for the alarm log.
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 active and historical alarms.
TAE Close- This VI clears all the resources used by the TAE Alarm Engine VI.
Display Alarms subpalette- This is a subpalette containing VIs to access and display active and historical alarms. These VIs are discussed below.
Examples subpalette- This is a subpalette that contains the example VI for the TAE API.
Display Alarms Subpalette
Figure 2. Display Alarms Subpalette
TAE Format Active Alarm Display - This VI indexes TAE AlarmStatusGV (see above) and creates a formatted string to display active alarms, meaning tags that are still in the alarm condition.
TAE Format Alarm History - This VI reads TAE AlarmStatusGV and creates a formatted string for a pre-determined number of alarms no matter their status.
TAE Format Alarm Ticker - This VI 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.
Touch Panel Alarm Engine (TAE) API Dependencies
The tag values being monitored by the TAE Alarm Engine VI are provided through the Current Value Table (CVT). Therefore, the CVT reference library must be installed for the TAE to function. Also, each tag being monitored is actually a CVT tag and therefore must be defined in the CVT. For more information on the CVT, refer to the document Current Value Table (CVT) Reference Library.
Touch Panel Alarm Engine (TAE) - Design Pattern
A typical HMI application architecture is shown in Figure 3 below. Refer to the HMI Architecture for the LabVIEW Touch Panel Module document for more information on HMI architectures.
Figure 3. HMI Architecture
As mentioned above, the TAE Alarm Engine VI monitors tags already created in the CVT. Therefore, the CVT must be initialized with the CVT Init before the TAE Alarm Engine VI is initialized with the TAE Init. Add and wire these VIs in this order to the initialization section of your HMI program. For the TAE Init, create your Alarm List with each array element being a different CVT tag to monitor.
The CVT Client Communication (CCC) Reference Library was created to share CVT tag values between a machine controller and HMI via an ethernet connection. The HMI portion of the CCC resides in the scan loop section and using data flow, we add the TAE Alarm Engine VI after the CCC VIs. This allows the TAE Alarm Engine VI to monitor tags immediately after the CCC updates these tags with the latest values from the machine controller. See Figure 4 for an example Scan Loop containing the TAE and CCC VIs.
[+] Enlarge Image
Figure 4. Scan Loop Block Diagram
4. TAE Example
The HNE reference library includes an example project that is installed at
labview\user.lib\TAE\examples. The block diagram of the top level VI, TAE_Example VI, is shown in Figure 5.
[+] Enlarge Image
Figure 5. TAE_Example VI Block Diagram
This example is programmed to first initializes the CVT with the CVT Init VI. This guarantees that the tags being monitored by the TAE Alarm Engine VI exist before it tries to access them. Next, the TAE Init is called. Notice that the tag names in the Alarm List cluster relate to the tag names in the CVT Tag List cluster. The loop named Scan Loop updates the CVT tags with the current values from the front panel and then monitors those CVT tags for alarms with the TAE Alarm Engine VI. The loop named Display Loop is displaying any active or historical alarms via the TAE Format Alarm History VI. When the user changes the values of the front panel controls to violate the specified alarm criteria, the TAE Alarm Engine VI will add the violating tag to the global alarm status list. The TAE Format Alarm History VI will format this global alarm status list and display the resulting string on the front panel for the user.
5. Where to Go From Here
The following is a map of other documents that describe the machine control reference architecture. You can click on the image to navigate directly to each document.
Please post your feedback in the TAE Forum so that we can improve this reference library for future applications.
This reference application was created by the NI Systems Engineering group.
We do not regularly monitor Reader Comments posted on this page.
Please direct product support questions to NI Technical Support.