Compact three-camera system with off-the-shelf components provides 360° inspection and defective-part rejection.
By R. Winn Hardin, Contributing Editor
With millions of beverage bottles produced in a year, ensuring the integrity of each one is a significant production challenge. To help solve this problem, Silgan Equipment Company (formerly White Cap), maker and supplier of metal, plastic, and composite closures in lug, press-on/twist-off, and aluminum roll-on styles, asked Manufacturing Control Solutions (MCS) for an automated, 360° inspection system that could identify defects in the capping process and fill levels in real time and send that information to an Allen-Bradley MicroLogix PLC that controls an eject unit to track the bad bottles. Silgan also needed a system compact enough to be placed on existing production lines and to tie into its current bottling systems (see Fig. 1).
Steve Belling, Silgan product manager, field equipment, realized that offering 100% automated inspection with the company's existing bottling systems would be a significant competitive advantage. “This new vision system will allow us to offer 360° inspection of the tamper band, as well as the standard cap metrics, in a significantly smaller package," Belling says.
Based on the defect specifications, MCS president James O’Reilly designed a compact inspection system with two Silgan enclosures-one to contain the cameras and backlights and a second that could be located anywhere within 20 in. of the first to hold the PC host. An Intel D845GEBV2 motherboard with 2.8-Gbyte P4 MMX microprocessor and an 845 chipset, 800-MHz bus, and built-in video card and LAN running Windows XP provide image-processing functions, while a Coreco Imaging PC2 frame grabber connected through a 26-pin ribbon cable to an Opto22 eight-in/eight-out I/O board handles peripheral I/O not controlled by the MicroLogix PLC.
Bottles pass through a tunnel in the stainless-steel enclosure. On one side of the conveyor are two JAI Pulnix A-11 progressive-scan, 640 × 480-pixel, black-and-white cameras positioned 60° off the perpendicular axis to the conveyor separated by a 4 × 8-in. Spectrum Illumination red LED array. On the other side is a third JAI Pulnix camera separated by two 4 × 4-in. red LED arrays. Although design of the enclosure limits interference by ambient light, O'Reilly chose red LEDs because of their output power and cost, even though the application does not require a commensurate red filter covering the camera lens to filter out the ambient light (see Fig. 2).
Together, the cameras and lights provide a full 360° of backlit coverage for each bottle-cap inspection. An Elo TouchSystems touch screen in the control cabinet provides operator control of the system, while the entire process is controlled by the MicroLogix PLC located in the main control cabinet.
NO TIME TO WASTE
O’Reilly chose to make the vision system a slave to the PLC because the PLC offers faster scan times. “Scan time is a function of a PLC without a direct complement in a PC,” O’Reilly explains. “Both PLCs and PCs have processors with an internal clock. But information from I/O in the PC, although present at the port in question, may or may not be visible to an application in real time because of the number of other functions monitored by a PC microprocessor.”
Another advantage of the MicroLogix 1200 is the built-in communication port. The PC communicates with the PLC thru a standard serial port without need of a special interface card (for example, PCM KT). Compared to standard PC interfaces, PLC faster scan time results in better spatial resolution for the overall system based on more timely bottle-tracking data. A PCM KT card in the PC could deliver the same scan speed compared to the PLC, but at greater cost, O’Reilly says.
“The standard encoder provided with the vision system has 600 pulses/revolution and works well with conveyor sprockets from 3.5 to 6 in. in diameter. Sprockets smaller than this should use a 300-pulse/revolution encoder, while sprockets greater than 6 in. should use 900 pulses/revolution,” says O’Reilly. “Conveyor speeds can be 150 ft/min or lower. Higher speeds with a smaller-than-3.5-in. sprocket will also require an encoder with less than 600 pulses/revolution. The encoder has a quick disconnect connector and a cable length of 8 ft.”
The operator begins the inspection sequence by cuing the inspection system with the touch screen that displays the MCS operator interface written in Visual C++. The PC passes the begin-operation signal to the PLC through the serial interface between the MicroLogix PLC and the PC. New inspection programs are also loaded across the serial connection from the PC to the PLC as needed, as well as other non-time-critical operations. From this point on, the PLC controls the operation, and communication between PLC and PC is carried out via the Opto22 I/O card to cut down on latency delays inherent to serial communications.
The MCS inspection system tracks the bottles as they pass through the inspection enclosure using data from the optical encoder attached to a conveyor drive shaft and hardwired to the PLC. The PLC triggers each camera in turn through a hardwired 5-V TTL connection between the PLC and the Coreco Imaging PC2-Vision frame grabber. Subsequent I/O functions are handled by Coreco Imaging Foundation Class functions native to the PC2 frame grabber. Each camera captures a 5-in-wide field of view per frame to provide sufficient overlap of the three images that result in the 360° inspection. The combination of stand-off distance and camera resolution ensures that the inspection system can find defects larger than 0.001 in.
With a combination of Microsoft and Intel open-source libraries and image-processing library, O'Reilly used a Sobel second derivative to identify defects in the tamper band after subtracting a golden image created during preinspection calibration from the inspection image. Edges are found within present regions of interest to cut down on the image processing requirements (see Fig. 3).
When a defect is located, the PC passes that information back to the PLC across a separate Opto22 I/O card connected to the PC2-Vision frame grabber with a 26-pin ribbon cable rather than the serial connection between the PC and PLC to expedite the command. The PLC then sends a series of commands to an ejector mechanism to push the defective bottle into a disposal area. Images, including cap and fill measurements, are stored locally on the hard drive and are accessible across a LAN for engineers that want to view pictures remotely.
"Recently, we added a motor option to the camera enclosure. The standard camera enclosure needs to be manually moved up or down depending on the bottle height. The new system has a motorized linear actuator with a position-feedback mechanism. After the operator chooses a saved job, the camera height automatically moves to the correct position,” says O’Reillly.
Coreco Imaging,St.-Laurent, QC, Canada
Elo TouchSystems, Menlo Park, CA, USA
JAI Pulnix, Sunnyvale, CA, USAwww.jaipulnix.com
Manufacturing Control Solutions, Glen Ellyn, IL, USA
Opto22,Temecula, CA, USAwww.opto22.com
Rockwell Automation (Allen-Bradley),
Milwaukee, WI, USAwww.ab.com
Silgan Equipment Company, DownersGrove, IL, USA
Spectrum Illumination,Muskegon, MI, USA