Machine Vision 4 Users
Machine Vision and Image
Microscan Tips and Tricks
My View by Andy Wilson
Vision Systems Spain
In industrial manufacturing, last thing you want to deal with is unreadable barcodes interfering with production. Decoding failures may require downtime for diagnostics and equipment adjustments, which results in unforeseen costs, lost opportunities to meet business objectives, and a lot of frustration. After all, using barcodes in production is supposed to streamline operations, not complicate them! But the fact is that even after you go through the checklist of standard to-dos to prepare your operations with quality barcodes and ideal barcode-reading conditions, some circumstances may be beyond your control and unpredictable no reads may still result.
But help is available. Instead of focusing on the condition of your barcode or the setup of your operations, you may be able to attack barcode readability issues from the barcode reader itself by using more powerful decoding algorithms. In this blog post, I’ll offer some advice about how you can dedicate less of your limited resources and valuable time to barcode reading and more to getting business done.
Insights about OCR Vision Applications with CIJ Printers (Part 1 of 3)
One Monday morning I find this email in my mailbox sent by a customer:
‘Hi Eldad, how is it going? Can you help me with this application: I have a CIJ printer installed on a high speed production line. Several lines of text are printed on each product. I need a vision system for inline inspection of the printed characters. I try using OCR tool, then compare the data read by the camera with a data string sent from the printer and finally generate a warning output signal when mismatch occurs. I find it hard to train the system with one font library to solve all products. I still have lots of false rejects, where the camera rejects good products. I’m on it for several days and still cannot make it work – can you advise?’
As technology advances, manufacturing is becoming more and more automated. Robots are becoming the standard in most manufacturing lines that require fast, repetitive, precise placement of components. Many other types of automated equipment are being used for inspection to ensure components are placed in specified locations, check for missing components, and ensure fluid levels are at the exact level. Traceability information is collected by reading barcodes on parts in production so Operations knows exactly where every product in the manufacturing plant is at any given time and where each product has been. In order to achieve this type of automation we embed devices like machine vision cameras to give equipment eyes for visual inspection, and auto ID imagers and laser scanners to allow equipment to trace product through the manufacturing process. When developing your automated equipment it is imperative to choose a machine vision system, auto ID imager, or laser scanner that fits your precise requirements. There are five things to consider when choosing an embedded machine vision camera, auto ID imager, or laser scanner for an application: barcode type and orientation, inspection parameters, application speed, integration space, and data communication needs.
We frequently get support questions on how to acquire and store data generated by our machine vision or Auto ID readers in some form of file. Microsoft Excel is a widely used tool by many businesses to manage, process, and share data. In this post I demonstrate a way to integrate our Ethernet devices—such as the Vision HAWK and Vision MINI Xi Smart Cameras, and our QX Hawk and MINI Hawk Auto ID readers—and their output into an Excel sheet.
How do you actually retrieve and archive the data that a barcode scanner or smart camera generates? This is a question that we as Solution/Application Engineers often face. In particular, is there a direct way to get the data straight into an Excel sheet without the need for any temporary flat-file storage? Such solution would circumvent any intermediate data import or other data staging procedure, creating a lean framework for data capture and management.
A data management nightmare indeed, Microsoft Excel is still by far the most widely-adopted Business Intelligence tool across all domains of business life. Now, how do you make a smart camera or barcode scanner write its output directly into an Excel sheet without any flat-file data staging or third party software components?
Excel makes use of the MS Windows event-driven programming language called VBA (Visual Basic for Applications). This gives access to the Windows API and the many functionalities offered in the Windows DLLs. In Excel this facility is referred to as 'writing a macro'.
Data arriving over TCP/IP to a Windows host system is being managed by the Windows Socket or Winsock. This Winsock API makes it possible to read and write data across TCP/IP connections.
As with most programming endeavors, all roads lead to Rome, and I took one of them (which, admittedly, was mostly copied and pasted from people knowing more than I do). The VBA code contains one standard module and a class module, see Figure 1. The standard module sets up the connection by calling the class module with arguments such as IP address and port number using user input. The class module initializes the connection and manages the data capture and data writing into the sheet.
Can these codes be read by your scanners or readers? Or by your customers'?