not possible to adjust camera settings

In this subforum specific Topics concerning ZEN Core, e.g workbenches, are discussed
Post Reply
Martin Sunding
Posts: 2
Joined: Tue Jun 06, 2023 3:59 pm

not possible to adjust camera settings

Post by Martin Sunding »

I can read camera settings (exposure time, white balance, etc) with OAD macros but cannot change them, except for enabling/disabling autoexposure and possibly a few other settings.
As example, I can get the exposure time by using:

Code: Select all

hardwareSettingRead = Zen.Devices.ReadHardwareSetting()
 exposuretime = hardwareSettingRead.GetParameter('MTBCamera_MTBTube_Cameraport.Axiocam705c', 'ExposureTime')
But the following code does not set the exposure time to 500 ms:

Code: Select all

hardwareSettingSet = ZenHardwareSetting()
hardwareSettingSet.SetParameter('MTBCamera_MTBTube_Cameraport.Axiocam705c', 'ExposureTime', 500)
Zen.Devices.ApplyHardwareSetting(hardwareSettingSet)
Is there an error in the above code?

Hardware: Imager.Z2 Vario with Axiocam 705 Color
Software: ZEN Core 3.5

PS: changing the other microscope components works, like changing objective, filter, illumination parameters, etc.
Aida Saxzs
Posts: 1
Joined: Tue Jun 27, 2023 10:53 am

Re: not possible to adjust camera settings

Post by Aida Saxzs »

The code you provided seems to be correct, but there might be a small error in the second part where you attempt to set the exposure time. The correct syntax for setting the exposure time to 500 ms would be,
hardwareSettingSet = ZenHardwareSetting() My AARP Medicare
hardwareSettingSet.SetParameter('MTBCamera_MTBTube_Cameraport.Axiocam705c', 'ExposureTime', 500)
Zen.Devices.ApplyHardwareSetting(hardwareSettingSet)

Make sure you have the necessary permissions or privileges to modify camera settings. Some settings may be restricted based on user access levels or device configurations. Verify that the camera model and port you are specifying ('MTBCamera_MTBTube_Cameraport.Axiocam705c') is correct. Double-check the documentation or resources provided by the manufacturer to confirm the correct identifier for the camera you are using. Check if there are any specific requirements or constraints for changing the exposure time. For example, the value you are attempting to set (500 ms) may not be within the valid range for the camera or there may be other limitations imposed by the hardware. Consider updating your software to the latest version or checking for any available patches or updates that address similar issues. Sometimes, software updates can introduce new features or fix known bugs related to hardware integration.
Martin Sunding
Posts: 2
Joined: Tue Jun 06, 2023 3:59 pm

Re: not possible to adjust camera settings

Post by Martin Sunding »

Thank you for your reply!
I have admin user access. I couldn't find if the device configuration sets limits to changes, but I can change the parameters without issues through the "normal" ZEN Core interface, and the values I tested are within the allowed ranges. The camera model and port are correct as well as they work fine to retrieve the set values.
I didn't find any difference between my code and yours, where did you think that there might have been an error?

Regards
Martin
Arya Stark
Posts: 1
Joined: Wed Dec 06, 2023 5:27 am
Location: https://fnfgo.org
Contact:

Re: not possible to adjust camera settings

Post by Arya Stark »

I think the reason why it's not setting the exposure time to 500 ms is due to the code execution context. It could be operating inside a measurement or acquisition procedure where the acquisition procedure controls the camera settings.
Post Reply