Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wednesday NI Vision Sessions

Similar presentations


Presentation on theme: "Wednesday NI Vision Sessions"— Presentation transcript:

1

2 Wednesday NI Vision Sessions
Infrared Thermography in Machine Vision Inspection Customize Vision Builder AI with LabVIEW Hands On – Compact Vision System Camera Technologies for Life Sciences and Microscopy Improving Machine Vision with Optics

3 Using LabVIEW to Add Your Own Functionality to Vision Builder AI
Christophe Caltagirone Staff Software Engineer – NI Vision Software Philip Wong Software Engineer – NI Vision Software Abstract In this session, we will show you how new features of National Instruments Vision Builder for Automated Inspection (Vision Builder AI) extend the limits of configurable machine vision. Using the newest version of Vision Builder AI, you can run your own image processing and analysis algorithm, written with NI Vision for LabVIEW, inside a Vision Builder AI inspection. Also, the Vision Builder AI Development Toolkit allows you to develop a custom Vision Builder AI step that you can use to implement application-specific solutions, such as report generation, or interface hardware not natively supported by Vision Builder AI, such as a motion card. Finally we’ll show you how you can deploy your Vision Builder AI application using your own user interface, written in the language of your choice, by driving Vision Builder AI with an ActiveX control.

4 Vision Builder for Automated Inspection
Easy to use, interactive, menu-driven configurable vision software Design Vision Applications More than 40 powerful machine vision tools, such as pattern matching, particle analysis, OCR Advanced arithmetic and decision-making capabilities Digital and serial I/O Built-in industrial protocols Migration to LabVIEW Deploy your Application (inspection interface) Vision Builder for Automated Inspection National Instruments Vision Builder for Automated Inspection is configurable machine vision software for prototyping, benchmarking, and deploying applications. Based on industry-proven National Instruments vision development software, Vision Builder AI offers an extensive set of optimized functions for image processing, machine vision, pattern matching, blob analysis, optical character recognition, and spatial calibration. The software also includes the ability to set up complex pass/fail decisions in order to control digital I/O devices and communicate with serial devices such as PLCs. Vision Builder for Automated Inspection is ideal for applications where short time to market and low cost of ownership is a must. Use Vision Builder AI to visually test whether products are assembled and manufactured correctly. Improve yields and product quality of automotive and electronics components, metals, fasteners, health care products, semiconductor wafers, food and beverage containers, and more. A built-in deployment interface gives you the ability to quickly deploy your inspection, guidance, or identification applications. Vision Builder AI does not require programming, but you can migrate your Vision Builder AI inspection script to the LabVIEW graphical programming environment. Advanced Decision Making With the decision-making interface, you can define pass/fail criteria and classify parts. You can set limits for each individual inspection step and also use the intuitive decision-making interface to create complex decision expressions for the entire system. The results of these decisions can be routed to digital lines, the user interface, or a serial port. Interface for Digital I/O and Serial Control From the configuration interface of Vision Builder AI, you can control the digital lines on any NI product that has DIO capabilities, such as an NI CVS-1450 Series compact vision system, an NI 6527, or an E Series DAQ device. These I/O signals can be mapped to global system signals, such as acquisition ready, part fail, and acquisition in progress. You can also send and receive messages over the serial port of the computer. You can create messages that include inspection data, inspection results, and customized data for transmission over the serial lines. Run as a Stand-Alone Vision System Vision Builder for Automated Inspection includes a built-in deployment interface with which you can quickly deploy your application after you have finished prototyping and benchmarking. The interface includes a graphical image window displaying each image under inspection, a table showing each inspection step with its pass/fail status, and a collection of statistical graphs monitoring useful quality control data, such as yield and efficiency. Scalable to Development Environments You can deploy Vision Builder for Automated Inspection in your machine vision system or extend the capabilities of your system by converting the Vision Builder AI script to LabVIEW code. Use this code to build a customized user interface or to add additional measurement or automation functionality, such as motion control and data acquisition.

5 How You Can Customize Vision Builder AI 2.6
Added capabilities with new Vision Builder AI 2.6: Run LabVIEW VI Step Run your custom VI from Vision Builder AI Vision Builder AI Development Toolkit Create your own Vision Builder AI step Vision Builder AI ActiveX control Drive the Vision Builder AI engine from your application written in your preferred development environment You can significantly extend the capabilities of Vision Builder AI with tools for integrating National Instruments LabVIEW VIs into inspection scripts, creating customized steps, and running the Vision Builder AI engine from within your own application using an ActiveX control. You can call LabVIEW VIs directly from Vision Builder AI to run custom vision algorithms, add custom overlays, and use advanced analysis functions, advanced LabVIEW VIs, and toolsets. This feature helps you expand your vision applications by integrating your own image processing algorithm and data logging into Vision Builder AI without having to migrate your inspection to LabVIEW. Vision Builder AI 2.6 also ships with the new Vision Builder for Automated Inspection Development Toolkit, which provides component providers and OEMs easy-to-use tools for developing custom steps for Vision Builder AI. By using the Vision Builder AI Development Toolkit, you can create new steps that resemble native Vision Builder AI steps while incorporating your own intellectual property. With NI Vision Builder AI 2.6, you can also use ActiveX to communicate with the Vision Builder AI engine. The ActiveX control gives you the ability to customize your user interface, access acquired images, and communicate inspection results in development environments such as Microsoft Visual Basic, NI LabVIEW, and NI TestStand test management software.

