Photometrics / PyVCAM

Python3.X wrapper for Photometrics and QImaging PVCAM based cameras
MIT License
36 stars 17 forks source link

PyVCAM installs, passes tests, but hangs on get_frame calls #15

Closed Hannahmar closed 3 years ago

Hannahmar commented 3 years ago

I was able to successfully install PyVCAM. If I run python test_camera.py, all tests pass. If I run python check_frame_status.py, I get a series of

Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS
Seq frame status: EXPOSURE_IN_PROGRESS

until I press ctrl+c. However, none of the acquisition test scripts work. They don't throw any errors, they just hang indefinitely. Do you have any idea what might be causing this? Thanks in advance for any help you can provide.

stevebellinger commented 3 years ago

I can help, but I need more information. Can you please provide the following?

  1. Camera
  2. Interface (USB or PCIe)
  3. Operating system
Hannahmar commented 3 years ago

It's Kinetix camera, PCIe interface, windows computer

stevebellinger commented 3 years ago

It sounds like your camera is not returning frames to the host. Can you try to capture a frame using PVCamTest.exe? This application is located in your PVCAM install directory.

Also, can you please tell me your version of PVCAM?

This will tell us if PVCAM is functioning, then we can move onto PyVCAM.

Hannahmar commented 3 years ago

I was able to capture a frame with PVCamTest.exe, I'm using pvcam version 3.10.318

stevebellinger commented 3 years ago

Can you please re-check your PVCAM version? I am looking for a version that looks like 3.9.5.6. I highly recommend installing the latest version from the website if needed.

Hannahmar commented 3 years ago

I double checked, I'm using PVCAM version 3.9.5

stevebellinger commented 3 years ago

I will try to reproduce the problem. Can you tell me which version of camera FW you are using? This will be visible in PVCamTest.

Hannahmar commented 3 years ago

Firmware version: 30.20

stevebellinger commented 3 years ago

Unfortunately I wont get access to the required hardware until tomorrow at the earliest. I will keep you posted.

If you want to attempt troubleshooting before then, please take a look at pvcmodule.cpp and verify NewFrameHandler is getting called. Enabling print statements is the easiest method. Just remember to re-install PyVCAM after making changes.

It sound's like NewFrameHandler isn't getting called which is bizarre since PVCAM is working. Please keep an eye out for any error messages on the console.

stevebellinger commented 3 years ago

Hannahmar, I won't be able to get access to the required hardware until next week. It may be helpful to look at PVCAM logs during the failed tests. Can you set the following environment variables?

  1. PVCAM_CORE_LOG_FILE = %USERPROFILE%\desktop\pvcam_logs\pvcam_core.txt
  2. PVCAM_DDI_LOG_FILE = %USERPROFILE%\desktop\pvcam_logs\pvcam_ddi.txt

Clear the log before running a failed test. I'm fairly certain the resulting log can then be attached to a message in this forum by dragging it into the textbox.

Beware those logs can get large. I recommend removing the environment variables after collecting the logs.

stevebellinger commented 3 years ago

Hannahmar, using your version of the Kinetix firmware, the PCIe interface and a slightly newer version of PVCAM, I was able to collect frames using PyVCAM. At this point I would like to try ruling out a local configuration problem. Please post the requested PVCAM logs when they are available. Thank you.

Hannahmar commented 3 years ago

Sorry for the delay. We had some hardware issues. We will update you once it's resolved. Thanks!

Hannahmar commented 3 years ago

I tried the test scripts again with USB connection and all of them run. Looks like there might have been connection issues with the PCIe card. Thanks for the help!

stevebellinger commented 3 years ago

Great! Please re-open this issue if you need additional support for PCIe.