Moravian Instruments C1x/C3-61000 and 26000

MMys
Posts: 30
Joined: Fri Jul 09, 2021 7:08 pm

Re: Moravian Instruments C1x/C3-61000 and 26000

#31

Post by MMys »

Hello Robin,
I have yet one request for these large cameras. It is not an issue, but tip for improvement. There is possible to operate cameras two way. Native support (SDK dll) and ASCOM. The ASCOM is approx. 4x slower, so I prefer native support for some tasks, where speed is essential. Unfortunately, there is no possible to use filter wheel in this mode. Because the filter wheel is internal part of the camera, the ASCOM driver for FilterWheel cannot be used standalone, when camera ASCOM driver is not active/connected.

But there is one possible way. Add one dropdown box directly to the camera control panel, and call Filter Wheel related functions in SDK. There are two functions. EnumerateFilters(...) and SetFilter(...) The names are self-explanation and you surely will know how to use them :-)

This function will be usefull mainly for short exposure imaging, If I wish for example insert IR filter for Lunars shots, etc... This is impossible now, with native support operation.

For DSO imaging, with long exp, the standard support over ASCOM, where the FW works normally, is OK. The download time is not critical here.

Let me know if this is possible, and if so, send me an updated version. I will test it for you.

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

Re: Moravian Instruments C1x/C3-61000 and 26000

#32

Post by admin »

Hi Martin,

yes, this is possible - I have added built-in filter wheel support for a couple of other brands of camera, so I have some code to copy. I will try to implement it over the next week or two.

cheers,

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

Re: Moravian Instruments C1x/C3-61000 and 26000

#33

Post by admin »

Hi,

just looking at this change - wondering about the EnumerateFilters method. I can see that I can ask the camera for the names of the filters, but how do those names get stored? There is nothing in the SDK to set the stored names (or the filter offsets for focus, either). Maybe the ASCOM driver can set the names, but that would lead to a rather odd workflow of needing to use the ASCOM driver to setup the filters and then not using the ASCOM driver in SharpCap when *using* the filters.

I am wondering if it would be better for me to handle the filter names/offsets in SharpCap directly to give a consistent experience - this is the way I do it for QHY and Atik filter wheels.

cheers,

Robin
MMys
Posts: 30
Joined: Fri Jul 09, 2021 7:08 pm

Re: Moravian Instruments C1x/C3-61000 and 26000

#34

Post by MMys »

Hi,
you have to call the function many times until it will return FALSE.
You do not need ASCOM. The system driver knows the names of the filters, there is an tool to set them, for that cameras even if operating no ASCOM I think.

Try that. If no luck, use your own way.

In the ZIP file with SDK, there is MoravianCameraDriver.pdf file with description (see below).

------------------------------------------------------------------------------------------------------------------------
BOOLEAN __cdecl EnumerateFilters(
CARD_PTR Handle,
CARDINAL Index,
CARDINAL Description_HIGH,
CHAR *Description,
CARDINAL *Color
);

Optional function.
Enumerates all filters provided by the camera. This enumeration does not use any callback, by the
caller passes index beginning with 0 and repeats the call with incremented index until the call
returns FALSE. Description string is passed similarly to GetStringParameter call. Color parameter
hints the Windows color, which can be used to draw the filter name in the application.

-------------------------------------------------------------------------------------------------------------------------
BOOLEAN __cdecl EnumerateFilters2(
CARD_PTR Handle,
CARDINAL Index,
CARDINAL Description_HIGH,
CHAR *Description,
CARDINAL *Color,
INTEGER *Offset
);

Optional function.
Sames as 'EnumerateFilters' function, but returns one more parameter 'Offset'. This parameter
indicates the focuser shift when the particular filter is selected.
Units of the 'Offset' can be micrometers or arbitrary focuser specific units (steps). If the units used
are micrometers, driver should return TRUE from GetBooleanParameter(
gbpMicrometerFilterOffsets, …) call.
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Moravian Instruments C1x/C3-61000 and 26000