6 Run LabVIEW VI Step – Highlights
Add new functionality by writing and calling a LabVIEW VI in Vision Builder AI Apply your own algorithm to the Vision Builder AI image Leverage the power of LabVIEW and its toolsets and modules in Vision Builder AI The Run LabVIEW step is a new tool available in Vision Builder AI 2.6 that allows you to add new functionality to Vision Builder AI by calling a VI you wrote using LabVIEW 7.1 and IMAQ Vision 7.1. The interface gives you access to the Vision Builder AI image that you can modify by applying your own image processing algorithm. You can use any LabVIEW VI or LabVIEW toolsets in the VI you call from Vision Builder AI.

7 Run LabVIEW VI Step – Features
Use any LabVIEW feature within your VI Set the values of simple controls in the VI to previous measurements or constants Pass the Vision Builder AI image to your VI The interface of the Run LabVIEW VI step lets you set an image control located on the front panel of the VI to the Vision Builder AI image so you can modify it. The interface also let you set the values of numeric, Boolean, and string controls located on the front panel of the VI to constants or measurements logged by previous Vision Builder AI steps (for example, position of a particle, number of objects found, or average intensity of an area). You can then use these values to develop your own image processing algorithm, compute an advanced pass/fail algorithm, customize data logging, create a report, and so on.

8 Run LabVIEW VI Step – Features
Run and Debug your VI in LabVIEW Use the values of the VI indicators in future steps Vision Builder AI then automatically logs the values of the indicators located on the front panel of the image and makes these values available to future steps. If LabVIEW is installed on your system, the step features a debug tool that allows to debug your VI in LabVIEW.

9 Run LabVIEW VI Step – Demo
Show how user can use the front panel as input and to display additional information Overlay Chart in image Multiple Image Display Internet Toolkit

10 Run LabVIEW VI Step – Programming Techniques
Show VI front panel For user input To display additional information, such as charts and graphs Modification of the current image Directly modify the image passed to the VI, but DO NOT delete it Implement your own image processing algorithm Add custom overlay Use of global variable or shift registers Counting applications Computing statistics Multiple image display Using the VI Front Panel You can use the front panel of the VI as a user input or to display additional information. Show the front panel of the VI with property node. Front panels can be used to get input from the user that can be used in subsequent steps for decision making using the Decision Making or Calculator step. This way, an operator can set limits values in inspection mode, which was not possible before Vision Builder AI 2.6. You can also use the front panel of the VI to display information not displayed in the Vision Builder AI interface, such as a trend graph. Modification of the Vision Builder AI image Drop an image control on the front panel of your VI. When you configure the inputs and outputs of the VI in Vision Builder AI, set this control to the current image to make it available in your VI. You can then apply any image processing function to it. Directly modify the image, but do not delete it! This feature allows you to implement your own image processing algorithm and add customized overlay. For example, you can overlay measurements that you get from processing, your logo, or the picture of a graph located on the UI of your VI. Use Global Variable or Shift Registers You can use this feature to store data from one iteration to another or between two calls to the same VI in one inspection. Using this feature, you can implement counting applications, compute statistics on your inspection, or store different after different steps and implement a multiple display.

11 Run LabVIEW VI Step – Programming Techniques
Call external code using Call DLL node, ActiveX node, or .NET node Use IMAQ GetImagePixelPtr to access the image data Use existing LabVIEW libraries/toolsets Internet toolkit to send notification Report generation VIs or XML VIs to generate reports Database connectivity toolset to log results in a database Enable Web Server Publish VI front panel on HTML page Use remote front panel feature of LabVIEW to control Vision Builder AI remotely You can use the Run LabVIEW VI step to call external code with the LabVIEW primitives Call DLL node, ActiveX and .NET nodes. You can access the content of the image and modify it in your external code using the IMAQ GetImagePixelPtr VI. Use the full power of LabVIEW to implement specific features. Use LabVIEW add-ons like the Internet Developers Toolkit, report generation toolkits or Database Connectivity Toolkit to implement advanced features, such as notification on fail, advanced report generation, or database logging. By using the LabVIEW Web Server, you can publish the front panel of the VI you are calling and monitor the inspection from a remote computer. In conjunction with the Web Server, you can remotely take control of the VI and change the value of controls on the front panel to change limit values, for example, with the LabVIEW Remote Front Panel feature.

