Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision Assistant - Using Camera in script not saved image

New to NI Vision so this may be horribly basic.  I am using NI Vision Assistant 17(.5 i think) with a Basler USB 3.0 camera.  I have successfully acquired images, built scripts, generated VIs and tested my VIs with saved images. 

What I want to do is have my VI acquire an image when executed instead of using a file.  Currently when I run my VI, it prompts me for an image.  I want it to take grab a new image.  How do I do that?  I have been (and will continue) searching but have not had any luck

 

Thanks!! 

0 Kudos
Message 1 of 2
(2,574 Views)

Hello,

 

You have two options to do that:

1) When you generate the code from Tools>>Create LabVIEW VI, after selecting LabVIEW in the first step of the wizard, click Next. The second step of the wizard allows you to choose the source image. By default, Image File is selected. Choose Image Acquisition instead, and the code generated will acquire images using IMAQdx.

2) A better solution is to decouple acquisition from processing by using the Acquisition Express VI located in the Vision Express palette to configure your acquisition, then use the Vision Assistant Express VI in that same palette to do the image processing. You can save your current Vision Assistant script and open it again in the Vision Assistant Express VI you drop. The processing code will be create inside the Express VI.

That method allows you to easily make changes to the Vision algorithm by double clicking on the Express VI. It will open Vision Assistant with the vision algorithm you configured. You can make changes in Vision Assistant and the code will then be updated in the Express VI, allowing seemless back and forth between Vision Assistant and LabVIEW.

The drawback of the first method (Tools>>Create LabVIEW VI...) is that this is a one way to LabVIEW. If you need to make changes, you have to open the Vision Assistant script again and overwrite your VI.

Note that if you need to make changes to the Express VI, you can do so by right clicking on the Express VI on the diagram and choosing "Open Front Panel". The Express VI is converted into a subVI that you can then modify but the link to Vision Assistant is then broken.

 

Hope this helps.

 

Christophe

Message 2 of 2
(2,561 Views)