Inside Machines: Packaging Line Vision System Gets Speed Boost
Adding an RTOS to run alongside Microsoft Windows allows machine vision inspection system to process faster while keeping advantages of GUI.
The pharmaceutical industry is huge, with the number of medications being mixed, molded, stamped, and packaged every day in the millions, while demand continues to grow at an exponential pace. Regardless of the amount, the margin for error never changes. If one pill is put in the wrong packaging, the error could be a life or death matter.
As demand has increased, so has the need for rapid processing of medications with very tight controls to prevent any mistakes. The human factor has been reduced and replaced by high-speed vision inspection systems. The stringent requirements imposed by the inspection process dictate the use of real-time software, particularly when vision inspection functions are combined with automated production line control.
Vision inspection systems not only inspect individual pills, but also their packaging. The FDA mandates that 100% of the packages of controlled medications must be inspected to ensure that the right label is used and is affixed properly, the right lot number is printed, the right expiration date is printed, and, more recently, a unique serial number is being used to enable track-and-trace capability.
The same requirement for scrutiny applies whether bottles or blister packs are involved. Plus, for vaccine vials, it is important to verify that 100% of the vials have aluminum crimps that are perfectly formed. In the case of syringes, manufacturers often perform inspections on 100% of the product to make sure that each one is perfectly assembled. Since time is money, pharmaceutical manufacturers seek to automate the inspection process as much as possible, but the requirements for quality and safety are paramount. Such applications require very high-speed processing of high-resolution images, and quick decision making and activation of controls. Some systems can perform up to 200,000 inspections per hour, making decisions within 30 ms.
Such was the challenge and opportunity for Optel Vision Systems of Quebec City, Canada. The company delivers turnkey systems to the pharmaceutical industry that not only do inspection, but perform production line control functions, too. Because of the company’s expertise in the field, it was hired by a pharmaceutical contract packer to develop a new inspection and quality control system to upgrade a tablet processing line for the launch of a new dual-step dissolution tablet.
With this specific medication, a dosage error could cause serious health risks. As a result, proper and clear identification of the unit dosage is an essential quality factor. The safest solution to ensure the identification quality of the product is to perform a 100% electronic inspection. The alternative is to use extensive human inspection, which is costly and not as reliable.
Setting and operating a tablet printer is not easy due to the complexity of the various adjustments and the varying production speed of these machines. A monitoring system that can help the operator make the proper adjustment and get real-time feedback of the print quality will significantly decrease setup time.
Optel Vision Systems responded to the customer’s requirement by proposing an integrated computer system using an Intel-based processor board. The company uses different Intel processors for different applications, with single-core or quad-core CPUs, depending on the performance requirements of the application.
The system uses a camera to take a picture of each tablet as it passes a particular point on the line at a rate of 2,000 tablets per minute. Triggering the camera is handled by circuitry on a real-time I/O board of Optel Vision’s own design that performs high-speed counting of things like the exposure cycle of the camera, and that connects to the Intel processor board over Ethernet. The I/O board also interfaces to a rotary encoder that is attached to the tablet transport mechanism on the line. The image is processed in the computer by an algorithm that decides if the print on the tablet presents any flaw. If it does, the defective tablet is tracked through the system until it gets to the ejection station, which is also designed and supplied by Optel Vision.
Image processing is done on a dedicated core of the main processor using Optel Vision’s own proprietary algorithms. When an image is received, the algorithm compares it with a mathematical model of the correct product and then formulates a decision as to whether the image from the camera is a match. Its library includes about 50 vision algorithms, which must be capable of processing bottles, blister packs, or pill images at the rate of 10,000 per minute.
The tablet inspection system developed for this pharmaceutical packer uses two cameras and one computer, but Optel Vision has developed manufacturing inspection systems using as many as 20 cameras, served by three or four image processing systems.
To control all the real-time processing, the system uses real-time operating system (RTOS) software. Optel Vision’s engineers initially tried the embedded version of MS Windows NT but observed synchronization problems that would have caused products on the line to be missed. This occurred because Windows is primarily a human-directed operating system, designed to support the needs of servers and human users, and not high-speed machines or vision systems. Because of this, a critical piece of information from the I/O may be missed by the Windows processor while it is off performing an unrelated task.
The engineers searched the Web for software that could be added to Windows to solve the real-time responsiveness problem. They evaluated some Windows I/O software drivers and then experimented with developing their own driver software. Next, they looked into implementing the entire system on a real-time OS. All of these possible solutions were ruled out either because they didn’t work reliably or they were too complex.
What they wanted was a real-time operating system that works alongside Microsoft Windows, which can reliably handle all the high-speed I/O required by the system, while at the same time enabling the system to deliver Windows functionality to the system’s operator interface and database management software.
“We went back to the Web and searched for a vendor that understands how to combine real-time and Windows functionality easily and reliably,” said Louis Roy, Optel Vision’s president and CEO. “This led us to INtime, by TenAsys Corp. of Beaverton, OR.”
INtime takes control of the response-time-critical I/O devices in the system, while allowing Windows to control the I/O that is not real-time critical. Unlike some software that attempts to add real-time functionality as a device driver to Microsoft Windows, INtime is a separate software environment with its own task scheduler, which leverages hardware features built into Intel processors to ensure that the processing of time critical tasks is predictably accurate. (See figure 1.) INtime is supported by a suite of monitoring and debugging tools that are highly integrated with the Windows Visual Studio development environment, enabling the system’s real-time and Windows application software to be developed using the same tools and context-sensitive help functions. Real-time Visual Studio wizards are also included to enable rapid prototyping and deployment of real-time systems.
The new way of developing real-time applications with INtime is far superior to the way that Optel Vision’s engineers had developed software in the past. “We used to have a lot of software on the real-time board that was hard to debug because it was a closed system,” said Mathieu Gallant, head of electronics at Optel Vision. “Now with much of the real-time functionality moved to INtime, the software is easier to develop and maintain.” In the past, Optel Vision needed to make modifications to its software to support each new version of Windows as it became available.
As the system was upgraded to use INtime, the Microsoft Windows HMI (human machine interface) was maintained, making operator training to use the upgraded packaging machine very straightforward, though some additional functions were added to the HMI to support machine diagnostics.
Due in large part to the ease of development using the Windows/INtime environment, the complicated Optel Vision system was tested, installed, and running within three months of project start. The system was successfully validated and brought immediate benefits to the contract packer and absolute quality to the end customer.
With the ability to manage many more events at a higher speed, Optel Vision has a high-end platform that can be configured to support a much wider range of applications. For example, the company is currently working on new scanning equipment to be used for track-and-trace which will require extensive processing and precise product tracking to ensure the integrity of the serialized parent/child relationship between medications and containers during the packaging process.
Because a common I/O architecture is standard for controlling the cameras in these applications, replacing the separate I/O board with a modular software application that performs the same function running on INtime, Optel Vision is able to preserve its legacy investment in system software as it migrates from one application to the next. The company expects to be able to preserve the bulk of its investment again in the future as it engineers production line solutions that work with different types of tablets and tablet filling machines and other packaging equipment.
By automating the inspection and reject elimination processes, Optel Vision’s pharmaceutical customers using the tablet print process can now benefit from a much more efficient system. Eliminating the frequent machine stoppages and enabling their customers’ operator personnel to be used more efficiently has resulted in a ROI on the upgrade investment of less than six months.
A key lesson learned by the engineers along the way is that Windows by itself cannot be relied upon to support the precise timing of applications that involve high-speed parts processing. “It’s critical to work with a company such as TenAsys, who has the expertise to reliably combine real-time and Windows applications,” concluded Louis Roy.
Kim Hartman is vice president of marketing and sales for TenAsys.
For more information, visit:
- Events & Awards
- Magazine Archives
- Oil & Gas Engineering
- Salary Survey
- Digital Reports
- Survey Prize Winners
- CFE Edu
Annual Salary Survey
Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.
There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.
But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.
Read more: 2015 Salary Survey