Jump to content

How to change Exposure time from script?


---
 Share

Recommended Posts

From record function able to change only the exposure setting and not a actual time.

 

gom.script.atos.set_parameters_for_new_measurements (num_exposure_times=1)
gom.script.atos.set_parameters_for_new_measurements (num_exposure_times=2)

 

Link to comment
Share on other sites

hello...the question is why do you need to do this ?  if you have some exposure settings you like for a process save a template (even with nothing else inside) after you have put in the settings you want. 

this template can then be recalled by code if you needed to .

Link to comment
Share on other sites

  • 2 years later...

Hi, I recognize this is a pretty old discussion, but I'm also working on an application where I would like to set exposure times via the script. It would be possible to use the camera tab as usual, and I'll revert to that if I have to. But our users would prefer to stay in the script dialog, and setting the exposure times via the script feels like it should be easy to do.

In my case, the record function gives me a bit more insight,

gom.script.atos.set_parameters_for_new_measurements (exposure_time_factors=[3.0, 7.0])

but this still isn't enough information to know what those exposure times are.

I can also get the full list of exposure times

for current_measurement_exposure_time in gom.app.project.current_measurement_exposure_times:
	print(current_measurement_exposure_time)

But I can't set them.

RequestError: GScriptErr-0006 - Element "gom.app.project" does not have a settable attribute with the name "current_measurement_exposure_times".

So, how do you set that first exposure time? Also, how do you set the reference point exposure time?

Thank you!

Link to comment
Share on other sites

Please sign in to view this username.

i have the same question , what is your application?  Camera settings are not easy to handle in code because such settings are better handled through project template methodology.

Link to comment
Share on other sites

Please sign in to view this username.

 My users are scanning items for inspection in a warehouse type environment, but with big windows and lots of sunlight. This environment is really tricky for most automated exposure time settings because the lighting conditions can change so much between scanning sessions.

Also, for what it's worth, our inspections happen relatively infrequently, and as part of a larger inspection routine. We could train users for how to use Zeiss Inspect, but when possible, we'd prefer that they use our simpler UI than interact directly with Zeiss Inspect.

Link to comment
Share on other sites

Please sign in to view this username.

 thanks for context which leads to other questions! What digitisation system do you have ?  If it is a blue light system this should be less effected by different ambient conditions.  In the instance where the environment is having an effect on exposure times i cant bring to mind a way to logically deal with adjusting the exposure time paramter in code..i.e. I cant think of a way to say get an input of external light condition and calculate a factor say.

Im curious that youve built a ui.   Is this a manual system or an automated one?

I assume the obvious direction of controlling the environment is not possible!!

Link to comment
Share on other sites

We're scanning with an ATOS 5. You're correct that we can't control the external environment. We are impressed at how minimally the ATOS 5 is affected by ambient light, but we're still not confident that one exposure time setting could work for every possible lighting condition. And our process is manual.

I'm worried I may have made my goal sound more complicated than it really is. All I really want is for our users to be able to adjust exposure time explicitly (e.g. with a text box) and with a preview image. I would prefer to be able to do this from our UI, but even a command that pulls up the same dialog box as 

Digitize Workspace > Camera Tab > Exposure Time Mode (Interactive) > Exposure Times (User-defined)

would still be preferable to having our users navigate the Camera tab unassisted.

Is that possible?

Link to comment
Share on other sites

Hi Sam, off the top of my mind im afraid i cant think how this would be possible.

In my experience Its rare that that changes ambient conditions effects the exposure time requirements , it is more likely related to changes in part condition.

One exposure time is only really suitable for single colour matte components . Id almost always use two exposures to help cover a varience.  

Given the speed of the system this usually isnt a big deal.

Im not entirely sure if its suitable for manual systems, but for the Atos 5 a new exposure setting was developed called HDR which provides the widest spectrum of possible exposure input.  I.e. No setting to change , just let the system capture everything possible. I think the downside to this option is that each scan takes longer to complete .

Without seeing your setup and your parts live its really hard to give concrete advice.  If possible id suggest having a chat with a local application engineer to visit and review your needs.  

Link to comment
Share on other sites

I wrote this a while ago to validate an offline scan box program;
I wanted to set the exposure time to 8/18/32ms & I think I was having the same sorta issue;

however if you edit the measurement position you can change it through "measurement_exposure_times=[x,x,x]"
 

image.thumb.png.8f614db40d8c8e4d60451833853afa06.png

You can probably also set it through your scanning template(?)

as others mentioned; exposure settings depend on the lenses aperture, ambient light, projector brightnes...etc.etc.. and will differ from sensor to sensor
hope it helps.

Link to comment
Share on other sites

 Share

×
×
  • Create New...