Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IEEE 1394 multiple camera access

Hi,

I am trying to access two SONY XCD-X710CR from my LabWindows prgram. When I access a single camera, everything works fine, but when I access the two and call imaqDisplayImage to display both images (I configured a continuous grab session for both), it seems that the buffers are being overwritten because both windows show how the images are being updated. I setup the application with a Callback per camera. When I call imaq1394GetImage2, I already tried all combinations for the onOverwrite parameter and get the same results.

Any idea ?
0 Kudos
Message 1 of 7
(4,426 Views)

Did you use different buffer names for each camera?  If you don't, you end up with a single buffer shared by two cameras that keeps getting overwritten.

At least this happens in LabVIEW.  I'm not even sure if you have buffer names in LabWindows.  I suppose you would have to make sure you allocate two different buffers to store the images in.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 7
(4,417 Views)
Hi Mr Ammons,

Yes, I have a separate buffer for each image. Now I am realizing that probably I am getting those frames in that way because the communications between the cameras and the PCI 8252 should be set in the isochronous transfer mode, which guarantees bandwidth but no data integrity.

Does anyone knows how to change that setting in the IMAQ IEEE 1394 driver or in the PCI 8252 ? I also realized that in the Windows Registry under imaq1394k there are some values called AsyncTransferDelay, AsyncTransferDelayCount, and AsyncTransferTimeout. How those values affect the transfer ?
0 Kudos
Message 3 of 7
(4,408 Views)
Hello Pacsoft,

To be sure that we are solving the right problem, could you describe in better detail the discrepancies that you seeing in your acquired images?

Based on the description that you have provided thus far, there might be a bandwidth issue occuring between the cameras.  As a test, try setting the speed of the acquisition for the two cameras to 200 MB/sec instead of 400MB/sec, and decrease the size of the packets that are being transferred.  You can make these changes in MAX under the Acquisiton Settings tab for your camera. 

Regards,

Mike Torba
National Instruments

0 Kudos
Message 4 of 7
(4,380 Views)
Hi Torba,

I have two callback functions, one for each camera, and I setup the two cameras for a Grab session; in other words, the two cameras are transmitting in the Firewire bus at the same time. The problem is that when I display the images, it seems that there are some image chunks missing. I think this is happening because sometimes the cameras are not being able to transmit all their packets, so when the FRAME_DONE event occurs and my callback is called, the image is not complete. I also think that the event is being generated because the tranmission is set to Isochronous mode, where bandwidth is guaranteed. I do not know how to change to Asynchronous so data integrity is guaranteed.

When I command each camera to send a single frame, one camera at a time, there is no problem. That is why I think I have an issue with the amount of data being transmitted by both cameras.
0 Kudos
Message 5 of 7
(4,379 Views)
Pacsoft,

I do know that there is an async input for the ImgSequenceSetup callback that will toggle the acquisition between synchronous and asynchronous mode.  However, I do not see the same functionality for ImgGrabSetup.  Try performing a sequence for both of the cameras with this setting set to asynchronous mode, and see if you can acquire both images without flaws.

Regards,

Mike Torba
National Instruments
0 Kudos
Message 6 of 7
(4,342 Views)
Pacsoft,
 
For the sake of argument, try swapping your firewire card with another one.  There is a possibility that the card itself might be causing this behavior.
 
Regards,
 
Mike T.
National Instruments
0 Kudos
Message 7 of 7
(4,272 Views)