Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

imaq1394 - Setting shutter speed in 640x480 mode slows acquisition rate

I am using a Pixelink PL-A781 camera and am having a few issues with regard to shutter speed. I am working in VB6 using the IMAQ Vision tools and NI-IMAQdx 3.1.
 
If I use the camera in 640 x 480 (30fps) mode and try to adjust the shutter speed, the frame rate immediately drops to something like 2-3 fps. The shutter speed adjustment does change the image brightness - it just slows the fps. The shutter speeds I am using should not significantly affect the frame rate.
 
When I try this in MAX, adjusting the shutter speed using the slider does not appear affect the frame rate although the image brightness if affected, as expected.
 
Any ideas?
0 Kudos
Message 1 of 7
(3,974 Views)
Are you continuously sending the frame rate in a loop, or are just sending the value whenever it changes?  Even if the value isn't changing, it probably has to stop the acquisition, set the value, then restart the acquisition whenever a value is sent.  If it is only once in a while, you wouldn't notice the temporary change in frame rate.
 
Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 7
(3,971 Views)

I am not sending any commands to set the frame rate.

I issue a one-time command to change the shutter, and the frame rate gets cut from 30 fps (or thereabouts) to 3 fps. I stop, clear, and re-set up the acquisition when I change the shutter.

Any other ideas?

0 Kudos
Message 3 of 7
(3,965 Views)

Not many other ideas.  I did mean shutter, of course.

Perhaps try not completely resetting the acquisition.  Just stop, change shutter, then start.  You shouldn't need to completely clear the acquisition and start from scratch.  In some cases, you can actually change the parameter without stopping the acquisition at all.  You could try that, but I would guess you would get an error.

Second idea - read the current shutter value, then set it to the same value and see if you get the slowdown.  After setting it, read it to see if it changed to what you wanted.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 7
(3,960 Views)

I tried what you said and had some success. I should mention that I have the camera set up in MAX as a IMAQdx device, but I am using the older IMAQ for IEEE-1394 function calls. I am programming in VB6.

When I started the program, the shutter value was 333. I changed it to 100, and the image got darker, but only for about 2 seconds, then returned to the original brightness. Putting in a still lower value made the image darker still, but again it returned to the original brightness after about 2 seconds.

I then did a imaq1394AttributeInquiry2CW for IMG1394_ATTR_SHUTTER, and it showed among other things Auto set to 1.

Couple of questions...

  • How do I set Auto to 0?
  • If I use IMAQdx, how do I set the shutter in VB6?

Thanks!

0 Kudos
Message 5 of 7
(3,939 Views)

I think you have to use matching function calls.  If you configure the camera in MAX to be IMAQdx, you must use IMAQdx function calls.  Same thing with the older driver and functions.

I think you can disable Auto in MAX.  It might be due to mixing the versions, though.  It might be easier to set the camera in MAX to the old drivers.

I don't use VB6, so I don't know the details for using IMAQ with it.  Hopefully somebody from NI will chime in here.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 7
(3,924 Views)
Hi Steverino,

If all of your programming is done with the NI-IMAQ for IEEE 1394 drivers in VB6, change your driver in MAX.  Just right-click on the camera in MAX and select Driver » Legacy NI-IMAQ IEEE 1394 IIDC Digital Camera.  You can then change your camera's attributes, like auto shutter speed.
Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 7 of 7
(3,904 Views)