Inspecting Rubber Parts Using NI Machine Vision Systems

  Print Print

"The LabVIEW MV application acquired 64 frames per second and processed the data in 900 ms, which means it took approximately 14 ms to process each image. The C++ application needed more than five times more time (80 ms per image) with the same acquisition time (1 s). Although the acquisition time completely depends on the camera’s frames per second setting, the processing time of LabVIEW was extremely fast. Furthermore, using LabVIEW for development was faster than using C++."

- Peter Mohorko, CEO, Diff Avtomatizacija d.o.o.

The Challenge:
Developing an automated visual quality control and inspection process that can ensure consistent flawless production of rubber parts in a series of several million for the automotive industry.

The Solution:
Using NI Smart Cameras to quickly prototype a fully automated machine vision system and using the NI Vision Development Module to eventually migrate to a desktop machine for more processing power.

Author(s):
Peter Mohorko, CEO - Diff Avtomatizacija d.o.o.
Peter Mrak, PhD - Diff Avtomatizacija, Slovenia

Every economic crisis forces the production and manufacturing industry to innovate or optimize its established methods and technology. The production of small rubber parts, from just a few items to a series of several million, includes quality inspection. As is common in this field, quality control is primarily conducted by random sampling or with human inspection. These methods cannot ensure continuously flawless quality production as required in the automotive industry. Our company, Diff Avtomatizacija, uses the latest National Instruments equipment to offer solutions that ensure continuous quality production without compromise.

In the production of a large series of rubber products, a small percentage of faulty products introduced in the batch are inevitable. We wanted to create a machine vision system that finds and discards all faulty products from an individual production batch.

We can check solid products such as metal or plastic parts without great effort using machine vision (MV). But checking rubber parts with elastic properties is a completely different challenge because distinguishing between an error and an elongated material is not straightforward. Other requirements for the automated inspection system included the following:

  • Reliability—the inspection works continuously for 24 hours
  • Speed—the inspection time limit per product is 2 seconds or shorter
  • Accuracy—the inspection must find all faulty products and should not let a faulty product pass
  • Versatility—the device must work in a production environment

Hardware Support

MV, well established in the automation industry, combines computer image analysis with automated inspection and product manipulation. Computer image analysis returns the best results when the product is guided under a supervised (controlled) optical environment. In our case, we put great efforts into building a mechanical system consisting of vibration pots, servomotors, pneumatics, and custom-designed mechanical parts for applying rubber products under the camera. We used the rugged industrial NI cRIO-9075 real-time controller because we needed accurate and reliable control of the mechanical system. Its reconfigurable I/O was indispensable during the development of the MV systems.

Quickly and Easily Deploying a Vision System

The first solution we implemented at the production site included NI 177x Smart Cameras. We developed the vision application nine times faster than if we had created a new mechanical system. We deployed the new features with the NI Vision Builder for Automated Inspection quickly and easily, even when we faced stricter demands and higher complexity, such as using one camera for each different product, better picture resolution, more images per product, or orientation-dependent inspection (Figure 1).

Figure 1. NI Vision Builder for Automated Inspection Flow

LabVIEW Versus C++

Because our requirements became stricter, our frame rate and image processing demands exceeded what was possible with an Atom-class processor. We could not maintain a sufficiently high frame rate in the allotted time with smart cameras. To continue the expansion of software capabilities, we started developing, in parallel, two computer-based vision software solutions—one using the NI Vision Development Module and one using a C++ module developed with Microsoft Visual Studio and an OpenCV library. We used the same MV-based mechanical system as before and controlled it with the NI CompactRIO platform. Instead of using a smart camera, we used an industrial USB camera and computer. We developed the MV application using LabVIEW in house, and outsourced the C++ development to a third party.

We comparatively tested both applications on the same MV system and computer to determine which programming environment to proceed with. The two approaches could not be compared in a straightforward manner because the code was completely different, but the goal was the same—find all faulty products. The LabVIEW MV application acquired 64 frames per second and processed the data in 900 ms, which means it took approximately 14 ms to process each image. The C++ application needed more than five times more time (80 ms per image) with the same acquisition time (1 s). Although the acquisition time completely depends on the camera’s frames per second setting, the processing time of LabVIEW was extremely fast. Furthermore, using LabVIEW for development was faster than using C++. We gained knowledge during development that facilitated later improvements, servicing, and adaptation to other products. All of this led to a decision to proceed with LabVIEW. Another advantage of using MV based on LabVIEW was the seamless built-in compatibility with CompactRIO for controlling the mechanical manipulation of products and building customized user interfaces without the need for external hardware I/O. We used a touch screen monitor to provide a user interface with all the desirable features for controlling the MV system (Figure 2).

Figure 2. Touch Screen and Custom-Designed User Interface in LabVIEW

We placed two MV systems based on LabVIEW into production. Both systems process 64 images with a resolution of 1200 x 300 pixels. We measured processing times on different computers with different configurations, as shown in Figure 3.

Figure 3. Inspection Times for 64 Images (1200 x 300 Pixels) Per Product

For final implementation, we used an Intel i7-2600s processor with less than 2 s total inspection time, which left us enough time for more reliable manipulation and the possibility for further expansion of software complexity.

Why We Chose a Solution Using the NI Platform

We implemented, tested, and compared three different MV systems in a production environment. Building custom PC-based vision software using the NI Vision Development Module proved to be the best overall solution. The system offered high-speed image processing, complex functions, and scalability. Additionally, we could not overlook the speed of integration for NI Smart Cameras and easy implementation of the vision inspection process, which was mainly due to high-performance features, rugged mechanical design, included digital I/O, communication protocols (RS232, Gigabit, and Ethernet), and VGA output to a monitor for image inspection.

With the NI Vision Development Module, we created a good algorithm for separating faulty and elongated (stretched) parts, which significantly reduced the number of false positives. Although the algorithm is already complex, low image processing time means we still have room for future software expansion based on complexity. Developing such advanced algorithms using C++ (with an OpenCV library) would require more development time.

Developing the MV system with NI equipment proved to meet all of our demands and helped us exceed the demands of our customers, thus gaining a significant competitive advantage. We learned that deciding to use a smart camera or a computer-based solution should depend on factors such as time of development, complexity of vision software, and desired hardware integration.

Author Information:
Peter Mohorko, CEO
Diff Avtomatizacija d.o.o.
Završe 8
Mislinja 2382
Slovenia
info@diff.si

Bookmark and Share


Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community


Who is National Instruments?

National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI