Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

migrate VBAI inspection result to LabView

Solved!
Go to solution

I have Vision Builder for Automated Inspection 2015, LabView 2016 and the myDAQ device. I have seen that myDAQ cannot be used directly with VBAI, therefore i have thought to send the result of VBAI inspection (pass or fail) to LabView so that it can process the result of inspection and communicates with myDAQ; then myDAQ will send a digital output to an external device. My question is: how do I transfer the result of the VBAI inspection to LabView?
Thanks for your support

0 Kudos
Message 1 of 5
(3,628 Views)
Solution
Accepted by topic author Santader

> I have seen that myDAQ cannot be used directly with VBAI

 

I don't think this is correct. You can create NI-DAQmx Global Virtual Channels associated with your myDAQ device in NI Max.

You can then use the Read/Write I/O (NI-DAQms step) located in the Communicate tab to read input lines set the state of output lines. The step will enumerate the global virtual channels you created in Measurement and Automation Explorer. This is what I would recommend you to try.

 

To answer your original question, there are different ways to transfer results from VBAI to LabVIEW.

You can create System Variables in VBAI, share them, and you can then access them in LabVIEW.

You can also create Shared Variables in a lvlib in LabVIEW, and create Network Variables in VBAI that points to them.

Using shared variables is best for monitoring in an asynchronous application.

We have a few tutorials that explain how to do that:

http://www.ni.com/tutorial/12322/en/

http://www.ni.com/white-paper/6883/en/

 

Finally, you can use the VBAI LabVIEW API to control VBAI from LabVIEW.

The API allows you to control VBAI from LabVIEW: start a VBAI engine, open an inspection, retrieve images and results.

We have examples located here:

C:\Users\Public\Documents\National Instruments\Vision Builder AI 2015\Examples\API Examples\LabVIEW Examples

 

The Vision Builder AI Product Support page is a good location to find additional resources about the product.

http://sine.ni.com/psp/app/doc/p/id/psp-741/lang/en

 

Hope this helps.

 

Christophe

 

Message 2 of 5
(3,605 Views)

Thank you very much for your exhaustive answer!

0 Kudos
Message 3 of 5
(3,592 Views)

Thanks to your help I managed to establish a direct communication between VBAI and myDAQ. Thanks so much

0 Kudos
Message 4 of 5
(3,559 Views)

Hello Christophe;

I have created an inspection in Vision Builder for Automated Inspection (Vision Builder for AI 2009 SP1). The inspection works great in Vision Builder for AI, but when I generate LabVIEW code from my script, I couldn't use/find the inputs and outputs in the LabVIEW (LabVIEW 2010).  I think, the same functionality must be programmed in LabVIEW, which leaves me more freedom to customize the VI (i.e. R, G, B values, numerical results, etc). How can I use these outputs in my main program (migrated LabVIEW program)? 

Thank's for your kind interest.

Cordially   

Download All
0 Kudos
Message 5 of 5
(3,067 Views)