QHYCCD

No live mode on QHY600 with linux SDK

No live mode on QHY600 with linux SDK
« on: January 28, 2020, 06:54:39 AM »
I'm not able to get the QHY600 shooting in live mode, with the same code which works for me for the QHY367. Can I have a statement about why, please?

My calling sequence is

Code: [Select]
SetQHYCCDStreamMode(QC.camhandle,1);
BeginQHYCCDLive(QC.camhandle);

    GetQHYCCDLiveFrame(QC.camhandle,QC.pImg)  % (repeated till success)

For the QHY600, GetQHYCCDLiveFrame returns all the time 0xFFFFFFFF. With the QHY367 it would eventually return 0, allowing to retrieve the image from the buffer QC.pimg. Btw I have already complained earlier that it is bad that 0xFFFFFFFF flags both errors and image not yet available. Still, IsQHYCCDControlAvailable() says that CAM_LIVEVIDEOMODE should be supported on the QHY600.

My test platform this time is QHY600/USB3/Matlab 2019b/Ubuntu18/SDK 6.0.5 (packaged by James Fidell).

Re: No live mode on QHY600 with linux SDK
« Reply #1 on: February 03, 2020, 07:09:58 PM »
Hi,
    Sorry I didn't look at your this topic first,I reply you in your another topic,olease ignore that reply.
    So your issue is you can't use these function work on Live Mode,right?What device do you use?It is a x86_64 linux PC?
Best Regards,
QinXiaoXu

Re: No live mode on QHY600 with linux SDK
« Reply #2 on: February 04, 2020, 06:27:22 AM »
Yes, x86_64.

I found yesterday, inspired by the example in /usr/share/doc/libqhyccd-dev/examples/testapp/LiveFrameMode, that I could take live images changing the call sequence from

Code: [Select]
InitQHYCCD(QC.camhandle)
SetQHYCCDStreamMode(QC.camhandle,1);
BeginQHYCCDLive(QC.camhandle);

    GetQHYCCDLiveFrame(QC.camhandle,QC.pImg)  % (repeated till success)

to

Code: [Select]
SetQHYCCDStreamMode(QC.camhandle,1);
InitQHYCCD(QC.camhandle)
BeginQHYCCDLive(QC.camhandle);

    GetQHYCCDLiveFrame(QC.camhandle,QC.pImg)  % (repeated till success)

However:
  • How could I have known?
  • why this is not necessary for the 367?
  • deferring InitQHYCCD till until the start of the sequence, instead of calling it when the communication with the camera is established, might require a refactoring of my matlab toolbox
  • how can I be sure that camera parameters set before InitQHYCCD are in effect?
  • I found many creative ways of crashing matlab as a consequence of this late call, and depending on the placement of CloseQHYCCD()
  • In any event I have been able to take only one sequence per matlab session, the second would fail

Re: No live mode on QHY600 with linux SDK
« Reply #3 on: February 05, 2020, 07:32:34 PM »
Hi,
    In fact,these function has some necessary call rule,InitQHYCCDResource,SacnQHYCCD,GetQHYCCDId,OpenQHYCCD,SetQHYCCDStreamMode,InitQHYCCD,these function mast be called at the start of program,CloseQHYCCD,ReleaseQHYCCDResource must be called at the end of program.
    About the difference between 367 and 600,this maybe because the way of calling source in SDK is different.
    And you can use return value judge if function is called successfully,if it retrun QHYCCD_SUCCESS,it is success.
    And did you have QHYCCD SDK API Introduction Document?If not,you can download it from official website,it can help you.
    And do you use readout mode?If so,I will send you another document about this.
Best Regards,
QinXiaoXu