LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Labview Image Acquistition for Vision Builder AI

I am trying to write a custom acquisition VI in order to access some special features in my firewire camera which can only be toggled by using direct register access. I have managed to successly create a VI that does what I want, but I would like to be able to use this custom VI to acquire an image in VBAI and cannot seem to do so. The VI runs fine using the Run LabVIEW VI tool in VBAI, but does not return the image for use in other steps. Is there a way to do this?

I am using VBAI 3.0 and LabVIEW 8.0.1.

Thanks,
Nick
0 Kudos
Message 1 of 4
(3,060 Views)

Hello nglasser,


I believe most of your questions will be answered by this excerpt from the Run LabVIEW VI FAQs in the VBAI Help.  I will go ahead and quote it below.  You can access the full FAQ in VBAI at Help » Online Help.  Click Index, and search for Run LabVIEW VI.

 


Q: How do I use the current image from Vision Builder AI and modify the image so subsequent steps use the modified image?

In the VI Controls Tab, click the Configure button. If you have an NI Image control on the specified VI, select Current Image»Image as the value for the NI Image control. Once the current image is associated with your image control, you will have access to the current Vision Builder AI image. Any modification to the image is reflected in the resulting image after the VI is run.


Because the image passed in is the same one that will be modified, using an image display control can produce confusing results because it may not be clear if the image displayed is the original passed from Vision Builder AI or the modified version after the VI has run. It is recommended to use the NI Image control instead of the NI Image Display control to avoid confusion.

Note If you pass the current Vision Builder AI image to your VI, overlay calibration information and any other vision information in the image is preserved.



Please let us know if you have any further questions.

Regards,
Luke H

0 Kudos
Message 2 of 4
(3,037 Views)
Hi Luke,

I have managed to modify a pre-existing image in this way. I am looking for a way to acquire a new image from a camera (first step in the inspection) and return this image to VBAI.

Thanks,
Nick
0 Kudos
Message 3 of 4
(3,025 Views)

Nick,

I managed to get the functionality you are talking about working on my computer in a roundabout way.  I've included the inspection, vi, and jpg files in the attached zip file.  This needs to be unzipped to C:\LVImagetoVBAI\ to work properly.  Here's how it works:

  1. Simulate Acquisition step in VBAI
    This opens a blank image of the same size and bit depth as the image we are expecting.
  2. Run LabVIEW VI step in VBAI
    This VI accepts the pointer to the IMAQ Image and Snaps over it, this image is then returned to VBAI.

Of course with your acquisition you will probably have a more complex vi to grab the image (I was using RS-170), but the concept is the same - create an IMAQ Image by using the Simulate Acquisition step and pass it to the vi to be overwritten.

Regards,
Luke H

0 Kudos
Message 4 of 4
(3,000 Views)