Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Basler ace camera smallest exposure time : value out of range

Solved!
Go to solution

Hello,

 

I am currently working with a basler ace camera : acA2040-90umNIR.

It is written in the documentation that the smallest exposure time is 42us when using a format pixel of 8 bits. This works perfectly with my VI.

 

Now I would like to push the exposure time to its limits. It is written in Basler doc that it is possible to set exposure time to 28us when using a Mono 12 pixel format. When I use Vision acquisition I am able to set the exposure time to 28 after choosing the right pixel format.

 

But when I try to do an acquisition I get an error : "Attribute value is out of range".

If I set again the exposure time to 42us I have no more problem.

 

I think this is a Labview error but I don't know how to override it.

 

Could anyone help me with this?

 

Thank you and have a good day!

0 Kudos
Message 1 of 5
(3,274 Views)

Hello,

 

What do you mean when you say "when I use Vision acquisition I am able to set the exposure time to 28 after choosing the right pixel format?" Are you saying that writing the value to the property node doesn't return an error, but starting an acquisition returns an error?

 

Have you tried it in MAX? MAX provides a bit more debugging information for attributes that are out of range. If you look in MAX, what does it say the minimum is for exposure time (can also be queried programatically in LabVIEW via the property node)? Those ranges are created from what is described in the camera's XML file and reading some registers on the camera. It's possible that the camera's documentation doesn't match up with the camera's firmware version and XML file describing the features.

 

If the range stated in MAX includes 28us as a valid value, I'm wondering if it's actually another related attribute causing the error.

 

It's possible that changing the exposure time has the side effect of changing another value (perhaps DeviceLinkThroughputLimit or something related to frame rate) and ends up making it out of range. If that's the case, we'd need to find out which other attribute is invalid. MAX should give you more debug information on this than LabVIEW can, so I would strongly encourage you to try it there. If you're in this case, you should be able to manually adjust whatever the other attribute is to make it in a valid range again and then succeed with your acquisition.

 

If you're still having trouble, respond to this thread and I can help you set up attribute tracing to get more information. It would also be helpful if you could attach the camera's .icd file and XML file (C:\Users\Public\Documents\National Instruments\NI-IMAQdx\Data).

 

Hope this helps,

Katie

 

Edit: Just curious... Have you tried this in Pylon?

 

0 Kudos
Message 2 of 5
(3,250 Views)

Hello Kensign,

 

Thank you for your answer.

 

When I am talking about "Vision Acquisition" it is the express VI, which in fact seems to use MAX.

In MAX, I can set the pixel format to Mono 12 then choose 28us for the exposure time. I can do some tests while configurating the camera and it works. But the configuration is over and creates a VI, the VI cannot run.

Mono 8, minimum exposure time is 42 usMono 8, minimum exposure time is 42 usMono 12, minimum exposure time is 28usMono 12, minimum exposure time is 28us

I get "Error -1074360302 occured at IMAQdx Configure Acquisition.vi Possible reason: attribute value is out of range"Error when using the VIError when using the VI

 

If I repeat the exact same process with a 42us exposure time there is no problem running the VI.

 

I think you will understand my problem with the screenshots above.

 

Also please find attached the files you asked for.

 

I have not tried with Pylon.

 

I am looking forward for your reply, thank you for your help!

 

Florentin.

Download All
0 Kudos
Message 3 of 5
(3,233 Views)
Solution
Accepted by topic author floworm

Hi Florentin,

 

I had a chance to dig up a Basler camera here with similar behavior (exposure time minimum of 42 us for Mono 8, but 28 us for Mono 12), and reproduced your issue.

 

The core problem is that we save the attributes in such an order that it tries to write the attribute of exposure time first, and then write pixel format. Because the camera defaults to a pixel format of Mono 8, the 28 us exposure time is invalid at that point until later when you change the pixel format to Mono 12.

 

Attributes having dependencies is quite a common thing, so the software should handle that correctly. Since it currently isn't, I think there is something wrong with the camera's XML file where it is not correctly identifying the relationship between pixel format and exposure time. Namely, that the value of the exposure time min and max depends on the pixel format.

 

There are several ways you can work around this... In no particular order, here are some options:

  • Configure a default user set for the camera where the camera is powered on with a pixel format of Mono 12
  • Leave the exposure time as 42 us in your express VI, then convert the express VI to a sub VI and add an attribute write immediately after writing the settings to update the exposure time to 28 us
  • Hand edit the .icd file on disk and move the line containing Exposure Time to the very end
  • Hand edit your XML file to resolve this issue**

**I attempted to do this, but couldn't get the complicated logic just right. You would need to contact Basler and perhaps they could provide a modified XML file that you could replace on disk (and ultimately a firmware update with this change).

 

I will contact Basler about this myself to help resolve this in the future.

 

Please let me know if you have any questions about those potential work-arounds. Hopefully one of them will work for you. I can give more details if needed.

 

Thanks,

Katie

Message 4 of 5
(3,203 Views)

Dear Kensign,

 

As I was already converting the express VI to a sub VI to get all camera parameters in a string (a kind of icd file), I just put the line containing Exposure Time to the very end (3rd solution).

 

And it works!

 

So thank you very much, I can now keep going on my project.

 

Florentin

0 Kudos
Message 5 of 5
(3,193 Views)