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

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

A Reference Architecture for Local Machine Control

2 ratings | 5.00 out of 5
Print

Overview

This document provides an overview to a complete machine control architecture using the NI Touch Panel Computer (TPC) as an HMI and the NI CompactRIO platform as the machine controller. Both of these platforms are configured and programmed using NI LabVIEW and therefore this architecture can be used on other LabVIEW platforms including Windows PCs for the HMI, and other PACs (Programmable Automation Controllers) such as PXI and CompactFieldpoint for the machine controller.

Introduction

In a typical local machine control application one HMI is used in conjunction with one machine controller. These are located close to the machine and are used by the operator to monitor the status of the machine and initiate operations on the machine.

Figure 1: Examples of different combinations of HMI and controllers used in local machine control applications

There are many different ways to architect such a solution and distribute the code between the two systems. This document recommends one such solution. The architecture presented in this and several associated documents is built using a number of software components that have been defined as part of the overall architecture. Each component serves a specific purpose and, depending on an individual application, some of these components may not be necessary to include in the final solution. In addition some of these components provide very general functions and may be used in other types of applications. The individual components are described in more detail in a series of additional Developer Zone articles. This document describes the high level operation of the architecture and how these components work together. You can search Developer Zone using the name of the individual components for more detailed information on each.

Local Machine Control Architecture

The two basic systems that make up the local machine control architecture are the HMI and machine controller. Each of these systems contains a tag engine which manages the data, variables, tags, etc. used by the system, as well as additional components that define the operations of the system. For the HMI the other components include the user interface and alarm engine. For the controller the main component in addition to the tag engine is the control logic which automates the operations of the machine. Frequently the control logic is implemented using a state machine such as the LabVIEW State Chart module. The controller interfaces to the machine using the I/O channels of the CompactRIO system.

Figure 2: High-level view of the local machine control architecture

HMI

The HMI system contains a number of separate software components that together provide the user interface for the machine control application. The basic functionality of these components is described in this section.

Figure 3: HMI machine control architecture overview

The HMI tag engine is comprised of two components, the Current Value Table (CVT) and an I/O engine. The CVT stores all of the tags and variables which are used and shared by the other components of the HMI. The CVT contains the most recently updated value for each tag so that all other components have access to this current value. Any component running on the HMI platform is able to access the tags in the CVT. For communication with the machine controller the CVT uses the HMI I/O engine. The I/O engine handles the exchange of tag values between the CVT on the HMI and a corresponding CVT on the controller. In the current implementation of the local machine control architecture, which uses CompactRIO as the machine controller, the HMI I/O engine consists of the CVT Client Communication (CCC) component. This component provides a TCP/IP interface to the CVT running on the controller. The HMI I/O engine can be expanded to use other communication protocols so that the HMI can interface to other types of controllers such as PLCs.

The user interface functionality of the HMI is implemented with a number of different components. The main component to create the UI pages is the LabVIEW Touch Panel Page Development (TPD) component. The TPD contains functions and building blocks for defining and automating individual UI pages. Coordinating multiple UI pages, which are common in most machine control applications, is handled using the HMI Navigation Engine (HNE). The HNE automates the process of hosting and switching between multiple UI pages. A common feature of many machine control applications are alarms and events. These are handled and processed on the HMI using the Touch Panel Alarm Engine (TAE) component. The TAE interfaces with the CVT to retrieve current values and then calculates alarms and event conditions. Current alarms are displayed on the UI pages.

The tags used by the Current Value Table, I/O engine and Alarm Engine are configured as part of the application and the configuration is stored in a common tag configuration file (*.tcf). This file is created and edited using the Tag Configuration Editor (TCE). The TCE is also used to create a similar configuration file for the machine controller.

Machine Controller

The basic organization of components on the machine controller is similar to the HMI. However, UI pages and the alarm engine are replaced with the machine-specific process and control logic. Controlled by the machine operator from the HMI, this component executes the low level control of the machine, based on current processes and operations.

Figure 4: Controller architecture overview

The machine controller tag engine is similar to the HMI as it is made up of two components, the Current Value Table (CVT) and the cRIO I/O Engine (CIE). The CVT on the machine controller is the same component used in the HMI. The cRIO I/O Engine is based on the cRIO FPGA interface to cRIO I/O channels. The FPGA portion of the CIE is customized by the developer to the current selection of cRIO I/O modules. Once updated for the current HW selection, the CIE provides a configurable I/O interface that maps physical I/O channels to tags in the CVT. CVT tags are continuously updated with values from the input channels and output channels are updated with values from the CVT. CVT and CIE configuration is handled with a tag configuration file created using the Tag Configuration Editor (TCE).

The machine controller process and control logic component represent the heart of the machine control application. This component implements the direct control of the machine. It is able to interact with the machine through the CVT and CIE. Based on user interactions from the HMI and status data from the machine, the control logic updates the output channels going to the machine. The machine builder defines this component using LabVIEW diagrams, which can be based on common design patterns such as a state machine or the LabVIEW State Chart module.

Where to Go From Here

To learn more about LabVIEW-based machine control, we suggest that you read the following documents:

An HMI Architecture Overview - This is a reference architecture for building a Windows or Touch Panel based HMI for a machine control application.

A Machine Controller Architecture Overview - This is a reference architecture for building a controller based on LabVIEW Real-Time, which is part of a local machine control system.

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.

2 ratings | 5.00 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/).