QHYCCD

[QHY5-ii-M] First frame delay & gain increase bug

[QHY5-ii-M] First frame delay & gain increase bug
« on: September 13, 2020, 11:09:41 PM »
Hello, I'm developing a camera software using QHY5-ii-M and stable version of QHYCCD SDK (20.06.26). The OS is windows 10.
The initial delay time is important for my application, so I tested the delay time in defalt setting (speed 0, usb traffic 30).
I found that the delay time was proportional to the exposure time. It was about (3 * exposure time), so in 1000ms, I had to wait about 4 seconds for first frame, and in exposure 2000ms, 8 seconds. I cannot understand why the delay time increases with exposure time.

I also tested with (speed 1, usb traffic 0) setting. In this case, the delay time increased with exposure time until 1000ms for 3 seconds, and it did not change any more.

Can you explain why the initial delay time increases with exposure time?

PS: I also found that the gain is going up one by one when I call 'BeginQHYCCDLive()' function. So I need to set the gain value - 1 because the begin function increases the gain value +1. I think it is a bug. I'd appreciate it if you could check it.

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #1 on: September 14, 2020, 08:39:15 PM »
Hi,
    I will check the SDK's source code and test it,please wait some time.
    And because I will be on a business trip these days,the result will be a little late.
Best Regards,
QinXiaoXu

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #2 on: September 15, 2020, 01:58:28 AM »
Thanks for your reply.

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #3 on: September 20, 2020, 11:54:26 AM »
I have written an application for my QHY5II-M and my QHY294C on Win10 and I have found that the latest versions of the SDK are problematic for this camera.  Getting LIVE mode to start is an issue.  This issue seemed to appear after SDK version 20.02.28.  I also found that if I try to use a newer version of the dll that PHD2 will have difficulties using my QHY5II-M...sluggish and erratic response.  As a result I am still using this older version.  I have made QHY aware of this issue and they are looking into it.  You may want to experiment with using V20.02.28 while you wait for QHY to get back to you.  I found the following link on this site for downloading V20.02.28.
http://www.qhyccd.com/file/repository/latestSoftAndDirver/SDK/V20200228/WINDOWS_qhyccd_V20200228_0.zip

Good Luck with your application

Peter

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #4 on: September 20, 2020, 07:23:11 PM »
Thanks. I'll test it and I'll report the result.
Best Regards,
kwchoi

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #5 on: September 24, 2020, 01:00:11 AM »
I've tested 20.02.28 version of SDK, and I found the same gain increasing bug (WIN10 64bit). I didn't test many times, so the old version of SDK may be more stable, but anyway it shares some important bugs.

Best Regards,
kwchoi

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #6 on: September 24, 2020, 08:46:35 PM »
Hi,
    I checked the source code for QHY5II,in BeginQHYCCDLive function,it has a code to set gain,the gain is the value you set +1.I need check why do this from Dr.Qiu.
    And I recured the issue of delay.I will find the reason.
Best Regards,
QinXiaoXu

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #7 on: September 27, 2020, 08:26:17 PM »
Hi,
    I checked the source code and inquired to Dr.Qiu.
    About the gain set issue,we can solve it in SDK with remove the gain set code.
    About the delay issue,according to Dr.Qiu,when set different expose time,camera will wait until the end of current frame expose,and it will give up the first frame that you cahnged expose time,camera will output image data from second image.So this make the actual time is too long.About to solve it,Dr.Qiu told me,it need setup register to immediately stop current frame expose,and close the function of waiting second frame. This can let software readout image faster.But the issue is this function is for the chip that product by Sony,but the QHY5II's chip is producted by Micron,so he's afraid the QHY5II has no this function.So Dr.QIu advice you use Sony chip camera,for example QHY5III290M.
Best Regards,
QinXiaoXu

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #8 on: September 27, 2020, 09:15:27 PM »
Thanks for your reply.
I've understood that the delay is caused by two reason: first, previous exposure waiting, and second, throwing away the first frame of new exposure time setting. Your answer may be useful, because the delay will be reduced by setting short exposure time before I change the exposure time.
I'll be waiting for gain-bug solved SDK, and I'll consider your advice when I need to select a new camera.

Thanks.

Best Regards,
kwchoi

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #9 on: September 28, 2020, 04:42:24 AM »
    OK,and because of National Day holiday,the new SDK will be a little alte.
Best Regards,
QinXiaoXu

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #10 on: October 08, 2020, 09:20:18 PM »
Hi,
    This is the new SDK,please try it.
