Switching Inspections in Vision Builder for Automated Inspection

Updated Apr 25, 2023

Environment

Software

  • Vision Builder for Automated Inspection

After I run my inspection in Vision Builder I want to be able to switch to another inspection based off of some input value. How do I do this?

Vision Builder for Automated Inspection (AI) has a feature called Select Inspection that allows you to switch the inspection that is running based off of some input criteria. The selection can be made based on the value of a variable, the value of a physical input signal, or the result of any Vision Builder step that returns a numeric or string result. To set up the Select Inspection functionality:

For Vision Builder for Automated Inspection 2018 and newer
  1. Open NI Vision Builder for Automated Inspection.
  2. On the splash screen, select Configure Inspection.
  3. Click View»View Complete Inspection Set Up.
  4. Click Select Inspection in the left-hand pane and follow the instructions.


For earlier versions of Vision Builder for Automated Inspection
  1. Open NI Vision Builder for Automated Inspection.
  2. On the splash screen, select Configure Inspection.
  3. Click View»View Complete Inspection Set Up.
  4. Click Select Inspection in the left-hand pane. This will open the Select Inspection state where you can configure how Vision Builder for AI will choose which inspection to load after the current inspection finishes running.
  5. Add any steps in order to acquire the necessary transition criteria. For example, to choose an inspection based off of a TCP/IP message, you would add a TCP/IO step from the function palette.
  6. Add the Select Inspection step. In the window that opens, you can choose which step result to use as the criteria for selecting an inspection. 
  7. Add values to the table and associate an inspection to open with each value.
  1. Click OK.
  2. Click File»Switch to Inspection Interface.
  3. Click Open Inspection and navigate to the inspection that you want to run first. Run this inspection.
  4. If you enable the Inspection Selection button on the top toolbar, after the inspection runs once it will then switch inspections based off of the value of the input values configured in step 7.

Additional Information

The Select Inspection configuration resides on your copy of Vision Builder AI. If you are deploying your script to another computer or for an NI CVS, Industrial Controller, or Smart Camera, you will need to reconfigure the select inspection step in Vision Builder AI on that new computer.

For all communication options within VBAI, visit the VBAI configuration documentation.