12 Run LabVIEW VI Step – Considerations
VI must be written in LabVIEW 7.1 Cannot write code that requires cleanup Supports simple data types: numerics, Booleans, strings, images. No clusters or arrays VI cannot return points Cannot draw regions of interest in the image window Do not need LabVIEW to run the VI in Vision Builder AI Limitations The VI you are calling must be written with LabVIEW 7.1 and the Vision Development Module 7.1. The VI is called at each iteration. You can detect when the VI is called the first time using the LabVIEW First Call? VI and perform some initialization code. If your code requires cleaning up resources, you must release the resources at each iteration. You can only set the values of simple controls on the VI front panel: images, numerics, Boolean, strings, and coordinate systems. You cannot set the values of arrays or clusters. Vision Builder AI uses the VI defaults for these controls. No tools are available to draw regions of interest in the main Image window. If you need to use an ROI in your code, you must hardcode it in your VI. The step can only log the values of simple indicators (numerics, Booleans, or strings). The step cannot log point results.

13 Development Toolkit – Highlights
Create Vision Builder AI native-looking steps Another option you have for adding customized steps to Vision Builder AI is the Vision Builder AI Development Toolkit. The Vision Builder AI Development Toolkit allows you to build a custom step in LabVIEW and integrate it into the Vision Builder AI palette. With the Vision Builder AI Development Toolkit, you can build professional looking steps and overcome some of the limitations of the Run LabVIEW VI step.

14 Development Toolkit – Use Cases
To interface hardware that needs to be initialized and released End user needs to change parameters in configuration mode Perform custom processing that requires specifying a region of interest interactively. You have a special camera or hardware that you would like to incorporate with VBAI, but you need to initialize the hardware and close the resources at the end. With the Vision Builder AI Development Toolkit, you can specify code that runs only once at the beginning and code that runs only at the end. You are an Alliance member or OEM reseller building a system for a customer that requires Vision Builder AI. You would like to include a customized step that looks native to the environment. You don’t want your customer to have to browse to a special VI and then link controls with previous measurements. The Vision Builder AI Developers Toolkit allows you to build a step that looks and feels like the other native steps of Vision Builder AI. You need to create a step that requires the user to interactively draw regions of interest on the image—perhaps to create templates or specify certain areas for processing. You can create such a step with the Development Toolkit. Within the code, an event is fired every time the user draws a new ROI in the image window, and the coordinates of that ROI are returned.

15 Development Toolkit – Features
Customize icon, description, and help file Choose which menu tab contains new step Access measurements logged by previous steps (including coordinate systems) Create measurements/points available in following steps Custom steps supported on NI CVS-1450 Series devices A default icon displayed in the Vision Builder AI palette is created for the step. You can easily modify this icon using Microsoft Paint. You can also modify the description that appears next to the icon. You can create your own CHM help file and link to specific pages for help. You can select which tab in the Vision Builder AI palette you would like your step to be located. For example, if your step deals with image acquisition, you may want to place it with the other acquisition steps in the Acquire Images tab. The code generated allows you to access results returned by previous steps in the script. Unlike the Run LabVIEW VI step, the data does not have to be of a simple data type. You can also return results and points for future steps in the script. Steps created with the Development Toolkit are also supported by NI CVS-1450 Series devices.

16 Development Toolkit – Overview
Wizard generates skeleton of the code that you can modify Design the configuration page of the step Write initialization, execution, and cleanup code Test and debug your code in LabVIEW Save step for distribution From LabVIEW, a wizard helps you create skeleton code to start from. You specify the name of the step, a description that appears in the Vision Builder AI palette, and the type of template you want to create. If you are creating a step that acquires images, you would select the type of template pertaining to Image Acquisition, and so on. You can even create a new step by copying a custom step you previously created. The VIs available for you to modify are created and organized in a main VI, which serves as a project window. You can then add code and modify the configuration page. The configuration page is the interface the user sees when they select the step and configure parameters for the step. The main code has three parts: setup, execution, and cleanup. The code you specify as setup is executed once when the step is inserted into the script or when a script that contains the step is loaded. The code you specify for execution runs during each iteration of the script. The code you specify as cleanup executes once when the script is unloaded or when you exit Vision Builder AI. The Vision Builder AI Development Toolkit gives you the capability to launch Vision Builder AI in the LabVIEW environment so you can test the step and see where you need to make any modifications. After the step is finalized, you can save the step to be used with the Vision Builder AI executable. Block diagrams and front panels are removed, so you can distribute the step without concern for exposing intellectual property. The step can also be saved for use with an NI CVS-1450 Series device and downloaded directly to device.

17 Development Toolkit – Demo

