Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing exposure time during an IMAQ 1394 trigger acquisition

I am having difficulty changing the exposure time during an triggered acquisition.  I am taking a triggered sequence of 10 images with 20ms exposure time then I increase the exposure time to 267ms and take one more image.  I would like to keep all of the other camera settings the same, but change the exp. time for the last image.  Currently I am using a property node after the 10th image is taken to increase the exposure time.  Then I wait a second for the new setting to take effect, and take the image.  The image still appears to have the 20ms exposure time?  I even tried to take 4 images with the new setting and only keep the last thinking that it might take a while before the new exposure time to take effect?    Even when I stop and unconfigure, or use the close and then reinialize the acquisition with the 267ms exp. time the image still appears with the 20ms exp. time?  Does anyone know how I can do this?  Thanks in advance for any help.
 
Kevin Baker
0 Kudos
Message 1 of 11
(5,005 Views)
 

Kevin,

did you already test it with the NI-Example "Grab and Attributes Setup.vi"? You should find it on you PC at \National Instruments\Examples\Imaq\Imaq1394 examples.llb.
This example works very well.
You could download the latest driver version at http://digital.ni.com/softlib.nsf/websearch/09F9367451DB38278625702D00673856?opendocument&node=132060_US 

Best regards,
Steffen Hoog

0 Kudos
Message 2 of 11
(4,998 Views)

Thanks Steffen:

The problem is that when I try to use a triggered sequence

0 Kudos
Message 3 of 11
(4,950 Views)

Thanks Steffen:

The problem is that when I try to use a triggered sequence of

0 Kudos
Message 4 of 11
(4,950 Views)

Thanks Steffen:

The problem is that when I try to use a triggered sequence of images

0 Kudos
Message 5 of 11
(4,950 Views)
Thanks Steffen for the reference to the examples.  I am not having a problem with using a trigger sequence of images when the exposure time is the same for all the images.  I am taking 11 images, but the last image needs to have a longer exposure time.  I would think I would just need to change the shutter attribute, but the 11th image still has the shorter exposure time?  How can I make the last image in the aquisition have a longer exposure time?  Thanks for any help.
 
Kevin Baker
0 Kudos
Message 6 of 11
(4,950 Views)

A sequence acquisition does not allow for a delay between images.  It will snap all 11 images without any delays.  I think the only way to do what you want is to use a sequence for 10 images, then snap the last image separately after adjusting the parameters.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 7 of 11
(4,943 Views)
Thanks Bruce.  Are you saying that when I set up the trigger acquisition with a certain number of buffers they all have to have the same attribute?  I cannot change the attribute for the last image?  Thanks again.
 
Kevin Baker
0 Kudos
Message 8 of 11
(4,936 Views)
Kevin, 
you can not change the attributes during a triggered acquisition if you use a Sequence for acquisition. But it is possible to change attributes during a Grab or Ring acquisition. Use a for loop for the first 10 images for example or count the buffer number to change the attribute in the right moment (before the acquisition of image 11).
Regards,
Steffen 
0 Kudos
Message 9 of 11
(4,934 Views)
Kevin

Setting attributes on the fly can be a tricky endeavor. Setting the camera attribute does not guarantee that the value will persists immediately. It may take a buffer or two (or some period of time) before the change is actually applied to the image stream. This differs from manufacturer to manufacturer.

Lets look at your example. You have a triggered sequence of 11 buffers. If you use a high level sequence, then there is no way to set the camera attribute between buffer 10 and 11. A high level sequence runs synchronously and only returns control once all the buffers are filled, or a timeout occurs.

If you use a low level triggered sequence, then there is hope. A low level sequence runs asynchronously and leaves control with the user. So once you start the sequence you can monitor each buffer as they come in. You can optionally start processing on each buffer as it completes. Now the 10th buffer comes in. Theoretically you should be able to set the exposure to 267ms and the next time a trigger arrives, the camera should expose with the new value. This assumes that sufficient time (5-10ms by default) should pass for the register write to stick before the next trigger arrives. This also assumes that your camera will immediately integrate the settings and apply it to the next time a trigger arrives.

There are windows registry keys (See appendix on register level programming in the User Manual) to speed up register access. That may assist in setting the exposure before the next trigger arrives. But at the end of the day it depends on the camera. Which camera are you using?

I am concerned that you are unable to set the exposure to 267ms when you perform a reconfigure. Have you ever been able to get an image that reflects a 267ms exposure time (in MAX or one of the examples)?

Regards

Johann
0 Kudos
Message 10 of 11
(4,904 Views)