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

PackML Machine Control Reference Application

4 ratings | 4.25 out of 5
Print

Overview

The PackML Machine Control Reference Application is a LabVIEW implementation of the PackML version 3.0 Automatic Operation State Model. PackML is a standard that defines a common approach for machine operation. Although specifically designed for the packaging industry, this same model could be applied as a general machine control sequencing architecture. This design pattern is setup to run on a Real Time (RT) controller (such as a CompactRIO, Compact FieldPoint, RT PXI, etc.) with a HMI (such as a touch panel) communicating over Ethernet sending user commands and displaying machine status.

The following software and components are required to run this reference application:

Introduction

The State Chart Design Pattern for PackML is based on Local Machine Control Architecture (http://zone.ni.com/devzone/cda/tut/p/id/6145). Figure 1 shows a high-level overview of the program architecture which consists of a Machine Controller and Machine HMI.

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

The Machine HMI communicates user interaction through defined PackTags created with the Tag Configuration Editor (TCE). The CVT Client Communication (CCC) component efficiently sends and receives the PackTag data to and from the Machine Controller implemented on both the server and client side with the Current Value Table (CVT) component. Within the Machine Controller, the PackML state chart manages the machine sequencing. Figure 2 shows the PackML version 3.0 Automatic Operation State Model.


[+] Enlarge Image

Figure 2: PackML version 3.0 Automatic Operation State Model

Using the LabVIEW Statechart Module, the PackML State Model was re-created and configured to receive user commands from the HMI (see Figure 3). A hybrid synchronous mode was used with the state chart because of its synchronous (RT) and asynchronous (HMI) components. The chart is generated in synchronous mode allowing it to process input data at a timed rate. Synchronous mode normally implies that only the input and output clusters are used, however, in this hybrid model, the user commands from the HMI are queued in a separate loop and processed as triggers (normally reserved for asynchronous mode). This also allows for the Virtual Machine Loop to send triggers when needed.

In each state a sub-VI tracks accumulated time for statistical analyses such as percent of total time in production. Current state status is sent to a virtual machine running in a parallel loop that simulates a conveyor, valve, punch, and limit switch. The virtual machine loop would be replaced with an I/O loop to control an actual machine.


[+] Enlarge Image

Figure 3: LabVIEW Statechart Module rendition of PackML version 3.0 Automatic Operation State Model

Using the PackML DESIGN PATTERN Example

Running the PackML Design Pattern Example installer will install all the necessary files to the LabVIEW example directory under \Machine Control Reference Architecture\PackML Example.

The files for this design pattern can be viewed and accessed by opening the PackML_V3_Project.lvproj file in the above folder.

Figure 4: PackML Design Pattern Project Folder

The two highlighted VI’s in Figure 4 are the main VI’s: PackML_HMI.vi and PackML_RT.vi. The PackML_RT.vi must be running for the PackML_HMI.vi to connect and display correct data. Configure the RT target and IP address that the PackML_RT.vi will run on and then download and run the VI. Open the PackML_HMI.vi and set the proper IP address of the RT target. The PackML.tcf configuration file must be copied to the c:\ni-rt\startup\ folder of the RT target.

Upon running the PackML_HMI.vi, VI front panels representing the HMI pages will be opened and able to be navigated through using the lower blue buttons. The three HMI pages are the State Chart Page, Machine View Page, and Production Statistics Page (see Figures 5-7). Each of these pages have Start, Hold, Material Ready, Stop, Reset, Close, Abort, and Shutdown buttons to control states changes. The State Chart page shows which buttons will cause transitions from the different states.

Figure 5: PackML HMI State Chart Page

Figure 6: PackML HMI Machine View Page

Figure 7: PackML HMI Production Statistics Page

The Machine View Page will move the conveyor, valve, and punch when in the Execute state. These controls are updated based off Virtual Machine parameters sent across CCC. A pareto chart of percent time in each state is displayed in the Production Statistics Page. The “Time to Dirty” indicator is the amount of time spent in execute mode subtracted from “Set Time to Dirty”. It is meant to limit the machine to a certain number of production hours before a cleaning cycle is required.

Setting the “Set Time to Dirty” control to a value lower than the “Time to Dirty” indicator will cause an alarm notification in the bottom of all pages. The program must be run through the reset state to set “Time to Dirty” back to zero and permit re-entry into the execution state. As per PackML documentation, normally a cleaning cycle would be have to be performed and a supervisory bit set rather than simply passing through the reset state to allow the machine to continue. Integrating the Touch Panel Event Engine (TAE) component will give a more complete and advanced use of alarms.

Where to Go From Here

This document does not provide an overview of the local machine control architecture or PackML. Consult the following documents for more detailed information of the different systems and components that make up the complete architecture.

Local Machine Control Architechture

A Reference Architecture for Local Machine Control - http://zone.ni.com/devzone/cda/tut/p/id/6145

PackML

PackML Documentation - http://www.omac.org/MSTemplate.cfm?MicrositeID=1158&CommitteeID=6915

Requirements


Filename: packml_v4_1.zip

Software Requirements


Application Software: LabVIEW Professional Development System 8.5
Toolkits and Add-Ons: LabVIEW Real-Time Module 8.5
Language(s): LabVIEW

Hardware Requirements


Hardware Group: CompactRIO

 
4 ratings | 4.25 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program 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 program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM 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/).