magazine-button
Businesses are created for the purpose of generating profits. As such, all investments need to have a positive return to be justified. The incentive or driver for that justification is different at each stage of a project's life cycle.
Published in Columnbus

It takes vision to achieve success. Literally. Comact Optimization Inc., a Boisbriand, Que.-based developer of sawmill technology and equipment–which ranges from basic conveyors to complete, automated production lines–helps its customers optimize yields in the highly competitive lumber industry with machine vision.

For example, in machinery used for the linear transport of tree trunks, machine vision provides precise identification of each trunk's shape to optimize cutting operations.

"Using a triangulation method and an optimizer, we can determine how we should cut a given trunk to get the maximum amount of usable wood from it," says Guy Morissette, a development engineer at Comact.

Between two and 25 Pulnix TM-7, TM-200 or TM-250 cameras snap images of each tree trunk, and from two to 80 Lasiris lasers perform the triangulation calculations. To efficiently capture the large number of images required, Comact chose a Dalsa imaging board with four asynchronous acquisition channels.

"Because we can use up to four asynchronous cameras with this board, we were able to eliminate the synchronization circuits we needed for other boards," explains Morissette.

The high-speed Dalsa imaging board performs simultaneous acquisition of up to 40 MHz digitization per channel from up to four camera channels. Each channel features an A/D converter, synchronization circuitry, anti-aliasing filter, input lookup tables and the ability to respond to four independent trigger events. Buffer image data can be stored in local memory during heavy PCI bus traffic, helping to increase acquisition speed and host availability for processing.

Images are transferred from the image acquisition board to a PC for processing and optimization. The image analyser detects the slices of the laser on the trunk and builds a 3D shape. Then, the optimizer determines what products can be cut from each shape.

The resulting solution is transmitted to a programmable robot system, which controls the mechanical equipment that cuts each piece of wood accordingly.

Making the grade
Comact and its customers are also reaping the rewards of machine vision on the GradExpert grader. Using a 3D scanner reading and a colour machine vision system to detect such defects as rot, knots and cracks, GradExpert automatically determines the quality grade of each piece of cut timber (2x4s and other boards). Using machine vision dramatically increases throughput and provides more reliable inspections and more accurate grading than human operators.

High-frequency fluorescent tubes light each piece of wood. Eight Basler L301BC line scan cameras and eight image capture boards from Dalsa acquire images of the wood at speeds of up to 160 MB/second in search of any defects that would affect the grade of each piece. The Viper-Digital is a single-slot video acquisition and pre-processing board for the PCI bus that features high-speed, highquality image acquisition up to 160 MB/second. This board can handle a variety of data formats, including eight, 16, 24 or 32 bits/ pixel. Hardware speed is crucial to the success of the application, which demands real-time image acquisition and processing.

"The fact that our architecture is based on a PC helps us achieve our performance goals," comments Morissette. "In addition, programming is simpler and we can benefit from the flexibility offered by the PC."

And since the frame grabber features a driver to Baslerís L301BC line scan camera, Comact saved the time and money involved in developing a driver from scratch.

Another reason that Comact chose image acquisition boards from Dalsa for both applications is the ability to connect the boards to the QNX real-time operating system used in Comact's equipment via a simple serial interface. Comact develops all of its software in-house, from drivers to the user interface, using QNX technology.

According to Morissette, both Comact and its customers are pleased with the reliability and performance of Dalsa's boards in these two applications. So pleased, in fact, that Comact is also using Dalsa's Genie-M640 Ethernet camera, which can scan at speeds of

120 Hz. The company is using the camera in its geometry scanner system, replacing coaxial cable technologies. Indeed, vision continues to bring the company success.

Philip Colet is the vice-president of sales and marketing at Dalsa.

Published in Features
In my last column, I reviewed the OPC DataHub from Software Toolbox. An accompanying product, the OPC Extender, is a logical transition for your Visual Basic (VB) development needs.

