QHY294C cannot perform sensor analysis

A place to report problems and bugs in SharpCap
Forum rules


If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
Post Reply
saublestarman
Posts: 14
Joined: Wed Jul 08, 2020 5:19 pm

QHY294C cannot perform sensor analysis

#1

Post by saublestarman »

I am a developer working with my QHY294C and I noticed that your sensor analysis has many problems while trying to analyze my camera. I believe this is primarily caused by the DDR memory that my camera, and I suspect other QHY cameras, have. The issue primarily occurs during LIVE stream mode which I believe is what you are using to perform the analysis. The problem is that, in many cases, the camera takes photos faster than the USB interface can relay them back to the computer...even with the camera directly plugged into the computer's USB3 port. This results in the camera having many, many photos already taken and awaiting transfer whenever your sensor analysis tries to change the exposure/offset/gain etc. The end result is that your routine expects that the next frame received after a parameter change will reflect the change. This is virtually never the case, and in many instances it can take 20 to 50 images received before the images with the parameter change are presented to Sharpcap. This totally confuses the sensor analysis routine causing it to fail virtually every time.

I have been battling with this specific issue while I programmed an automated focusing routine. Here is my solution...

For my QHY294C camera, and maybe other cameras, you need to first send the StopQHYCCDLive command...then issue the parameter changes...and finally send the BeginQHYCCDLive command. These commands will ensure that the DDR clears it's buffer so that the next image will use the parameter changes. I would be willing to be a tester for this work. The other alternative command sequence would be to first send the parameter changes and finally send the SetQHYCCDResolution command with the exact same resolution as you are already using. This sequence will also cause the QHY294C to clear it's DDR buffer.

Peter
User avatar
admin
Site Admin
Posts: 13271
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: QHY294C cannot perform sensor analysis

#2

Post by admin »

Hi Peter,

thanks for this very useful piece of information. SharpCap already waits five frames after changing camera parameters to begin taking measurements, but it sounds as though this is not enough. I will certainly investigate putting one of your suggested fixes into the code when the gain or exposure or black level settings are changed.

Two other things do spring to mind though.

Firstly the cameras I believe have a way to turn the DDR memory on or off – SharpCap should make that control available in the right-hand panel – does turning that setting to off help at all?

Secondly, SharpCap 3.3 offers the ability to run the cameras in a still mode where frames are only taken on demand (avoiding using the qhy live mode). I recently change the sensor analysis to support this still mode of operation, so perhaps that will work for you. I will add you to the alpha testers group so that you can download the preview of SharpCap 3.3 from the alpha testers sub forum.

Cheers, Robin
saublestarman
Posts: 14
Joined: Wed Jul 08, 2020 5:19 pm

Re: QHY294C cannot perform sensor analysis

#3

Post by saublestarman »

Robin,
I look forward to testing your changes with my camera with Sharpcap v3.3. Some additional information...

-The DDR memory on the QHY294C cannot be turned OFF...believe me...I wish it could. If I use the sharpcap option to turn off the DDR the camera simply stops working. The best assumption is that SOME QHY cameras can turn off their DDR memory.

-When the sensor analysis starts it sets the whitebalance parameters for the QHY294C to 64. The correct setting for the QHY294C is 16. With the camera whitebalance set to 64 the camera easily saturates and the data from the camera ranges from 0 to 65,535 in increments of 16. If you set the whitebalance to 32 the increments are 8 and, finally, when the whitebalance is set to 16 the increments are 4 which is correct for a 14b camera.

In all the above mentioned cases the data saturates at 65535. If you set the whitebalance to 8 the increment is 2 and the data saturates at 32767. I think you should change the initial values for the QHY294C so that the whitebalance values start at 16. The QHY294C driver sets the whitebalance to 16 when it loads.

Clear Skies

Peter
User avatar
admin
Site Admin
Posts: 13271
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: QHY294C cannot perform sensor analysis

#4

Post by admin »

Hi Peter,

thanks for the info – I will stop SharpCap from trying to set values for the colour balance controls on start-up. At one point it was necessary because the default set by the SDK were wrong for certain cameras, but maybe now it is doing more harm than good.

I think the biggest problem with getting things to work nicely for QHY cameras is the lack of consistency – certain other brands are very good at having a consistent SDK and therefore get far fewer bug reports.

Cheers, Robin
Post Reply