Example Code

Verify Wires: Vision Builder AI

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • Vision Builder for Automated Inspection

Code and Documents

Attachment

Download All

Description

Description:

In this example, you will use Edge Detection and Color Measurement steps to verify that the part under inspection has a black wire on the left and a red wire on the right. You will edit the default Inspection Interface with the Pass/Fail status of only a few specific steps. For this example, you will use the disk that has the electrical connectors with the black and red wires attached to it.

 

This example instructs you to use a simulated acquisition step instead of acquiring images from a camera.  In an actual inspection, a simulated acquisition is not practical and a camera should be used to acquire images of the parts as they are inspected.

 

Here is a link to download Vision Builder AI 2012 SP1 f2.

 

This example was used during the Getting Started with NI Vision session at NI Week 2013. The other example is Detect Coins: Vision Builder AI.

 

Instructions:

  1. Images should be located at "C:\Seminars\Getting Started with NI Vision\Verify Wires\Images" Otherwise, you can change the first step to their current location on disk.
  2. Run the inspection to inspect the coins and display the results; it is expected to "Fail" on an image with only 2 coins. The inspection should automatically cycle through the images in the folder.

 

VerifyWiresExample.jpg

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.