Original Publish Date : 6/16/2008
Smart programming for smart cameras
The introductions of data-flow programming techniques to smartcamera vision systems promises to change the way these systems are deployed.

Matthew Slaughter
National Instruments Corp.
Austin, Tex.

Consider a pick-and-place machine. Here a proximity sensor fires when a component comes in range. It triggers a robot arm to pick up the part and move it to a shipping container. Many times this usually works well, but some situations require a bit more data on the product the robot handles. For example, if one piece became rotated or skewed at some point on the line, the proximity sensor would not detect the out-of-position product. The attempt by the robot arm to pick up the piece fails because the arm was expecting the product to have the same orientation as all of the previous pieces.

In such a design, machine vision can replace the simple proximity sensor to detect the part and guide the robotic arm. A vision-based system not only triggers the start of the pick-and-place routine, but can also give the robotic arm the rotation and exact coordinates of the piece in question. This reduces missed parts, boosts machine efficiency and, in turn, saves the end user money. Vision systems can also read the 2D codes on parts to verify that the correct piece is being picked up and that all the nuts, bolts, and washers have been added correctly.

There are many other applications well suited for machinevision systems. These range from verifying labels on soda bottles to counting the number of pills packaged in a bottle as it is prepared for a pharmacy. Machine-vision systems easily perform no-contact measurements. Once engineers realize the roles machine vision can play in their new designs, the next question is whether to use a commercial off-the-shelf (Cots) machine- vision systems or to create something custom.

Many machine builders think they can save money using a custom design instead of a Cots approach. But there are many costs associated with a custom design that often go unnoticed until late in the game. Determining these costs up front makes it more obvious why Cots hardware is a more viable option.

One consideration is simply the time it takes to design a custom system versus the time it takes to implement a system using Cots components. It is no small task to create a custom vision sensor and set up I/O on that sensor to communicate with the rest of the machine. Years can go into the development of custom designs, and engineering time is not cheap. It’s often the highest cost associated with custom designs.

Support costs for custom designs can be higher. Cots product support falls on the product vendor.

Cots machine-vision equipment often take the form of smart cameras. These cameras combine an image sensor with a built-in processor that lets inspections run directly on the camera. Unlike traditional cameras that return images, smart cameras return inspection results. This helps lower overall system complexity.

Typical of the new smart cameras are the NI 1722 and NI 1742 models from National Instruments Corp. Powered respectively by 400 and 533-MHz PowerPC processors, both cameras use a monochrome VGA sensor of 640 480-pixel resolution that acquires images at a rate of up to 60 frames/sec (fps).

An RS-232 serial port provides signals that can go to a number of instruments and programmablelogic controllers (PLCs). Both cameras also have dual Gigabit Ethernet ports. One port communicates with PLCs or programmable automation controllers (PACs), such as the NI CompactRIO, for expansion I/O while the other reports results to the rest of the world. Both ports support the Modbus TCP protocol for connectivity to many PLCs.

As is typical with smart cameras, the NI models also come equipped with two optoisolated 24-V digital output lines that can connect to actuators, PLCs, and other devices. The digital outputs can drive up to 100 mA for generating pulse trains or single-shot pulses. This feature permits handling advanced applications such as stepper-motor control directly from the smart camera. A quadrature-encoder input on the NI 1742 lets the camera acquire images timed to a rotary or linear-drive system.

Lighting plays a critical role in any vision inspection system. The NI 1742 does away with the need for an external lighting controller because one is built directly into the camera. This lighting controller connects directly to currentdriven light heads, sourcing up to 500 mA of dc current continuously with up to 1-A strobed current. The integrated controller reduces the amount of wiring needed, cuts the cost of additional hardware, and shortens development time because the application program interface (API) for the lighting controller is built into the imageacquisition API.

Smart cameras are designed to perform many basic and advanced machine-vision functions including edge detection, geometric pattern matching, optical character recognition, and 2D bar-code reading. This means that instead of integrating individual sensors for all these tasks, engineers can use one smart camera to handle all of them.

Of course, smart cameras still must be told what to look for. In the case of the NI vision platform, there are two options for setting up inspections. The first uses a menudriven machine-vision package that demands no programming skills on the part of the user.

This is called the NI Vision Builder for Automated Inspection (AI) and ships with all NI smart cameras. It includes over 100 machine- vision tools such as pattern matching, OCR, DataMatrix readers, color matching, and so forth. The preconfigured inspection routines help reduce vision setup times dramatically.

Vision Builder targets users with limited vision experience yet desire standard vision inspection processes. Most often these inspections need only a simple Pass/Fail output as the part passes in front of the camera.

The second option employs NI LabView Real-Time along with the Vision Development modules. Engineers already familiar with Lab- View data-flow programming can develop their own applications and get more flexibility than that available through the preconfigured routines of Vision Builder. The LabView graphical-programming language provides APIs for machine vision along with data acquisition, motion, instrument control, and many other measurement and control functions.

