キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Select VBAI camera from LabVIEW

解決済み
解決策を見る

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

0 件の賞賛
メッセージ1/16
5,811件の閲覧回数
I think I answer this before !
first check your camera in max if you can open cam in max so you can open it in labview
go to labview help in tools bar select find example in example finder window search for grab or snap there is several example for this reason that could help you
0 件の賞賛
メッセージ2/16
5,787件の閲覧回数

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

0 件の賞賛
メッセージ3/16
5,781件の閲覧回数

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.

0 件の賞賛
メッセージ4/16
5,769件の閲覧回数
解決策
受理者 hichem55

There currently isn't a way to have a single Acquisition step in VBAI change which camera it is acquiring from. Your options are:

  • 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. 

Or

  • Don't have any acquisition steps in VBAI, but create an image variable. Use a Select Image step to start processing the image variable.
  • In LabVIEW, acquire from the camera you want, then set the acquired image to VBAI's image variable, then run the inspection.

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

メッセージ5/16
5,765件の閲覧回数

You hints are helping a lot. 

 

Thank you very much

0 件の賞賛
メッセージ6/16
5,761件の閲覧回数
  • 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 

0 件の賞賛
メッセージ7/16
5,448件の閲覧回数

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.

メッセージ8/16
5,439件の閲覧回数

Different process for each camera. 

0 件の賞賛
メッセージ9/16
5,436件の閲覧回数

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-...

Clemens | Technical Support Engineer | National Instruments
メッセージ10/16
5,402件の閲覧回数