Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Aug 3, 2008

An HMI Architecture for LabVIEW Touch Panel Module

4 ratings | 4.50 out of 5
Print

Overview

This document gives an overview of an HMI architecture using LabVIEW Touch Panel Module

Background and Scope

 

In any industry where a mechanical machine is present, there is a natural need of a system that can link one or multiple machines to one or multiple user interfaces.  This system allows the user to monitor and control a machine as well as view trends. In other works, it allows the user to interact with the machine.  This system is called a Human Machine Interface or HMI.

 

National Instruments’ Touch Panel Computers offer an on-board processor programmable using the LabVIEW Touch Panel Module, a rugged LCD touch panel display and interface, and an assortment of integrated I/O ports for system integration.  These features make these Touch Panel Computers the ideal Human Machine Interface (HMI) for interacting with and managing remote systems.

 

Figure 1. NI Touch Panel Computers

 

This document describes the components of an HMI application built with the LabVIEW Touch Panel Module for National Instruments’ HMI computers.

 

 

LV TP HMI implementation

 

An HMI can be as simple or complex as the functionality the user requires.  Choosing the right software architecture will define the functionality of an HMI as well as its capabilities to grow and be changed.  Based on the HMI Architecture Overview document, some typical features of an HMI are:

 

Paged display

Touch panel control

Data entry objects

Controller communication

Alarm/event indicators

Alarm/event log

Tag engine

Web server

 

The following picture shows an HMI architecture that includes these features.  This architecture breaks the HMI into several components making the HMI scalable and maintainable, allowing user to add or remove functionality.

 

Figure 2. HMI Architecture Overview

 

LabVIEW Touch Panel Module HMI Architecture

LabVIEW Touch Panel Module provides a graphical programming interface that allows users to develop an HMI in a Windows development environment and then deploy it to a National Instrument Touch Panel Computer (TPC). 

 

            

                Figure 3. HMI Architecture                                                     HMI LabVIEW Architecture

For a more comprehendable structure, the HMI Architecture is being broken into three main components; the Navigation loop, the Scan loop and the Background Processes loop.   The Navigation Loop encloses the Navigation Engine, User Interface Pages (UI Pages) and Alarm Displays. The Scan Loop encloses the CVT Client Communication (CCC), Alarm Engine and components (Alarm and Event Log), and the Hardware IO Communication Drivers. It is responsible for exchanging data between the HMI and the controllers and does event monitoring. The Background Processes is where other components that are not necessarily part of the HMI but that require to run in parallel to it, exist. 

 

Other components in the HMI architecture, like the web server or the Tag Configuration Editor, interact indirectly with the HMI application through support files, like web pages or configuration files.

 

 

Navigation Loop

 

It is the loop responsible for managing the UI Pages. It includes the UI Pages, Navigation Engine and Alarm Displays.

 

Each UI Page is a LabVIEW VI.   The most common components on a UI Page are: Navigation buttons, action buttons, numeric indicators, graphs, boolean controls and indicators and images. Standard indicators can be used to display analog and digital tag values using digital (boolean), numeric, or string indicators.

 

Figure 4. UI Page (LabVIEW VI Front Panel)

 

The UI Page block diagram is a three frame sequence that connects the UI to the Current Value Table (CVT).  Controls and indicators are initialized, and CVT tags are read and written.  More detailed information on how HMI pages are created can be found in the Creating HMI pages for LabVIEW Touch Panel document.

 

Figure 5. UI Page (LabVIEW VI Block Diagram)

 

Navigation Engine

The Navigation Engine is the component in charge of managing the HMI page displays.  This Navigation Engine is a LabVIEW state machine built with a while loop and a case structure.  Each case encloses a Page VI that depending on the case selected is the page displayed in the HMI. 

 

Figure 6. Navigation Engine

 

 

Alarm Display

Alarm Displays consist most of the times of a UI page that displays the current/historical alarm events.  Another common way to display this type of tag information is through an alarm footer.  This last option is a one-line display that can be added to the bottom of any page.

 

 

Scan Loop

 

The Scan Loop runs a sequence of tasks that are performed every certain amount of time (for example every 250ms).  These tasks are mainly the exchange of data between the IO and HMI as well as event monitoring.

 

Figure 7. Scan Loop Block Diagram

 

CVT Client Communication

The communication between the HMI and the IO is done through the CVT Client Communication (CCC).  This component abstracts the hardware specific drivers and makes it transparent to the user.  This means that if the IO hardware is replaced with something different, the only thing that would need to change in the HMI application is the driver and its connectivity with the CCC; the rest of the HMI application could remain the same.    

 

 The CCC is also in charge of updating the CVT with values coming from the IO and to write commands to the IO drivers to reflect changes done in the CVT by the user in the UI Page.

 

Figure 8.CVT Client Communication

 

Alarm Engine

This component reads a list of tag values and compares them to certain values, previously defined in a configuration file, to generate an event.  An event can also be considered an alarm, when something special has happened and requires a user to do something.  Both, events and alarms can be accessed through one or more of the HMI pages (i.e. Alarm Display Page) and are logged into independent log files that can be accessed remotely through a web page.

 

Figure 9. Touch Panel Alarm Engine

 

Current Value Table

The Current Value Table (CVT) is one of the most important components in the HMI application because it is where tag values and parameters are centralized and shared across the HMI.  All components in the HMI go through the CVT to access the tags.

 

There are two places in the HMI where the tag value can be modified: In the UI page after a user interaction and in the CCC after reading a tag value from a machine.   In both cases, the new value is written to the CVT.

 

Since the CVT is the component in charge of centralizing the data, it must live in both the Navigation Loop and Scan Loop.

 

 

                        

Figure 10. CVT Boolean –Write                                 CVT Boolean - Read

 

 

The CVT is configured through a List of Tags that gets generated from a Tag Configuration File.  This file is read and parsed into the tag list inside the Initialization block.  Refer to Figure 3. HMI LabVIEW Architecture.

 

Support application

The Tag Configuration File is generated and modified through the Tag Configuration Editor.  This editor is a tool that runs in the Windows Environment where tags can be created and configured.

 

Where to Go From Here

To learn more about LabVIEW-based machine control, we suggest that you read the following document:
 
A Reference Architecture for Local Machine Control  - This is a reference architecture for building a local machine control system based on an NI Touchpanel Computer (TPC) HMI and a cRIO controller.
 
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.

4 ratings | 4.50 out of 5
Print

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/).