Skip to content

Cannot snap an image from the ProEM CCD #119

Description

@qianwu2

Hi,
I am on Win11 using Python 3.10 (I tried other later version of Python e.g. 3.12 and would not work for me). Finally, I can see the camera, and am able to set and get attributes from the camera. However, when I tried to get an image, I got this error.

cam1.setup_acquisition()
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\iguser\AppData\local\Programs\Python\Python310\lib\site-packages\pylablib\core\devio\interface.py", line 666, in wrapped
res=func(**all_args)
File "C:\Users\iguser\AppData\local\Programs\Python\Python310\lib\site-packages\pylablib\devices\PrincetonInstruments\picam.py", line 522, in setup_acquisition
self._commit_parameters()
File "C:\Users\iguser\AppData\local\Programs\Python\Python310\lib\site-packages\pylablib\devices\PrincetonInstruments\picam.py", line 497, in _commit_parameters
failed=lib.Picam_CommitParameters(self.handle)
File "C:\Users\iguser\AppData\local\Programs\Python\Python310\lib\site-packages\pylablib\devices\PrincetonInstruments\picam_lib.py", line 308, in Picam_CommitParameters
return self.destroy_convert(*self.Picam_CommitParameters_lib(camera),conv=lambda v:v,destroy=self.Picam_DestroyParameters)
File "", line 1, in
File "C:\Users\iguser\AppData\local\Programs\Python\Python310\lib\site-packages\pylablib\core\utils\ctypes_wrap.py", line 276, in wrapped_func
retval=func(*call_args)
File "C:\Users\iguser\AppData\local\Programs\Python\Python310\lib\site-packages\pylablib\devices\PrincetonInstruments\picam_lib.py", line 44, in errchecker
raise PicamLibError(func.name,result,lib=lib)
pylablib.devices.PrincetonInstruments.picam_lib.PicamLibError: function 'Picam_CommitParameters' raised error 28(PicamError_InvalidParameterValues): Invalid Parameter Values

Here is my code that I run before I got the point.

import pylablib as pll
import numpy as np
#C:\Program Files\Princeton Instruments\PICam\Runtime
pll.par["devices/dlls/picam"] = "C:\Program File\Princeton Instruments\PICam\Runtime"
#pll.par["devices/dlls/picam"] = "C:\Program Files\Princeton Instruments\PICam\Libraries"
#pll.par["devices/dlls/picam"] = "C:\Program Files\Common Files\Princeton Instruments\Picam\Runtime\Trace"
#C:\Program Files\Princeton Instruments\PICam\Libraries"
from pylablib.devices import PrincetonInstruments
#cam1= PrincetonInstruments.PicamCamera()

#PrincetonInstruments.list_cameras()
cam1= PrincetonInstruments.PicamCamera('2903120003')
#test = PrincetonInstruments.list_cameras()
#serialnumber = test[0][1]
#cam1 = PrincetonInstruments.PicamCamera(serialnumber)
cam1.get_attribute_value("Pixel Format")
cam1.set_attribute_value("Exposure Time", 10) # set the exposure time to 10 ms
cam1.cav["Exposure Time"] # get the exposure; could also use cam.get_attribute_value("Exposure Time")
10.0
cam1.get_attribute_value("ADC Speed") # df 2 for 2mhz
cam1.get_attribute_value("ADC Analog Gain") # df High
cam1.get_attribute_value("ROIs") #
cam1.get_attribute_value("Shutter Timing Mode") # df Normal
cam1.get_attribute_value("Sensor Temperature Set Point") # df -70
cam1.get_attribute_value("Sensor Temperature Reading")
cam1.set_roi(0,1024,0,1024,4,4) # set binning 4x4 to 256x256 image size
cam1.set_attribute_value("ADC Speed", 0.1) # set speed to 100 Khz
cam1.set_attribute_value("Sensor Temperature Set Point", -45.)
cam1.set_attribute_value('ADC EM Gain',47)
cam1.get_all_attributes()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions