Example Code

Using Index Measurements in VBAI to Recursively Call a Step

Code and Documents

Attachment

Download All

Introduction-

This Vision Builder AI inspection finds five circles on the image with Geometric Matching and then index’s the five matches with the Index Measurements steps. It will then set a coordinate system and run a Find Edges on all five circles based on their indexed geometric matching location.

Steps to Complete-

- Download the two attached files.

- Open IndexInspect.vbai

- Go to the Inspect state and double click on the Simulate Acquisition 1 Step

- Then set the file path to point to the circles.png image that you downloaded.

- Run the inspection and it should look like the below screenshot.

Additional Notes-

You will need VBAI 2011 to run this.

IndexExample.PNG

IndexExample2.PNG

Applications Engineer
National Instruments

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

Contributors