Plate solve with sync turns off PEC playback on my CGX mount

Anything that doesn't fit into any of the other forums
celkins
Posts: 130
Joined: Fri Apr 20, 2018 10:58 pm

Re: Plate solve with sync turns off PEC playback on my CGX mount

#11

Post by celkins »

Robin,
there was a question from Derek, Celestron’s lead firmware engineer, on Team Celestron some time ago about exactly this - PEC being disabled after SYNC commands…
IIRC, the gist was that this was “a historical artefact” of the older era controllers…

Sorry, but since I don’t use PEC, relying on guiding instead, I haven’t followed this thread.

Carl
lowenthalm
Posts: 152
Joined: Mon May 07, 2018 12:27 am

Re: Plate solve with sync turns off PEC playback on my CGX mount

#12

Post by lowenthalm »

Thanks for this. Very interesting, and strange that its hard to find more discussion of this on the internet...

It just seems to me that if CPWI can add temporary points to the pointing model without breaking things, then other apps should be able to do this too.

This is confusing as well, since I don't have an older era controller. I'll post here when Celestron gets back to me with any answers to my query. Sadly, I am bracing myself for a stupid/unhelpful response from them.
lowenthalm
Posts: 152
Joined: Mon May 07, 2018 12:27 am

Re: Plate solve with sync turns off PEC playback on my CGX mount

#13

Post by lowenthalm »

My testing has shown that guiding is best when using both PEC playback and guiding, as PEC anticipates mount movements before they happen.

Celestron never got back to me. It's been several months now, but I didn't bother to poke them again as clearly they totally know about the problem and are unwilling to attempt a fix it. Its so stupid, as CPWI just has to issue one re-enable PEC playback command to fix things, since the PEC index is already found. They just have to add code to CPWI (or the ASCOM driver it installs) that detects when this situation occurs and issues the re-enable command. It can't be that hard. My guess is they don't have all the people around that wrote the original code, so are unwilling to try to fix some parts of the code base. Coding cowards. Grrr. An afternoons work, at most.
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Plate solve with sync turns off PEC playback on my CGX mount

#14

Post by admin »

Hi,

if anyone is running the latest SharpCap 4.1, then it should try to read the PEC state from CPWI before/after a sync command and put something in the log like

Code: Select all

CPWI PEC state is currently  XXXXX
If we are seeing that in the logs then it is a good sign that we might be able to auto-restore the PEC state after sync from the SharpCap side, but since I don't have any CPWI capable hardware, I have to rely on others to test and report back how it goes.

cheers,

Robin
lowenthalm
Posts: 152
Joined: Mon May 07, 2018 12:27 am

Re: Plate solve with sync turns off PEC playback on my CGX mount

#15

Post by lowenthalm »

Can I access any of this via the python console in either

SharpCap.Mounts.Current
SharpCap.Mounts.SelectedMount

Both seem to contain an ASCOM object in a class variable called AscomMount. Can I uses these to send commands to the mount through SharpCap?

I see the object class in this class variable is CPWIProxy, within which I see CommandBlind, CommandString and CommandBool in this ASCOM object. Looks enticing, but not sure what these methods will actually do.

Next time I get some sky (later this week?) I can look for the PEC status message and maybe I can send some commands via the above?

Earlier in the thread, you had snippet of ASCOMdocs. Where did you get this? I can find no docs on the CWPI ASCOM driver specifically. Is this just from the generic mount ASCOM docs?
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Plate solve with sync turns off PEC playback on my CGX mount

#16

Post by admin »

Hi,

the info earlier about things like Telescope.AuxCommand and so on came from having a look at the text strings inside the CPWI ASCOM driver files.

You should be able to send those to the mount using one of the Command methods (not sure which - try Blind for things that set status first and Bool for the ones that look like they return status, but it could be any of them)

You can do things like

Code: Select all

print (SharpCap.Mounts.SelectedMount.AscomMount.CommandBool("<insert command here>"))
cheers,

Robin
lowenthalm
Posts: 152
Joined: Mon May 07, 2018 12:27 am

Re: Plate solve with sync turns off PEC playback on my CGX mount

#17

Post by lowenthalm »

I grabbed the strings out of the CPWI_ASCOM.dll, but saw none of the strings you listed. Which .dll were you looking at?

Unfortunately, despite help being present for the functions you suggested in the ASCOM object:

-------------
| CommandBlind(...)
| CommandBlind(self: IMountInterceptionProxy, command: str, raw: bool)
|
| CommandBool(...)
| CommandBool(self: IMountInterceptionProxy, command: str, raw: bool) -> bool
|
| CommandString(...)
| CommandString(self: IMountInterceptionProxy, command: str, raw: bool) -> str
|
-------------

...the functions are not implemented in the driver:

-------------
>>> x = SharpCap.Mounts.SelectedMount.AscomMount.CommandBool("Telescope:PecState",0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception: CommandBool is not implemented in this driver.
>>> x = SharpCap.Mounts.SelectedMount.AscomMount.CommandString("Telescope:PecState",0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception: CommandString is not implemented in this driver.
>>> SharpCap.Mounts.SelectedMount.AscomMount.CommandBlind("Telescope:X",0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception: CommandBlind is not implemented in this driver.
-------------

I do see this:

-------------
>>> x = SharpCap.Mounts.SelectedMount.AscomMount.SupportedActions
>>> x
List[str](['Telescope:AddAlignmentReference'])

-------------

So I tried sending something not in the list passed to the Action() method:

-------------

x = SharpCap.Mounts.SelectedMount.AscomMount.Action("Telescope:PecState","")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: Action Telescope:PecState is not implemented in this driver is not implemented in this driver.

-------------

So this got a tickle of some access, but there probably really isn't anything implemented other than "Telescope:AddAlignmentReference" impelemented.

And a finally, a bit of depressing data:
-------------

>>> SharpCap.Mounts.SelectedMount.AscomMount.DriverVersion
'2.5.0.99 with DLL Assembly Date: July_1_2020'

The latest version of CPWI, version 2.5, was just released, and it still is distributed with the mount driver 2.5.0.99 from 2020.
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Plate solve with sync turns off PEC playback on my CGX mount

#18

Post by admin »

Hi,

sorry, my mistake - I found those actions in the *NON CPWI* Celestron ASCOM driver. In the CPWI one you are quite correct that there is only the 'AddAlignmentReference' action available and no commands at all :(

Rats ...

Robin
lowenthalm
Posts: 152
Joined: Mon May 07, 2018 12:27 am

Re: Plate solve with sync turns off PEC playback on my CGX mount

#19

Post by lowenthalm »

admin wrote: Wed Sep 06, 2023 2:15 pm Hi,

sorry, my mistake - I found those actions in the *NON CPWI* Celestron ASCOM driver. In the CPWI one you are quite correct that there is only the 'AddAlignmentReference' action available and no commands at all :(

Rats ...

Robin
No worries! You have already done more to help than Celestron has in the last year. I read somewhere that a lot of Celestron software development and other stuff seems to be broken right now due to the company being purchased by a new owner and people retiring that knew where all the bodies were buried. Knowledge hand-off is under-appreciated by many MBAs.
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Plate solve with sync turns off PEC playback on my CGX mount

#20

Post by admin »

Hi,

yes, I'd heard roughly the same story about Celestron - that they were having trouble because they didn't have anyone left who really understood how the code for the software worked :( A software developer who is really good and knows the code can fix in a morning what it would take an outsourced developer with a still damp CompSci degree a week or more to deal with.

cheers,

Robin
Post Reply