Case study: Smart cameras inspect drug packages

In March 1997, the US Food and Drug Administration (FDA; Rockville, MD, USA; www.fda.gov) issued a regulation to allow paper records and handwritten signatures to be replaced by electronic records and signatures.

Th 143488

In March 1997, the US Food and Drug Administration (FDA; Rockville, MD, USA; www.fda.gov) issued a regulation to allow paper records and handwritten signatures to be replaced by electronic records and signatures. This regulation, 21 CFR Part 11, can be found at www.21cfrpart11.com and applies to all instruments, applications, and operations that save data electronically to durable media. The rule is intended to ensure that electronic records are trustworthy, reliable, and equivalent to paper records.

Th 143488
In automating the inspection of pharmaceutical products, systems-integrator RC Systems needed to retrofit an existing automated packaging line with vision. To illuminate the product and perform 2-D data-matrix code reading and check the presence of all parts, the company uses the integrated LED ringlights of three DVT 540 cameras. To check the color of medicine-vial capsules, two external linear white LED arrays are used in conjunction with a color DVT 542C camera.
Click here to enlarge image

When a major pharmaceutical company wanted to incorporate machine vision into a 21 CFR Part 11-compliant automated packaging system, the company's integrator of choice, RC Systems (Hatfield, PA, USA (215) 393-9171), was tasked with developing a system that could inspect the assembly of boxes containing medicine samples. The system needed to determine the correct placement of pills in the pharmaceutical pack. Although RC Systems had experience with developing Part 11-compliant systems, it had far less experience with machine vision. Because of this, the company called on Brad Steele, an automation engineer with Mektron (Hawthorne, NY, USA; www.mektroninc.com), to integrate the vision component into the existing 21 CFR Part 11 packaging system.

"The design of the system called for two-dimensional (2-D) data-matrix code to be read from the pharmaceutical packages as they passed along a production line," says Steele. "The vision system needed to work with an existing predeveloped, pretested 21 CFR Part 11-compliant shell human machine interface (HMI) front end developed using Wonderware software from Invensys (Lake Forest, CA, USA; www.wonderware.com)," Steele says.

Steele chose the Legend Smart-Image camera from DVT (Duluth, GA, USA; www.dvtsensors.com) because of its ability to process data at the camera level, interface via Ethernet to the system, and be secure. "This was a crucial element to ensure the verification required for Part 11 compliance," he says. "We need the security to track and archive data from inspections and modifications we made to the DVT Framework software."

The machine-vision system uses three 540 cameras and one 542C color camera. These are linked via Ethernet to a programmable logic controller (PLC) from Allen-Bradley (Milwaukee, WI, USA; www.ab.com). The 540s use the cameras with integrated LED ringlights to illuminate the product, while the color camera uses two external linear white LED arrays. Four inspections are conducted on the line to ensure the presence of all parts, to check three 2-D data-matrix codes, and to check the color of medicine vial capsules to ensure the correct dosage is placed in the right box (see photo).

If a failure occurs, the system sets off an alarm and activates a reject mechanism. In either case, a detailed record is stored to maintain Part 11 compliance. A nine-shot history screen tells what failure occurred and why. Because manual assembly is involved, the line moves at a rate of 20 parts per minute. According to RC Systems vice president Bob Stagliano, his company complied with the strictest level of Part 11, ensuring that all legal requirements were met.

Capture and display

EthernetIP communications between the Allen-Bradley PLC and the DVT camera's onboard ActiveX control allows camera history inspection data to be dynamically obtained as the line runs. DVT's ActiveX control displays inspection images inside Wonderware's InTouch HMI shell and saves the images to the hard drive of the host PC. Should an operator need to make changes, a link from the 21 CFR Part 11 shell to the imaging software allows the operator to use the Framework software while at the same time complying with high security levels of Part 11.

To have the secure environment required, says Stagliano, the system must have log-on/log-off security, password encryption and display, access levels set up by an administrator, and audit trails of operator functions. Other required features include an operating system that prevents the operator from accessing the desktop and mandatory electronic signatures for any data change.

The process of capturing images from the DVT vision system and displaying them in a Wonderware InTouch HMI involved capturing images, determining if the images pass the required criteria, modifying the images if they failed, renaming existing images saved to disk, saving new images, and loading images in the InTouch HMI screens when a new image has been taken. To do this, DVT developed a Visual Basic (VB) program for RC Systems such that, when a trigger is generated by the PLC the camera takes an image. The program then requests the image and pass/fail information. The VB program executes a script that examines the result sent by the camera and assigns a pass/fail status to the image. As each new image is received, previous images are renamed. If the image fails, a second ActiveX control in the VB program merges the failed bitmap with the first camera image.

To load images in the InTouch HMI screen, condition scripts in InTouch such as a high trigger signal from the PLC are used. When InTouch receives this signal from the PLC, it refreshes the camera images from the disk using a third ActiveX control that acts as a bitmap viewer for resizing or zooming of the image.

Three ActiveX controls are needed because no single control has all of the methods or properties needed to perform all the necessary steps. While DVT's ActiveX control can save camera images to disk, it cannot merge other bitmaps with the saved image or load images from disk into InTouch. The second control can merge images in the VB program but will not work in InTouch and cannot display the images in InTouch. The third control can load bitmaps to be viewed in InTouch but cannot be used to merge bitmap images. — Andrew Wilson

More in Home