To precise my requirements, what I need to do with PHD2 within a VBScript launched from the Autosave sequence of MaximDL is the following (PHD2 is already previously launched manually and guiding) :
StopGuiding PHD2
[already developped in my VBscript : Slew to a Focusing Star, Autofocus, PinPoint Solve, Sync, GoBack to the Object]
AutoSelecting a Guiding Star with PHD2
ReStartGuiding PHD2
What I do not know how to do in my existing script is StopGuiding PHD2, AutoSelecting a Guiding Star with PHD2, ReStartGuiding PHD2
Hi Igor. Just to close the loop on why it’s “so complex.” PHD2 is a cross-platform application (Windows, Mac, Linux) so it doesn’t rely on COM or other Microsoft-specific technology. Instead, it uses industry-standard solutions for inter-process communication, things like TCP/IP and JSON. That approach also supports things like distributed solutions – having an imaging application running on one computer while PHD2 runs on a different computer. None of that is the case with MaximDL and other imaging apps that are Windows-only.
Cheers,
Bruce
--
You received this message because you are subscribed to the Google Groups
"Open PHD Guiding" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to open-phd-guidi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
1) I understand the arguments "3 10 100" (settle the error below 3 pixels for 10 seconds, or time-out after 100 seconds). Using PHD2 manually when do you configure these arguments ?
2) Within a script when you sequence several commands successively, you have often to wait a command returning a TRUE boolean or 1 value to be sure it finishes correctly, for example with MaximDL :
camera.GuiderExpose(5.0)
while camera.GuiderRunning
wscript.sleep 1000
wend
camera.GuiderTrack(5.0)
In the case of PHD2 I have the feeling that phd2control.exe does not wait before to finish correctly (the camera should be in an idle state). If I chain several phd2control.exe, they execute one by one without waiting the previous to finish correctly.
Is there any way to wait the and check that phd2control.exe end correctly ?
3) I see that you can dithering using phd2control.exe (phd2control dither 3 1.5 8 300 for example). Is it better to use phd2control or phd_dither.exe developped by Bruce ?
Hi Igor. There’s actually a third option just to confuse things further. J There’s a “big brother” version of PHD_Dither, called PHD_Broker, that supports a larger set of PHD2 commands, certainly the ones you’re asking about. Andy’s phd2control script is a very lean implementation, does exactly what it’s supposed to do, and is pretty much invisible to the operation. The PHD_Broker app was developed specifically to let automation apps use PHD2 without having to deal with the TCP/IP and JSON interfaces or really know anything about PHD2. It includes an app with a UI that acts as a broker sitting between PHD2 and any other app. It shows the status of commands as they are passed through, writes a log of events, and has a UI for configuring things like the dithering parameters. Everything is strictly synchronous, so the client app or script will always see the status of whatever command was last issued – and that result will also be shown in the UI. So it’s a heaver-weight application with its own UI, which may not be what you want. The documentation for PHD_Broker was written for users of CCDAutoPilot but it will work with pretty much anything.
Since all of these are free options, it probably makes sense to look at all of them and choose the one you like the best. If you want to try using PHD_Broker, send me a message off-forum and I’ll send you the files you need and a description of what to do.
Have fun,
Bruce
From: open-phd...@googlegroups.com [mailto:open-phd...@googlegroups.com] On Behalf Of Andy Galasso
Sent: Wednesday, July 11, 2018
12:16 PM
To: Open PHD Guiding
--
Could you help me for the syntax ? At least with an example ?
Dim shell
Set shell = CreateObject("WScript.Shell")
' run phd2control to start guiding
Dim oexec
Set oexec = shell.Exec("phd2control.exe guide 3 10 300")
' wait for phd2control to exit
Do While oexec.Status = 0
WScript.Sleep 100
Loop
' oexec.ExitCode will be 0 if settling succeeded
If oexec.ExitCode = 0 Then
WScript.Echo "guiding started and settling completed"
Else
WScript.Echo "guiding failed to start or settling failed"
End If