Set FIlter Colours Manually

Somewhere to ask questions about the best way to use SharpCap
rederikus
Posts: 18
Joined: Thu Oct 10, 2019 2:51 am

Re: Set FIlter Colours Manually

Post by rederikus » Sat Sep 12, 2020 1:32 pm

Hi Robin,

Thanks very much for the tip. I'll have a go at it this weekend.

I have asked my son to fix the Arduino code for me and having given him a small amount of money he is going to do it - it's what Dad's do... Once it is complete and it works as I want, Optical indexing working, a push button to Home the wheel from any position, a button to advance the filter wheel by one position, configurable for 4, 5, 7 or 9 filters in a wheel, I shall return the code to Robert Brown so that all may freely use the new code under Collective Commons. When? Who knows? Within a month, I hope.

Thanks again and I'll post again when I have something worthwhile to say.

Oh yeah, I got my son to laser cut me a Bahtinov Mask. I wanted a 3D printed one but the laser cut plywood job took less than 5 minutes to print the .svg file generated from here http://astrojargon.net/(X(1)S(hvuklm55r ... eSupport=1

Pete

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

Re: Set FIlter Colours Manually

Post by admin » Sun Sep 13, 2020 12:39 pm

Hi Pete,

good thinking on the laser cutting of the mask – I've cut those out by hand with a utility knife and it's not a fun thing to do… These days I think I will go with the 3D printing approach.

Good luck with getting the project using forwards.

Cheers, Robin

rederikus
Posts: 18
Joined: Thu Oct 10, 2019 2:51 am

Re: Set FIlter Colours Manually

Post by rederikus » Mon Sep 14, 2020 8:22 pm

1. I got the Arduino .ino script fixed. My son finished it within a day. He did a good job. I al so had him code for two pushbutton switches. One to return the filter wheel to the Home (Slot 0) position and another to advance the filetr slot by one position. Bother switches make sure that ASCOM knows what has happened.

I have sent the new ino file to Robert Brown who owns this project. Not sure it he wants to release it to the world or not. That's his decision. I hope he does sinc eht project is now buildable and usable by all.

2. I can now turn my attention tot he ASCOM driver and those pesky filter colours. This is going to take me some time since the driver was built in MS Visual Studio 2013 Community Edition. All I currently get is a new dll and no exe file. Just keep banging the rock together...

3. 3D printing a Bahtinov Mask works well but is very slow - about 3 hours. We cut a 3mm plywood one in under 5 minutes using the laser cutter. I then sprayed the plywood black.

Obviously a 3D printer is a different beast from a laser cutter. 3D capability for a start. Duh. Both tools have their uses and both have different strengths.

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

Re: Set FIlter Colours Manually

Post by admin » Mon Sep 14, 2020 8:27 pm

Hi,

you should expect to get just a DLL file from building the Ascom driver. If you have installed a version of this Ascom driver already then you should find that it has put its DLL file in the folder C:\Program Files (x86)\Common Files\ASCOM\FilterWheel - if you take a copy of the DLL that is already in that folder for safekeeping and then into the folder you should find that it will work and it will use your newly built copy.

Hope this helps, Robin

rederikus
Posts: 18
Joined: Thu Oct 10, 2019 2:51 am

Re: Set FIlter Colours Manually

Post by rederikus » Mon Sep 14, 2020 10:21 pm

Robin, That definitely helps me. My first try did not work, SharpCap refused to connect to the filter wheel with the new dll in the folder, so I'll quote Thomas Edison, "“I have not failed. I've just found 10,000 ways that won't work.” However I'm at fail-one so, this may take a while, but I am a tenacious sob so I reckon I may be at this a while...

Thanks for yet another tip.

Pete

rederikus
Posts: 18
Joined: Thu Oct 10, 2019 2:51 am

Re: Set FIlter Colours Manually

Post by rederikus » Tue Sep 15, 2020 1:48 am

Robin, I am sorry to trouble you again. I cannot make VS 2013 produce a working DLL. It makes a DLL every time but when I try to use the ASCOM driver I get an error from ASCOM. It is only the new DLL file that causes this. I put the original backand away it goes.

Edit: I just discovered that using theASCOM Filter Simulator [.NET] allows and sends filter colours to SharpCap. I can change them at will. Odd.

More puzzling is the fact that the working driver and ASCOM Profile Explorer find the colours I entered into the driver Properties. Image I am puzzled by this behavior. ASCOM seems to be providing the filter colour types but SharpCap does not receive them.

I am more concered about why SharpCap does nto see the assigned filters when ASCOM displays them. I will find someone who knows VS to sort it out for beer money or, better, beer.

Thanks again.

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

Re: Set FIlter Colours Manually

Post by admin » Tue Sep 15, 2020 6:44 pm

Hi,

the profile Explorer lets you look at the private data for each device that set up an Ascom – great for trying to solve a problem and understanding how things work, but it's not the way that SharpCap gets the filter names to show in its UI.

ASCOM has a way to ask the filter wheel what the filter names are – it's documented here : https://ascom-standards.org/Help/Platfo ... _Names.htm - and SharpCap uses it to request the names. Unfortunately in the driver you are using the original developer never got round to connecting the code implementing that up to the code that updates the settings in the profile - that's what you need to fix.

If you're still having problems with the DLL not loading, share a screenshot showing the error as the exact details of the error may make it obvious what you need to do to fix it.

Cheers, Robin

rederikus
Posts: 18
Joined: Thu Oct 10, 2019 2:51 am

Re: Set FIlter Colours Manually

Post by rederikus » Thu Sep 17, 2020 5:03 pm

Robin,

Thank you for your kind offer of help. I went back to Robert who wrote the whole app and the ASCOM driver too and asked him how to do this. He sent me this video https://drive.google.com/file/d/1eVuF-l ... sp=sharing and, after an hour of fiddling, I managed to produce a new ASCOM driver that reflects my filer setup. It worked.

SharpCap now shows my filers assigns within your programme. Wonderful. I will need to recompile the driver each time I swap filters so I won;t do that very often. I have suggested an external text or json file to store the current filters that is read either at driver install time (better'n re-compile) or (harder) at run time.

I now hope that Robert puts this up as a working solution in his sourceforge page but this is entirely his decision, not mine. It is
Robert's project.

My setup now works as I wished it to. Thank you very much for your help and support. Honestly, it was invaluable. You pointed me in the right direction.

Cheers mate. Pete

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

Re: Set FIlter Colours Manually

Post by admin » Thu Sep 17, 2020 6:03 pm

Hi Pete,

good news!

Hope that you get some clear skies soon and do share your images here on the forums for us all to enjoy :)

Robin

Post Reply