PDA

View Full Version here: : Anyone here written an ASCOM driver for a focuser?


alocky
10-07-2017, 10:23 PM
Hi - wondering if any of the programmers on here could help out an old fortran programmer with some of the mysteries of ASCOM programming? I'm trying to write a focus driver that acts as a wrapper for an exisiting one so I can correct some 'bad behaviour' in the output.
I've got it all set up in C# and even built the standard ASCOM driver, but now have some very stupid questions!
cheers,
Andrew.

trent_julie
11-07-2017, 09:32 AM
Hi Andrew,
I have written an ASCOM safety monitor driver before. Also written control software for ASCOM focussers previously I would be happy to have a chat to see if I can help.

Kind Regards,

Trent

alocky
11-07-2017, 10:44 AM
Thanks Trent! I'll pm you when I'm back home.
Cheers
Andrew.

luka
12-07-2017, 10:12 PM
If you need more help I wrote ASCOM drivers for a camera and Observing Conditions before. Not for a focuser though.

alocky
14-07-2017, 09:56 AM
Hi Luka - I'd certainly appreciate a bit of help! The problem is that my new focuser has an absolute position encoder that reports it's position in microns. This number is not stable, and the last digit typically switches back and forwards by a micron every second or two.
The software I'm using to control all of this (Sequence Generator) is expecting the reported focuser position to be exactly what it requested, so during a focus run it will ultimately give up and report that the focuser did not reach the requested position.
What I want to do is write another driver to act as an intermediary- and either filter the position being reported, or return a focus position identical to the last request providing it is within tolerance.
If you've got time to catch up over a coffee or beer to give me some direction I'd be very grateful!
Cheers
Andrew.

luka
15-07-2017, 10:16 PM
Hi Andrew, coffee would be great but I am stretched very thin until the middle of the week after next so probably can't make it before then.


Two ways you can approach the problem:
1. Write the intermediary driver - take the ASCOM template for focuser and then pass all the calls to the DLL of the original driver. Then you only need to modify the position reading to include the tolerance.
2. If you have the focuser commands, you can probably use an existing ASCOM focuser source code (there are few on the net) as a starting point and then just re-implement the commands.

Just wondering, is this a problem with your focuser or with the model? If latter the manufacturer should be fixing the issue?

alocky
16-07-2017, 12:46 PM
Thanks Luka,
I'll take you up on that in week or so then.
The focuser position change seems to be common to all of these new ASA focuser, but the manufacturer seems to think it's a feature rather than a bug, and since the way it works is by constantly adjusting the focuser to maintain the measured position the reported position probably does change by a micron. In Practice, the critical focus zone for this scope is 30 microns so a 1 micron change is insignificant- and focusmax, ASA's own sequence software have no trouble with this.
Unfortunately, I'm trying to use SGPro for observatory control, as so far it's my preference. But I can see the path of least resistance is going to be getting another sequence program to do the work.
Anyway - figured it's about time I grew up and learnt to code in C#...