moviMED Logo

System Integrator

Member Since 2007


moviMED is Southern California's leading provider for custom machine vision solutions. The company provides turnkey engineering services, machine vision system solutions offering an analog frame grabber, the AF-1501, for the National Instruments CompactRIO, as well as a variety of off-the-shelf machine vision components, such as cameras, lenses, frame grabbers, illumination and motion control components. moviMED also offers IR-NDT (non-destructive testing) Pulse and Lock In Thermography. moviMED is a National Instruments Alliance Partner and Certified Vision Integrator. moviMED - Motion - Vision - Medical and beyond.

Content Filed Under:

Aerospace and Fabricated Metals Aerospace , Fabricated Metals , Metrology , and Military/Defense

Component Verification , In Process Verification , and Measurement (Non Contact) Component Verification , In Process Verification , Measurement (Non Contact) , Process Control , Quality Assurance , and Visual Inspection & Testing

See More

High-Speed Cylinder Inspection Using LabVIEW Real-Time and IMAQ Vision Software

POSTED 09/27/2011

 | By: Markus Tarin, President and CEO

v>Authors: Markus Tarin, Carlos Agell, Jesi Kinnevan, Dave Ritter

NI Products Used:
LabVIEW Real-Time Module, PCI-6254, NI PCIe-1427, PCI-8433, NI 1762 Smart Camera

Manufacturing, Machine Vision/Imaging

The Challenge:
Implementing a machine vision application to gauge 20 cylindrical parts per second that are two or three in. long and 9 mm in diameter to micron tolerances at line speeds of 52 in. per second. 

The Solution:
Using NI hardware and software along with a custom, eight-core Xeon workstation running the NI LabVIEW Real-Time Module, two synchronized Camera Link cameras, dual NI Camera Link frame grabbers, and other custom and third-party components to solve a particularly challenging gauging problem for a national government contractor.

System Software and Hardware Components

The selected NI products for the system included LabVIEW Real-Time and NI vision software, two NI PCIe-1427 Camera Link image acquisition boards, an NI PCI-6254 Multifunction M Series data acquisition (DAQ) board for encoder tracking, and an NI PCI-8433 serial interface board for RS422 communication with the factory programmable logic controller (PLC). We used two DALSA Falcon 4M30 Camera Link cameras for the profile measurements and two NI 1762 Smart Cameras for the cross-sectional gauging.

Optical components from SILL included a custom-designed dual-lens collimated light source and matched SILL S5LPJ1007 telecentric lenses. Advanced Illumination supplied strobe controllers and NI Smart Camera backlighting units. In addition, we used a rotary encoder from BEI for camera triggering and EDT supplied two pairs of Camera-Link-to-fiber-optic converters to extend the Camera Link cable length to 60 ft, which was required for factory installation.  

Difficult Optical Challenges

Several factors made this project especially challenging. The first issue was the physical dimensions of the part. At 9 mm in diameter and a length between 2 and 3 in., the aspect ratio of the part was problematic. The specs called for a measurement resolution of 1.5 µm, but even with specialized hardware, achieving the 1.5 µm target would be a formidable challenge. A 16 megapixel camera with a telecentric lens at 1:1 magnification was specified. However, even with this configuration, engineers at MoviMED, a National Instruments Alliance Partner, quickly concluded that sub-pixel interpolation would be necessary to increase the effective resolving power of the measurement system. 

To further complicate matters, there were no standard 16 megapixel camera lenses available that could meet all of the optical specifications. It quickly became clear that it would be impossible to achieve the necessary minimum spatial resolution of 7 µm using a single camera; therefore, we had to implement our next best solution using two cameras and a prism that would allow us to fold one of the cameras out of the way while we used the 1X optics we needed. This complicated the matter because we needed to calibrate two camera imaging spaces and treat them as one. We had to calibrate for multiple axes of freedom between both cameras and account for a small amount of jitter due to vibration between the two cameras. 