Users can use VB to create an HMI with the data that is served up by the DataHub, though the same is true when using any OPC server. You can also use a direct PLC driver; but once the OPC Unified Architecture (OPC/UA) is released, most industrial hardware vendors will support this specification, making OPC/UA the preferred data access method.

In fact, such companies as Rockwell Automation will be embedding OPC/UA into their hardware platform in future releases. To create an HMI in VB using an OPC server, you have to create code to connect to an OPC server, and there are many ways to do this.

Standard procedure dictates that you access OPC tags by name, perform the read, and do something with it. The OPC Extender changes all of this, allowing users to create applications without coding. This extends all controls in every application in which it is used.

Installing the application is painless, but it will only work with Visual Studio 2003/2005 and .NET. The 2005 Visual Studio Express version is not supported, although that is what I used for testing. VB6 users can use the ActiveX controls that come with the product, but keep in mind that a lot of the power will not be realized if you do.

I opened up Visual Studio and started testing. The scope of this test is to connect, read and write using the Extender. Just to be clear, the process of getting data into an HMI using OPC requires the use of a configured OPC server, which includes defining tag names for each PLC address you need to access.

Once the VB development is open, you can start a new project, add a form and then add the Extender components you need. There are a few components that can aid in automatically stepping the user through the process of configuring the application.

I first added the OPC data engine that connects the VB application to an OPC server. This connector searches the computer that you named the default computer for installed OPC servers. These OPC servers will communicate to the PLCs and extract data, which you can then configure. The engine will enumerate the tags that have been previously configured.

The "Subscription" extender allows you to connect to the OPC data engine. It subscribes to the OPC data engine, and asks for the data and information that you specified on the form you added after launching VB development. I added and selected a text box. The properties for this text box show up in the "Properties" window in the VB development environment. The "SubscriptionExtensions Array" property is where the connection is made with the object on the form. Anyone who has written code to connect a data point to an object knows that there is a bit to do to make this happen. But so far things have been painless.

The control that you associate with the OPC tag needs to have its display property associated with the data that the tag provides. For instance, "TEXT" is the property to connect with the OPC data tag, while "CAPTION" is the property for label control.

Using the text box control, the OPC Extender can format the data, and make the control read only, write only or read/write. You can add multiple connections to the object when there are multiple properties that can be set. There is an "InvokeMethodName" associated with each control. This only has real meaning for customer-generated controls where certain methods can be invoked upon a data change, such as the "PumpON" method when a pushbutton is pressed.

What does OPC Extender really give users? It will give them a huge jump on the market when OPC UA finally comes out. Since it separates the engine from the extension, the engine portion is the only part that changes when your OPC driver changes. Most industrial VB programmers donít code that way to allow for an easy upgrade path.

Does the Extender do everything without coding? Not really. If you want to change the colour of the text in the text box when the value exceeds 100, you have to do that with code. Remember that the form controlsí method can be invoked when the data is changed, but the code has to be written.

Writing data is all done via code. However, the benefit of the OPC Extender is that you can work from the data that is attached to the control, and use the controls events, properties and methods in the code instead of the native OPC data.

The Extender is runtime distributable at no charge, so the price tag is easier to handle if you are dealing with OPC. The Extender can be very helpful for any OEM. Though it is expensive, it may just be the ticket for you if your applications cover various OPC drivers.

Software Toolbox will soon have a version that directly accesses PLC memory.

Jeremy Pollard is a 25-year veteran of the industrial automation industry. He has worked as a systems integrator, consultant and an educator in the field. Jeremy can be reached at This e-mail address is being protected from spambots. You need JavaScript enabled to view it .

PRODUCT SPECS:
Name: OPC Extender
Version: 1.1
Vendor: Software Toolbox
Application: Visual Basic development
Price: $1,195 US

Published in Columns

MA Online Resource Centre



Featured Video

More Videos...