04-27-2012 11:25 AM - last edited on 11-13-2024 02:44 PM by Content Cleaner
Check out the video mentioned above:
When you install VBAI, there will be an option to include LabVIEW support (if you have LV installed...LV 8.5 through LV 2011 is supported in the latest VBAI installer). If you select this option, the palette of VIs for controlling VBAI will be added (see the video for the location).
Hope this helps,
Brad
08-20-2013 07:49 AM
Hi All,
could someone please answer the original question in this topic. I am having the same issue, and for me it is not an option to use VBAI API in TestStand.
BR, Kimmo
08-20-2013 08:29 AM - last edited on 11-13-2024 02:44 PM by Content Cleaner
You actually can use the API in Test Stand. See this video:
If you don't want to use the LabVIEW API to control VBAI in TestStand, and you really want to migrate your inspection to LabVIEW, you will notice in the generated code there is a case structure with the names of the states from your inspection, and each state of the case structure will have a VI that inside has all the steps used in that state. These VIs that represent the steps have a boolean control to determine if they return results. You can create an indicator from the step of interest to get your results, but once you migrate and start making changes, you will have to make all these changes again if you need to modify your VBAI inspection and regenerate the LV code.
Hope this helps,
Brad
08-21-2013 01:50 AM
Thanks Brad,
Yes, the Migration process is one-way only, and the generated code needs lots of modifications. For example, the generated code is by default tied to the exact camera used in inspection. It took me some time to understand that the code actually seeks for the individual camera with unique serial number. And it does not help that this feature is not well documented by National Instruments.
But, it is now getting more clear to me, and I think I can live with it. Thanks for your tips!
Kimmo
08-21-2013 12:57 PM
If you need to change things regularly and you need to have the code in LabVIEW, I would recommend using the Vision Acquisition Express VI to acquire images and the Vision Assistant Express VI to process the images. These integrate much better with LabVIEW and allow you to more easily programmatically change things. If you need to programmatically change the camera though, you may want to skip the Express VI for this and just copy one of the shipping examples for acquisition.
Hope this helps,
Brad
08-21-2014 06:20 PM
Hi, I am trying to do something similar in a Real Time environment, so, I am not sure if using the API to control VBAI from LV is an option in this case. Please, advice.
Thanks!
08-21-2014 06:27 PM
or using shared variables?
Regards
08-21-2014 06:28 PM
Yes, the VBAI API allows to control VBAI engines running on Real-Time targets.
This example shows how to do it:
C:\Program Files (x86)\National Instruments\Vision Builder AI 2013\API Examples\LabVIEW Examples\LabVIEW API Example (Remote).vi
08-21-2014 06:36 PM
Hey Christopher, thanks for your quick response. I was worried about the performance in RT.
08-22-2014 11:26 AM
Just to be clear, you must currently run the VBAI API from LabVIEW on the host machine and you can use this to control VBAI running on an RT target. Currently you cannot use the VBAI API on a LabVIEW VI running on an RT target. Hope this is clear. If you want to run the VBAI API on RT, I'd be interested to find out more about your application. Let me know if this is the case, other wise as Christophe mentioned, there's no problem controlling VBAI on a target from your host LabVIEW using the VBAI API on Windows.
Hope that helps,
Brad