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
- Open NI Vision Builder for Automated Inspection.
- On the splash screen, select Configure Inspection.
- Click View»View Complete Inspection Set Up.
- Click Select Inspection in the left-hand pane and follow the instructions.
For earlier versions of Vision Builder for Automated Inspection
- Open NI Vision Builder for Automated Inspection.
- On the splash screen, select Configure Inspection.
- Click View»View Complete Inspection Set Up.
- 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.
- 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.
- 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.
- Add values to the table and associate an inspection to open with each value.
- Click OK.
- Click File»Switch to Inspection Interface.
- Click Open Inspection and navigate to the inspection that you want to run first. Run this inspection.
- 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.