Best Regards,
QinXiaoXu

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #11 on: October 11, 2020, 01:13:09 PM »
QinXiaoXu,
I downloaded the SDK you provided.  It is identified as V20.9.30.1  I use a QHY5II-M for guiding and a QHY294C for imaging. I am happy to report that this version of the DLL works very well with both of my cameras.

Background:
I have tried many times to use the latest official release versions of the SDK and found that the QHY5II-M had terrible problems.  I have written my own program and I could no longer control the QHY5II-M with the latest official release versions.  I also found that PHD2 Guiding could not reliable control the QHY5II-M when I was using the latest official release.  Exposure times were erratic and there were random pauses of many seconds in the update time.  The only version of the SDK that would work well with my QHY5II-M was V20.2.28.0.
V20.2.28.0 also worked with my QHY294C but there were many issues...namely:
1)I would power up the camera in STILL frame mode but the camera driver would crash if I changed any parameters
2)I always had to run the QHY294C in LIVE mode before I could use STILL mode...I think there was some kind of initialization issue.
3)Whenever I closed my program I would software disconnect the cameras and then exit.  I program in LabVIEW and LabVIEW would always report a crash that indicated some kind of memory leak associated with V20.2.28.0

Yesterday's Success!!!
I did some daylight testing with V20.9.30.1 and last night I was able to perform imaging of the West Veil Nebula. Using my LabVIEW program I can now...
1)Operate the QHY294C in LIVE or STILL mode and change parameters without errors or crashes.
2)Operate my QHY5II-M camera without issue.  The camera responds very well for me.
3)When I transfer control of the QHY5II-M camera to PHD2 the camera continues to perform correctly. PHD2 did not seem to have any issues controlling the QHY5II-M.
4)When I close my LabVIEW program there are no error messages suggesting a memory leak.

I believe that V20.9.30.1 of the SDK solves virtually all of my issues.  There is one very minor issue I saw that is a change in behavior for the QHY294C. When my LabVIEW program controls the QHY294C in LIVE mode, I adjust the GAIN and EXPOSURE to specific values.  I would then switch to STILL mode and notice that the GAIN and EXPOSURE values would not change...this is the behavior I prefer. I use this specific method when I am taking FLATs using a computer screen.  I use LIVE mode to achieve 50% ADU values and then change to STILL mode to take the FLATs using the same GAIN and EXPOSURE.

With V20.9.30.1 I now notice that when I switch to STILL mode that GAIN and EXPOSURE are initialized to default values.  I suspect that you have made this change since V20.2.28.0 to ensure safe parameter values are always in use.

Conclusion:
I think that the changes in V20.9.30.1 of the SDK to control the QHY5II-M are excellent! I hope that you are able to incorporate these changes into your next official release of the SDK.

Peter

P.S. I shoot virtually all of my LIGHT frames using GAIN=1600.  As you know, the QHY294C has an issue with it's FULLWELL causing saturation at roughly 70% ADU when operated at GAIN=1600.  As a result, I always shoot my FLAT frames at 50%ADU to avoid saturation.  This saturation issue has not changed with V20.9.30.1
« Last Edit: October 11, 2020, 01:14:58 PM by pmwolsley »

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #12 on: October 11, 2020, 08:12:21 PM »
Hi,
    Sure,I have commited the modification,the next release version will contain them.
    And about saturation issue,I'm not sure if this is a photography or SDK&Driver issue,you can contact cha@qhyccd.com,he is more better at photography than me.For SDK and Driver,I need test it,and because of my current work,I have to start to do it some time later..
Best Regards,
QinXiaoXu

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #13 on: October 12, 2020, 09:00:27 AM »
QinXiaoXu,
That is wonderful news!..I look forward to being able to use the latest SDK versions.

A few weeks ago I started another topic in this forum about the QHY294C saturation issue. 
https://www.qhyccd.com/bbs/index.php?topic=8257.0
I would enjoy helping with testing regarding this issue.  I was surprised that you could solve the QHY5II-M issues with a new SDK.  Perhaps this same method could be used for testing of the QHY294C.

Best Regards,
Peter

Re: [QHY5-ii-M] First frame delay & gain increase bug
« Reply #14 on: October 12, 2020, 08:15:53 PM »
Hi,
    OK,after I solve the current work I will try to test it.
    But I'm not sure if I can do it,because I mainly work on software but not actual photography,and I'm not familar with these operate software.Anyway,I will try it after I solve the current work.
Best Regards,
QinXiaoXu