Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid trigger overrun with 1394 drivers?

Hi LabViewers,

I have done a triggered acquisition with a Marlin camera, LabView and 1394 drivers at 6.5 fps. For each frame I have to do some time consuming image analysis.

Is there any way to make sure that the delay between images is the same as the trigger delay? In other words, I want to make sure that there's no trigger overrun.

Any suggestion would be appreciate!

Raimon




0 Kudos
Message 1 of 4
(5,160 Views)

Are you using continuous buffering on your images?  That will make sure all the images are acquired without losing any.  You still need to make sure your average processing time is less than the acquisition time, but you won't lose any images if some take longer to process than others.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 4
(5,154 Views)
Raimon

In order to avoid a trigger overrun, you want to minimize your time spent waiting for a buffer. You should set your camera to use the fastest frame rate possible, even if you are only triggering at 6.5fps. Assuming you have 640x480 camera. In MAX you can configure the camera to run at 30fps or 7.5fps.

With 30fps, the firewire packet size is 1280 bytes and it requires 240 packets (or 30ms) to transfer the whole image to the host computer.
With 7.5fps, the firewire packet size is 320 bytes and it requires 960 packets (or 120ms) to transfer the whole image to the host computer.

Setting the camera to run at 30fps, even if triggering at 6.5fps, you can free up to 90ms for image processing. That is a lot of extra processing time for very little effort.

The driver will keep track of buffer numbers. Use the buffer number deltas to ensure that each frame increments by 1. See the Triggered Grab.vi that ships with Version 2.0.x of the driver for an example of detecting trigger overruns.

Regards

Johann
Message 3 of 4
(5,138 Views)

Hi Johann,

Thank you very much for your answer. I will try it and I am sure it will work. I am sorry, but there has been an error scoring your message. I am trying to fix it and give you the best score!

Regards,

Raimon
0 Kudos
Message 4 of 4
(5,118 Views)