Quick change of Exposure time for Basler acA1300-30gm camera (GigE)
See original GitHub issueHi there,
I’m programming a GUI, where live Images from several cameras (Basler acA1300-30gm) are displayed simultanousely. Upon a user command, the current live pictures are saved to files. Due to the specific application of the program, it is important to have a relatively long exposure time for the pictures that are saved. For the live images, however, the exposure time should be a lot shorter, to allow for a higher frame rate.
My current implementation basically works, but has a major drawback. I’m changing the exposure time according to the sample code parametrizecameraloadandsaveconfig.py, where the node map is modified and then loaded to the cameras. This step takes about one second for each camera. Each time a set of pictures is saved, this is done twice. For that reason, saving a set of pictures takes around 8 to 10 seconds, which is unacceptable.
So I’m looking for a more efficient way to change from one exposure time to another. I found issue #67 and tried to solve the problem based on @thiesmoeller’s answer, but I couldn’t make it work. When I tried running a script that only consisted of @thiesmoeller’s code from issue #67 (except for the line info.SetDeviceClass("BaslerUsb")
, which I replaced by info.SetDeviceClass("BaslerGigE")
) I received the following error:
Traceback (most recent call last):
File “…\expTime.py”, line 27, in <module>
cam.ChunkSelector = “ExposureTime”
File “…\Python37\lib\site-packages\pypylon\pylon.py”, line 4045, in setattr
self.GetNodeMap().GetNode(attribute).SetValue(val)
File “…\Python37\lib\site-packages\pypylon\genicam.py”, line 2443, in SetValue
return _genicam.IEnumeration_SetValue(self, entry)
_genicam.InvalidArgumentException: Feature ‘ChunkSelector’ : cannot convert value ‘ExposureTime’, the value is invalid. : InvalidArgumentException thrown in node ‘ChunkSelector’ while calling ‘ChunkSelector.FromString()’ (file ‘enumeration.cpp’, line 134)
Does anyone know what the problem might be?
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
try ExposureTimeAbs
camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice()) camera.Open() camera.ExposureTimeAbs = 24587
Closed due to no activity