Another problem was the line speed because the camera would need a global shutter to ensure that motion blur was not introduced during gauging. At a line speed of 52 in. per second and tight tolerances, motion blur could quickly become an issue. In this application, a single pixel of motion blur could introduce enough measurement uncertainty to exceed the specified tolerances. Therefore, an exposure time in the order of 5 µs was necessary to “freeze” the part and prevent motion blur from introducing gauging errors.

To meet the optical system challenges, we combined two DALSA Falcon 4M30 cameras to create a single image space. Each camera was equipped with a 1X magnification lens to image the part onto the cameras’ 7.4 µm pixel sensors. Unfortunately, the minimum shutter speed for these cameras was 15 µs, so we used an Advanced Illumination strobe controller to reduce the overall exposure window. The strobe controller drives a custom SILL (blue LED) backlight with a current of 6A for 5 µs to freeze the motion of the part onto the two cameras’ sensors (Figures 1 and 2). 

Figure 1. Optical System Setup and Profile Measurements

Going the Extra Distance to Meet the Spec
Although we achieved the goal of 7 µm optical resolution using commercial off-the-shelf (COTS) cameras, it was still not adequate to meet the 1.5 µm measurement specifications required by the customer. Therefore, we indicated edge detection algorithms with sub-pixel interpolation. Fortunately, this requirement was well within the capabilities of the LabVIEW Real-Time Module image processing tools. Having the sub-pixel capabilities available out-of-the-box in the LabVIEW Real-Time Module saved countless hours of development time and testing.

Figure 2. The Optical System Setup with Two NI 1762 Smart Cameras for Cross-Sectional Gauging

Performance Challenges

With the optical challenges addressed, the next issue was system throughput. After gauging 20 parts per second, there is only 50 ms left to capture the images, take the measurements, and transmit the results to the PLC. While 50 ms may seem like a relatively large time window in the context of modern system throughput, it is important to note that each of the Dalsa cameras generates a 4 megapixel image. That means to consistently and accurately apply sub-pixel processing algorithms to 8 megapixels of 16-bit image data, we need system throughput of 320 Mbytes per second. 

PCI Express was the only bus option when looking for ways to continuously stream this much image data; therefore, we interfaced the Dalsa cameras to two NI PCIe-1427 Camera Link DAQ boards. We integrated both frame grabbers into a single, custom, industrial PC workstation running LabVIEW Real-Time for Phar Lap. 
The PC used for this application was not a standard COTS industrial workstation PC. To handle the sub-pixel processing and throughput load for 320 Mbytes of image data each second, our engineers assembled a custom, eight-core Xeon powerhouse with 4 GB of RAM and redundant solid state drives. The custom real-time PC supplied the hardware platform and the muscle while a fine-tuned LabVIEW Real-Time application, enabled by sophisticated NI vision tools, contributed to the processing finesse to meet the unusually challenging application requirements. 

Iterative Software Development Approach

To meet the rigorous throughput demands, several iterative cycles were undertaken before settling on the final software architecture. It is not always easy to predict how LabVIEW Real-Time will allocate tasks to multiple processor cores; therefore, we investigated several gauging strategies and software design approaches to better understand multicore utilization in a LabVIEW Real-Time context. These investigations helped our software engineers find the optimal balance between measurement integrity and system performance.
This project would have been difficult to complete without the use of LabVIEW Real-Time, NI vision software, and NI hardware. With built-in multicore support, versatile vision libraries, and NI PCI Express Camera Link frame grabbers available off-the-shelf, we were able to divert our attention away from the basic hardware and interfacing issues and toward the difficult domain challenges at hand. The NI tools enabled us to focus on the more esoteric and problematic challenges presented by the requirements and deliver an application that would have been extremely difficult or perhaps impossible to complete using standard tools. 

Figure 3. Imaging Systems Block Diagram
Markus Tarin
15540 Rockfield Blvd, Suite C-110
Irvine, CA 92618, USA
Tel: 949.699.6600