Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically stop VBAI

I am able to start VBAI with a PB into an T/F case structure, where the true (PB Pressed) has a "system exec.vi" which starts VBAI.  I now need to programmatically STOP VBAI with a Push Button (preferrably in VBAI.  I looked at the "user input" option, but it calls a pop up dialog which would interfere with my inspections (fast moving web).  I don't want to pop up a dialog every inspection to ask if I want to quit.  I would like to have a PB somewhere on the screen which stops VBAI.  Does anyone have any suggestions?  This is a touch screen, and there is no mouse and no keyboard, and the little "X" in the upper right is just too small for a finger to press.
Thanks for your help.
0 Kudos
Message 1 of 6
(3,950 Views)
Unfortunately, there's not a way to modify the user interface of VBAI to include a button to stop the inspection. I would suggest converting your VBAI inspection into LabVIEW code, and calling the generated VI from your main program. You can modify this generated LabVIEW code to add a button that will stop the inspection, and return to your main program.
0 Kudos
Message 2 of 6
(3,895 Views)

Fortunately the new version of Vision Builder AI will have the ability to create a custom interface. This interface can be a LabVIEW 8.5 Front Panel or one of the interface templates included with VBAI (so LabVIEW is not required). Controls will be available as measurements so you can control the flow of the inspection, or change values used in steps, and indicators on the front panel can be updated by previous measurements in the inspection. If you want to stop the inspection, you can have a large button, but this will allow you to go into a state that doesn't do anything (but the inspection will still be running). If you wanted to actuially stop the inspection, you would need to press the stop button. You might want to look into using ActiveX to control VBAI and this will give you programmatic control over running inspections, stopping, loading new inspections, and even connecting to targets.  Check out the VBAI ActiveX examples in C:\Program Files\National Instruments\Vision Builder AI 3.5\ActiveX Support\Examples.

Hope this helps,

Brad

Message 3 of 6
(3,856 Views)

Thanks Michael and Brad for your comments.  Brad, I assume that to use VBAI Ver 8.5, I must be using LabVIEW 8.5 also.  Is that correct?  Or, can I use LabVIEW Ver. 8.2 with VBAI Ver 8.5? 

 

Thanks

0 Kudos
Message 4 of 6
(3,846 Views)

The new version of VBAI (3.5) will be available for download in the next few weeks and it will require LabVIEW 8.5 to use the Run LabVIEW step or the new Custom UI step.

Hope this helps,

Brad

0 Kudos
Message 5 of 6
(3,840 Views)

The shipping version of VBAI features an ActiveX control that you can use to control VBAI. With the ActiveX Control, you can write your application and custom UI in LabVIEW and use the ActiveX control to open an inspection, run it and retrieve results. Look in C:\Program Files\National Instruments\Vision Builder AI 3.0\ActiveX Support\Examples for examples on how to use it.

-Christophe

0 Kudos
Message 6 of 6
(3,815 Views)