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
Solved! Go to Solution.
> 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:
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.
Hope this helps.
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.