Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Basler 102f LV7/LV8 Shutter Time Problem

I wrote a program to control a Basler 102f CCD camera. The camera has an advanced feature to set the maximum shutter time to 4095 ms.
Now I want to switch from LV7 to LV8. The program runs as it should, however the maximum possible shutter time is changed to 133 ms whenever I run the program. I can set it to 4095 ms in the Measurement & Automation Explorer, but these settings are changed back to 133 ms once the program is executed.
Does anybody have an idea what happens?
0 Kudos
Message 1 of 6
(4,537 Views)

I do not know what difference can LV8 make relative to LV7, but all my Basler 102f cameras work as expected under LV7.1 and IMAQ1394 v2.0.1 (on the target machine they run under IMAQ1394 v2.0.2). I can control Shutter all the way up to 4095 with no problems. Depending on the acquisition mode, the actual frame rate may go down if Shutter is set too high. For example, in 1280x960 Mono 8 (15 fps) mode setting Shutter to 4095 reduces frame rate from 15fps to 12fps.

On the side note it's worth to note that Shutter units (like 4095) are just digital numbers and not milliseconds. Conversion to actual msec is specific to particular camera model. In any case shutter time can not be longer that frame duration, which for 15fps is T1=1/15=66.7 msec and for 7.5fps is T2=1/7.5=133.3msec

Hope this helps.

0 Kudos
Message 2 of 6
(4,516 Views)
Hello groegler,
 
did you test your Basler A102f with the LV IMAQ Example VI "HGrab and Attribut Setup.vi ?
 
you find it in LV under  \Program\National Instruments\LabVIEW 8.2\examples\IMAQ\IMAQ1394 examples.llb
 
does you use the actually IMAQ1394 Driver Version 2.0.3 ?
 
i hope it can help you.
 
best regards Uwe
0 Kudos
Message 3 of 6
(4,508 Views)
Hello Viksiv and Uwe, thanks for your comments!

I forgot to tell one detail, which might be important. In my application it is important to be able to set the shutter time to very long times. So I set the shutter time base to 1 ms (by writing this value in the appropriate register of the camera), and then shutter time value effectively equals 1 ms and as a consequence the maximum exposure time can be a little over 4 seconds. It might be the .vi to do this that causes the problem, because when I try the "Grab + Attribute" example, I can set the exposure time value to 4095 (just not with the time base of 1 ms).
Strange is also another detail: When I start my program it first works, as I want it to (setting the time base to 1 ms). Not before I stop and restart it, it changes the maximum exposure time value to 133 (and probably changes the base value also). To find out where that change happens I added indicators of the maximum exposure time value right at the beginning of the program (after the init.vi) and right before the end of the program.
Then, when I first start the program the first indicator shows me a value of 4095 and when I stop the program the second indicator switches to 4095 also. But when I restart the program, the first indicator switches to 133. So, I do not understand, where that change occurs.
Is it possible, that it has to do with some video mode, the camera is in? (Video mode is not important for me, I only need to take single pictures. I am acquiring pictures with mono 16).

Best, Dominik
0 Kudos
Message 4 of 6
(4,496 Views)

Hi Dominic,

If there is no need for actual video in your application, I would investigate using SNAP instead of GRAB to acquire images. Probably in Snap mode camera allows more freedom in Shutter setting since there is no FPS restrictions imposed by Video Mode.

I am not familiar with setting shutter time base to 1 ms thru camera register but if it really works the explanation of your camera behaviour may be as follows (I am speculating here):

On start-up and during Init.vi call camera reads data from its registers including shutter time base. If you change register value to 1 msec after Init, camera is un-aware of the change and continue to use old value. This is easy to check, because if my guess if correct than after setting Shutter to 4095 in Mono16 (7.5fps) mode camera shall continue to run at (or close to) 7.5fps. Video at 7.5fps is fast enough to be easy distinguished from video at 0.25fps = 1 / 4095 msec. What was the camera video rate during your first run - still 7.5fps or 0.25fps?

Once you stop the camera and start it again, camera actually reads 1 msec value from the shutter time base register. However, maximun shutter speed in Mono16 (7.5fps) video mode is 133.3msec = 1 /7.5 that's why Shutter Attribute value is cut-off by camera at 133 digits. It is not clear what happens to value in shutter time base register when you turn off your camera and turn it on later. Depending on particular camera the register may keep its new value or it may re-initialize to its default. 

Viktor

 

0 Kudos
Message 5 of 6
(4,495 Views)
Hello Viksiv and Uwe,

It really was a problem with the frame rate. When I changed the video mode from "(Mono 16)(7.5 fps)" to "Scalable Image Mode 0" everything works. The image area is even a little larger in this mode.

Strangely this problem only occurs on one computer and not on the other, even though the same OS (Windows XP) and LV Versions (7.1) are installed. I also exchanged the firewire cards to see if that makes a difference.

Thanks for your comments,

Dominik
0 Kudos
Message 6 of 6
(4,417 Views)