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.

Instructions

  1. Download the reference application and unzip it into an empty directory.
  2. Open the project named PackML_V5_1_Project.lvproj.

Requirements

The following software is required to run this reference application:

Introduction

The State Chart Design Pattern for PackML is based on Local Machine Control Architecture. 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 interactions to the Machine Controller through defined PackTags created with the Tag Configuration Editor (TCE). These PackTags are implemented using the Current Value Table reference library. The communication of PackTag values between the Machine HMI and Machine Controller is implemented with the CVT Client Communication (CCC) reference library. On the Machine HMI, the CCC updates the local Packtags with the latest data values from the Machine Controller. Similarly, the CCC updates the Packtags on the Machine Controller with the latest data from the Machine HMI. 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

The files for this design pattern can be viewed and accessed by opening the PackML_V5_1_Project.lvproj file.

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.xml configuration file must be copied to the c:\ folder of the RT target.

Upon running the PackML_HMI.vi, a HMI page will be opened. This page will have front panel controls representing other HMI pages. Selecting one of these controls will cause the application to navigate to that relating page. Each HMI page has these controls at the bottom of the front panel. There are three HMI pages and they are the State Chart Page, the Machine View Page, and the 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. 

Note: 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.

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.

PackML Documentation

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

Feedback

This reference application was created by the NI Systems Engineering group. 

We do not regularly monitor Reader Comments posted on this page.

Please submit your feedback in the PackML Machine Control discussion forum so that we can improve this component for future applications. 

Please direct support questions to NI Technical Support.

Requirements


Filename: packml_v5_1.zip

Software Requirements


Application Software: LabVIEW Professional Development System 2009
Toolkits and Add-Ons: LabVIEW Real-Time Module 2009

Hardware Requirements


Hardware Group: CompactRIO, Real-Time (RT)
Driver: NI-RIO 3.2.1

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