DMC, Inc.
Glue inspection vision system

Glue Inspection Vision System

Summary

DMC worked closely with the customer to develop a vision inspection system that inspects glue applied to complicated folding cartons, such as six-pack bottle carriers. The final vision inspection system can inspect and output results for over 40 images per second. The user interface for configuring the system integrates seamlessly into the customer’s existing packaging control software. The customer required that the system be simple to set up to make it easier for packaging manufacturers that often run several different package types per day. Previously configured jobs are saved and can be recalled by the operator, allowing for quick changeovers.

Solution

DMC specified machine vision hardware and programmed a custom real-time application to perform high-speed inspection of complex folding cartons. Folding cartons for products like beverage carriers often require many folds, flaps, and complicated glue patterns. The cost of an improperly folded or glued carton can be large, since the cartons are filled with bottles by an automated line. The packaging company is liable for any downtime or broken bottles caused by a bad carton. 

Machine Vision Hardware

Since DMC’s customer wanted to package the inspection system and incorporate it into their existing packaging line, keeping hardware costs low was a priority. DMC and the customer created a custom real-time PC from standard components and installed the LabVIEW real-time operating system to run the application. The system has multiple GigE cameras that are each connected to a dedicated network adapter. Encoder and trigger signals from the packaging machine are connected to the inputs on the PCIe-8255R FPGA card. The cameras and lights are controlled by FPGA outputs. 

Image Acquisition and Results Tracking

The glue is often applied in two or more stages, requiring multiple inspection stations. Due to machine components that block the view from a single camera, each station has two cameras and there is a total of four cameras connected to one vision controller. Since the cartons could vary in size and length, a line scan camera is used to acquire images of variable size. Line scan cameras also simplify lighting, since only a single line of illumination is needed, instead of a large 2D area. A concentrated line light helps keep exposure times low, allowing for high-speed image acquisition. 

Each carton passes a photo eye to trigger the camera(s). The trigger signal and encoder position is tracked by a program running on the FPGA. After the inspection system determines a pass/fail result, the FPGA sends an output signal at a specified position on the line to signal to the packaging system that the current carton is good. Any carton that doesn’t have a pass signal is rejected by the packaging equipment. The timing diagram below illustrates the relative timing between the input trigger signal, image acquisition, pass/fail result determination, and output signal to the system. 

Glue inspection encoder

User Interface

The customer has an existing Windows application that is used to configure their folding and gluing machines. The customer wanted to seamlessly integrate a user interface developed by DMC without requiring DMC to modify over their existing source code. To accomplish this goal, DMC developed a .NET application that is called by the existing application and covers a portion of the interface while it is active. The .NET application communicates with the LabVIEW real-time application via TCP messages to send configuration information down to the controller and to receive images (with result overlays) for display to the user.

Inspection Algorithm

To verify proper glue application, the vision system checks the position of glue lines. The ideal glue positions and tolerances for each glue line are configurable per product, see the next section. The software creates a “region of interest” for each expected glue line. For each region of interest, the inspection algorithm verifies the following:

  1. Glue is present
  2. Glue starts within tolerance
  3. Glue ends within tolerance
  4. Glue width is within tolerance
  5. Gaps in glue (for dot patterns) are smaller than the maximum tolerance

The system also checks that there is no glue found outside of an expected region. Usually, unexpected glue is a bad thing. In some cases, glue is tolerable in a certain region but not required. The system allows the user to create this region that is ignored.

The image below shows glue lines detected by the system (in yellow), surrounded by the “region of interest” for each glue line (in orange).

inspection algorithm

Inspection Configuration

The inspection system needs regions of interest defined in order to perform the inspection described above. To configure the ROIs, the user has two options:

  1. Automatically “learn” ROIs based on several cartons
  2. Manually configure ROIs and tolerances

Typically, for a new product, the user will use the “automatic learn” feature. The system analyzes several cartons and creates ROIs around the average glue positions. If the glue on the template cartons deviates too much from carton to carton, the “learn” process must be retried. After the automatic learn is complete, the user may tweak the auto-generated ROIs to fine tune the inspection.

The inspection configuration can be saved with a user-defined “job name.” In the future, if the customer runs the same glue pattern, they can simply reload the same configuration by selecting the job name from a list on the user interface.

Inspection Result Display

To display inspection results to the user, the real-time vision system transmits images with results markup to the .NET application. The last 10 pass and fail images are stored for review by the user. The user can choose different image processing and overlay options to help them analyze the images and determine failure modes.

The image below illustrates a failed image with some analysis options enabled. Bad glue and failed ROIs are highlighted in red. Glue found outside of an ROI is circled – sometimes a small speck of glue is hard to see.

inspection result display

Conclusion

DMC combined our expertise in vision systems, LabVIEW development, and .NET development to create a powerful and highly flexible inspection system. The system has been installed in end customer facilities all around the world.

Learn more about DMC’s Vision systems, LabVIEW development, Application development, and Test and Measurement expertise and contact us for your next project.

Customer Benefits

  • DMC’s customer will sell the glue inspection system as an add-on to their existing folding/gluing machines. By offering this cutting-edge inspection technology, DMC’s customer has a competitive advantage over other companies that create packing machines. The benefits to the end customer are numerous:
    • Improved quality: An improperly glued carton could fall apart in use, resulting in unhappy customers. Packaging companies want to be confident their machines are producing good products.
    • Reduced liability: If a carton is glued improperly, it could be stuck shut and unable to open to receive the product inside. For instance, if this happens on a bottling line, the machine that puts bottles in the carriers could jam and shutdown the machine. The bottling company will hold the packaging company liable for downtime and wasted product.
    • Easy setup: Spot sensors have existed for decades to inspect where glue starts and stops on a carton. Setting up a single spot sensor for a simple carton with a single line of glue is easy. Setting up 30 spot sensors for a complex glue pattern on a bottle carrier is expensive, time consuming, and unreliable due to the potential for operator error. The vision system features a one-button training functionality that automatically learns the proper glue pattern, while allowing the operator to make corrections as needed.
    • Quick product changeover: In addition to the automatic training feature, the system can store thousands of product configurations. After setting up a particular glue pattern one time, it can be reloaded with minimal effort.
    • Flexible: The system can inspect a wide variety of cartons and boxes across many industries. DMC helped specify vision hardware to meet various end customer’s needs. The software allows for one to four inspection stations, and paired cameras to inspect an extra-wide or obstructed field of view. Line scan cameras allow the system to inspect products of any length.
    • High speed: The vision system can sustain high speed inspection with a low rate of false positives. The maximum line speed is between 1500 ft/min to 2250 ft/min, depending on the camera configuration and field of view. This processing capability should allow any customer to run their production lines at maximum speed.

    Technologies

    • Software 
      • LabVIEW Real-Time
      • LabVIEW FPGA 
      • NI IMAQdx and Vision Development Module&nbsp
      • HMI Programmed using Microsoft .NET framework 
      • Hardware 
        • High-performance Real-Time PC: quad-core i7 processor, 4 GBs DDR3 RAM, 64GB SSD (for saving carton images)
        • Basler Racer line scan cameras 
        • NI PCIe-8255R – Used for its reconfigurable I/O (FPGA)