#35

Post by admin »

Hi,

thanks, I'd seen the EnumerateFilters method, but wasn't aware of the tool to set up the filter names/offsets. If that is standard for these cameras then I will try to adjust my code to that approach (I wrote a version yesterday with my own filter name/offset handling).

Not sure if I will get that change made in time for tomorrow's update, but at least with the code currently in place you should be able to move the filter wheel.

There is still a bit of a gap in the SDK as far as I can tell - no way to find out the current filter position, so I have had to set up the code to move to the first filter when the camera is opened to ensure that the filter wheel is in a known state.

cheers,

Robin
MMys
Posts: 30
Joined: Fri Jul 09, 2021 7:08 pm

Re: Moravian Instruments C1x/C3-61000 and 26000

#36

Post by MMys »

Hi,
The enumeration method is used in all Moravian cameras.

About FW:
when camera becomes connected to USB, camera will reset FW to 1 position. The only one question is SharpCap restart and it will not know the current position. It will be restored after first filter move.
But I will ask manufacturers.
MMys
Posts: 30
Joined: Fri Jul 09, 2021 7:08 pm

Re: Moravian Instruments C1x/C3-61000 and 26000

#37

Post by MMys »

I spoke with Pavel Cagaš yet. The same problem is the binning mode, gain, etc. You can not determine actual setings. The best way to do with FW after SharpCap start is to call move to the pos. 1 and set pos. 1 also in SharpCap control. Same way as you are settin an default exposure, gain, etc.

Or you can remember last FW position when exit, crash... And set the same after restart.
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Moravian Instruments C1x/C3-61000 and 26000

#38

Post by admin »

Hi,

I think I will stick with moving to a known filter on startup - the idea of remembering the last one is fine until someone uses a second application to control the camera as well as SharpCap!

Did you get a chance to try v4.1.10427 yet? It should offer the filter wheel for use, although you will have to set up the filter names/offsets in SharpCap for now, as I haven't had a chance to implement to the enumeration code. Be interesting to hear if it works or not :)

cheers,

Robin
MMys
Posts: 30
Joined: Fri Jul 09, 2021 7:08 pm

Re: Moravian Instruments C1x/C3-61000 and 26000

#39

Post by MMys »

Hi,
I´m testing just now with C1-61000 and C2-9000 and both FW works perfectly, great for the moon, I can change filters on the fly and see the effect.
------------------------
edit:
Setup button for on-camera FW does nothing. Probably, it should call FW setup dialog ?

------------------------
edit2:
Yet one problem found. Now I'm testing camera C2-9000, which has only 14 bit sensor. (It shares the same SDK dll), but when overexposed, I got not white, but 25% gray. The system driver is sending data as RAW value from sensor, without rescale, so 16k ADU is maximum for 14 bit camera.

I must solve the problem by stretching image to 1/4 of histogram range. I think should be better, if you recalculate data into 16-bit range, or rescale maximum of the histogram (depending on what is easier for you).
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Moravian Instruments C1x/C3-61000 and 26000

#40

Post by admin »

Hi,

good to hear that the filter wheel works. Ideally I would make the setup button disappear, since there is no configuration for the wheel available - will look into that.

On the bit depth issue, what options do you see in the 'Colour Space' control? SharpCap should show the various modes the camera supports there, and if it lists a 14 bit mode then it should handle the data being 14 bit correctly (my testing cameras show up with RAW8 and RAW12 in slow and fast variants).

If the camera does not list any modes via EnumerateReadModes then SharpCap assumes 16 bit, which maybe what is happening in your case. If that is happening then you will find a line in the log along the lines of

Code: Select all

No read mode information - assuming 16 bit.
If there are read modes available then SharpCap should list those in the log too. If I can get that info then maybe I can work out what is going on.

cheers,

Robin
Post Reply