Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Do I need to change Imaq Create VI or related VIs for a 1394a firewire camera?

I have a program to acquire images from a Zeiss axiocam MR2 that has a PCI framegrabber.  Now I am trying to acquire images from one of their firewire cameras using the same program (while swapping the dll functions calls specific for the firewire camera) and it crashes every time I try to acquire an image, even while debugging in steps.  Is there something intrinsically different with the firewire camera that I need to do differently?  I create a 10 frame buffer with IMAQ create, set a ROI in the firewire camera (works no problem), create a pointer to the buffer, and then put the image into the buffer.  No problems with the camera containing a framegrabber but the firewire camera crashes every time on acquisiton.  Any ideas?  Thanks

0 Kudos
Message 1 of 8
(5,794 Views)

You need to use the IMAQdx driver for a 1394 (a or b) camera, not IMAQ.  Same with GigE cameras.  There are some example VIs to get you started in the NI Example Finder. 

0 Kudos
Message 2 of 8
(5,777 Views)

I have gone through a few examples and seem to be having trouble acquiring from the firewire camera.  A little background: I am using a Zeiss MRM3 firewire camera using their supplied SDK which includes an Acquisition VI.  From what I could see in the examples, the captured data can still be stored in a buffer using IMAQCreate.  I guess I am having trouble understanding why I would need to use the IMAQdx open/config/grab/close functions if I there is an image acquision VI from Zeiss (but it crashes at the point when I call the acquisition, unfortunately).  Should both approaches work for acquiring single frames to an image buffer? Will the native IMAQdx VIs work with any 1394a camera or does it have to be supported or configured before it will work?

0 Kudos
Message 3 of 8
(5,730 Views)

Hi jjsword, 

 

For information on IMAQ and IMAQdx, please check the link: http://digital.ni.com/public.nsf/allkb/0564022DAFF513D2862579490057D42E

Thanks
uday
0 Kudos
Message 4 of 8
(5,713 Views)

@jjsword wrote:

[...] Will the native IMAQdx VIs work with any 1394a camera or does it have to be supported or configured before it will work?


Firewire cameras must be compliant with the DCAM specification, see here.

0 Kudos
Message 5 of 8
(5,710 Views)

Ok.  I can see that a firewire camera that doesn't conform to the DCAM spec won't work with the IMAQdx driver so I can't take that approach.

 

What I still am not understanding is why I can't create a buffer using IMAQ create that I can then place images into using the acquisition function supplied by Zeiss.  It seems in the example below that in the case where IMAQdx is used to store images in a buffer using IMAQ create.

 

imaqdx.jpg

 

 

Then can you tell me why I can't use the following (or similar) code to snap images to the Image buffer or even a 1D array so long as I have a pointer, proper sized array to put the image data, and the array size? 

 

Thanks for your patience while I try to wrap my head around this 🙂

 

 acq.jpg

 

 

0 Kudos
Message 6 of 8
(5,703 Views)
Well, it is finally working using the code from the bottom of my last post. It had been crashing because I was passing the pointer to the array to the library function when I needed to be passing the value.

I did get confirmation that the camera doesn't conform to the DCAM spec so taking the conventional route with MAX would have been hopeless.

Thanks for the help!
0 Kudos
Message 7 of 8
(5,666 Views)

An edit to the image I posted:

acquisition mcam12.jpg

 

1376 is the width I had set for the ROI instead of 1388 and are values for the buffer size.

0 Kudos
Message 8 of 8
(5,536 Views)