18 Development Toolkit – Considerations
Must write your step in LabVIEW 7.1 / NI Vision 7.1 Cannot create acquisition step for NI CVS-1450 Series device Custom steps cannot be migrated to LabVIEW Because Vision Builder AI was developed in LabVIEW 7.1, the Development Toolkit must also create steps using LabVIEW 7.1. Though most of the steps created with the Development Toolkit are supported on NI CVS-1450 Series devices, image acquisition with using a CVS-1450 Series device is currently not supported with the Development Toolkit. Also, users cannot generate LabVIEW code from scripts containing steps that were created with the Development Toolkit.

19 Development Toolkit – Example

20 Run LabVIEW step vs. Development Toolkit
Low-level UI Native looking UI Targeted toward end users Targeted toward system integrators and OEMs VI called at each iteration Provide mechanism to add initialization and cleanup code Specify ROI coordinates in the step Interactively draw ROI in the image window Included with Vision Builder AI Licensed separately for $995 This chart describes the differences between the Run LabVIEW step and the Vision Builder AI Development Toolkit so you can decide which one to use to solve your application. User Interface: With the Run LabVIEW VI step, Vision Builder AI provides a user interface that lets you set the values of the controls located on the front panel of the VI (parameters of your algorithm). With the Vision Builder AI development Toolkit, you can design the user interface to enter the parameters so that it looks like a native Vision Builder AI step. For this reason, the developer’s toolkit is targeted toward system integrators and OEMs, who want to design their own step, and redistribute it with Vision Builder AI to their end-users. The Development Toolkit provides a way to call initialization code, when a script containing your step is loaded, and cleanup code when the script is unloaded from memory, feature which is not available in the Run LabVIEW step. In the Run LabVIEW step, your VI is called at each iteration of the script. The Run LabVIEW step does not allow to interactively select a region of interest in the Vision Builder AI image, which you can do with the Development Toolkit. The Run LabVIEW VI step is included with Vision Builder AI. You must purchase a separate license to be able to use the Development Toolkit.

21 Vision Builder AI ActiveX Control - Highlights
Run LabVIEW step and Development Toolkit used to customize Vision Builder AI inspections ActiveX control used to drive the Vision Builder AI inspection engine within your application Gives programmatic access to Vision Builder AI Inspection interface You can use the Run LabVIEW step and Development Toolkit to customize the Vision Builder AI inspection. You can use the Vision Builder for Automated Inspection (Vision Builder AI) ActiveX Component to embed Vision Builder AI inspections in your ActiveX applications. The Vision Builder AI ActiveX control gives you programmatic access to the actions you can perform in the Vision Builder AI inspection interface.

22 Vision Builder AI ActiveX Control – Use Cases
Create custom user interface in LabVIEW or Visual Basic Use your own logo Retrieve the inspection image Retrieve step results / statistics Integrate into your application a vision inspection developed in Vision Builder AI Transfer data between your application and Vision Builder AI inspection using TCP/IP You can use the Vision Builder for Automated Inspection (Vision Builder AI) ActiveX Component to embed Vision Builder AI inspections in your ActiveX applications. Create your own user interface that calls the Vision Builder AI Inspection engine. Note that you don’t necessarily have to show any user interface to control the Vision Builder AI engine as the ActiveX control gives you programmatic access to control it. You can transfer data between your application and the Vision Builder AI inspection by inserting a TCP I/O step in the inspection and sending TCP/IP messages.

23 Vision Builder AI ActiveX Control – Features
Connect to a local or remote target Open existing inspection located on that target Get list of inspection steps and corresponding limit values Run inspection synchronously or asynchronously Receive events when inspection is complete or when image is available Retrieve step measurements, inspection pass/fail status, inspection statistics, and the final inspection image with overlays Summary of the methods and properties of the ActiveX control.

24 Vision Builder AI ActiveX Control – Considerations
Gives access only to results and actions/functions you can perform in the Vision Builder AI inspection interface Step limits are read-only Can retrieve only the final image, not images at any intermediate step Cannot access resources that the inspection uses Can only connect to one target at a time

25 Vision Builder AI ActiveX Control – Demo

26 Summary Vision Builder AI 2.6 is an open application that provides many new ways to customize the default product. Customize the inspection using the Run LabVIEW step or the Development Toolkit. Customize the user interface with the ActiveX control. Integrate a vision application written in Vision Builder AI with the ActiveX control.

27 Wednesday NI Vision Sessions
Infrared Thermography in Machine Vision Inspection Customize Vision Builder AI with LabVIEW Hands On – Compact Vision System Camera Technologies for Life Sciences and Microscopy Improving Machine Vision with Optics

28 Thursday NI Vision Sessions
Architecting an Image Acquisition System Machine Vision in the Frequency Domain Advanced Matching with NI Vision Tools


Download ppt "Wednesday NI Vision Sessions"

Similar presentations


Ads by Google