NI considers the smart camera as a LabView target, so it can handle most virtual instrument (VI) programs written in LabView. If the programmer tries to do an operation the camera cannot perform, LabView alerts them that the operation is not supported.

The flexibility of LabView programming makes it possible to develop smart camera VI modules without the presence of a smart camera. One vision installation had to be up and running by a certain date, but the camera wouldn’t arrive until that morning. The VI module was created and tested using a monochrome video camera, a 640 480 pixel frame grabber, and the development PC as the processor. Once the smart camera arrived, all the programmer needed to do was drag the already written and debugged VI module over and drop it onto the camera target icon. The program ran without modification as the smart camera took on all duties. Only commands for the lighting controller built into the camera were added later as lighting control was not supported by the test setup.

The current models of smart cameras can control simple servoloops. For example, a smart camera generated pulses to control a stepper motor that rotated a bottle for a 360° inspection. The stepper position was monitored using the quadrature input of the camera.

Make Contact
National Instruments Corp.,
tinyurl.com/24w3dh

Read more about:

data flow programming at
tinyurl.com/53dp8e

machine vision at
tinyurl.com/49erex

Click on any of the images below for a full-size view :

Rate / Comment on this Article

Post a comment

Be the first to comment on this article

Login to post a comment
Friction Pendulum Sliders
At Colorado State University, Prof. John van de Lindt has applied a base isolation system to a light-frame wood building for shake-table testing. The test structure is supported on a base isolation system consisting of four sliding bearings. The bearings are friction pendulum system (FPS) bearings that isolate the building from the earthquake ground motion by allowing the building to “slide” laterally...
Earthquake Shake Table
At Colorado State University, civil engineering professor Dr. John van de Lindt conducted a series of earthquake shake table tests of a half-scale two-story residential building with an integrated one car garage as part of a National Science Foundation funded NEESWood project task related to seismic protection systems. The overall goal of that task is to enable applications of protective systems...
LG90 HGTV 1,000,000:1 Contrast Ratio
The LG90 provides for the ultra-high 1,000,000:1 high contrast and LEDs that provide whiter whites and richer blacks with the added benefit of increased energy efficiency. LED backlighting also results in more natural color representation and faster response time for smoother, more natural picture motion. LG's Intelligent Sensor provides automatic image quality optimization of brightness and...
Crestron TPS-6X Touchpanel
Designed for speed, style and extreme versatility, the TPS-6X is a 6-inch touchpanel that streamlines the Crestron family of panels, combining the features and functionality previously found in nine other models. The Crestron TPS-6X redefines touchpanel design, providing both a sleek tabletop form factor while also offering total portability. While docked, the TPS-6X is a wired Cresnet or Ethernet...
The NEESWood Project
The Network for Earthquake Engineering and Simulation in mid-rise wood frame construction (NEESWood) consists of a group of 15 shared use equipment sites to study seismic activity and building methods. Funded by the National Science Foundation, NEESWood’s goal is to safely increase the height of wood frame construction buildings to six stories while effectively incorporating technology that minimizes...
The blame game
I feel there was a glaring omission in Mr. Berke's May 25, 2006 column titled "For lack of a guard, a severed hand" — personal responsibility.
Shake, rattle, and modal analysis
FEA can be a useful tool for sizing up resonance problems.
Biomimetics could hold a key to next-generation body armor
Who would have thought that your wife's jewelry holds the secret to better body armor?
What's a mechatronics technician?
When Keith Campbell muses about industrial education, his thoughts go back to his uncle Ralph.
The meaning of bearing life
How long will a bearing last? Standardized life equations help to answer.
Engineering an ad
How do you convince a doubting public your truck is tough? You show them.
Tricked-Out Trucks
Stylists and engineers are exploring new ways to personalize pickup trucks, the best-selling type of vehicle in the U.S.
Tom-Thumb turbines power radio-controlled jets
Engineers have managed to shrink the modern jet engine until it is small enough to fit in model planes.
Engineering in India
Here’s a snapshot of the Indian engineers who increasingly compete for global manufacturing work.
Gulliver's Engines
Shrinking full-scale engines to pocket size is no small feat.
PRODUCT SEARCH
Powered by
SEARCH THE PLASTICS WEB™
Powered by
FORUMS
What’s Tough About Training
I have taught many Mechanial and Electrical Apprentices at a local company the basics and Trouble Shooting skills fr Fluid Power equipment. The classes...

Design Royalties
I was hired at my current position to maintain our machines. Outside of my general job duties I have built a new machine (with company funding) to...

Trustworthy engineer needed
Friends of mine have invented a clever, modular emergency shelter. They need a trustworthy engineer to make a 3D model of to make a prototype....

Dog clutch manufacturers
Can anyone recommend a reliable supplier for a part like the one shown here or on page 57 of Machine Design's Sept. 25 issue? Any suggestions greatly...

Rolled cylinder
that's pretty close tolerance for such a large item. Can you perhaps control the positon of the OD of the drum- mount the drum on rollers- and let the...