08-22-2017 08:01 AM
Hello,
I have a program in Vision builder AI that acquires an Image and then process it.
I have two USB cameras connected to my laptop and I want to be able to select one of them from a LabVIEW VI.
Is there a way to do this?
Thank you in advance
Solved! Go to Solution.
08-23-2017 01:51 AM
08-23-2017 09:04 AM
To be clear, it sounds like you want to use your VBAI inspection from LabVIEW and switch which camera is used by the VBAI inspection using LabVIEW. Is that correct? What determines which camera to use? Could you just have a VBAI inspection that could acquire from either camera and have VBAI use different states and transitions to acquire from one camera or the other? If this is not what you want, please be more specific about your application needs.
I can help provide options for what you want, but before I spend time detailing how to accomplish it, I want to make sure we know what you want.
thanks,
Brad
08-24-2017 01:27 PM
Thank you for your reply.
Actually, I have 2 Cameras connected to my laptop and just one vbai program that acquires a picture and then analyze it.
I want to be able, via the VBAI toolkit in LabVIEW, to load the inspection and then send something like the camera reference or something like that (That I will chose from LabVIEW) to the VBAI program to acquire a picture from the appropriate camera. (That I have chosen from LabVIEW)
Thank you in advance.
08-24-2017 02:24 PM
There currently isn't a way to have a single Acquisition step in VBAI change which camera it is acquiring from. Your options are:
Or
I would recommend the first option since it will make it easier to interact and debug your inspection within VBAI since you can easily acquire new images within VBAI.
Hope that helps,
Brad
08-24-2017 02:29 PM
You hints are helping a lot.
Thank you very much
02-27-2018 09:06 PM - edited 02-27-2018 09:07 PM
- Have two acquisition steps in the VBAI inspection in different states.
- Use a variable to determine which transition to use that will acquire from one camera or the other.
- In your LV code, set the value of the variable to determine which camera you want and then use the VI in LV to run the inspection and get results.
I plan to use 3 USB cameras and along with motion to inspect 3 different sides of finish goods. Is this method applicable to USB cameras too? http://www.ni.com/example/31368/en/ <- this example shows how to create different states by using Compact Vision System. Is it necessary to use CVS for my application (3 USB cameras)?
Thanks
02-28-2018 10:03 AM
Are you doing the same processing on both cameras? Another solution is to have one inspection per camera, and from LabVIEW select the one you want to run.
02-28-2018 10:11 AM
Different process for each camera.
03-01-2018 11:23 AM
You do not have to use a CVS. The same concept can apply to your application if you are running it on a PC or other device. You just need to have multiple acquisition steps; one acquisition step for each camera.
You might want to look at Brad's reply in this thread as it might be a question you have if your 3 cameras are doing independent processing: https://forums.ni.com/t5/Machine-Vision/Is-parallel-execution-of-VBAI-inspection-states-possible/td-...