This is the subroutine to start the guide:
Code: Select all
Function StartAutoGuide
Guider.FullframeAutoguide
guideOK = false
for i = 1 to 20
Pause(1)
if Guider.AutoguideStatus = "Guiding" then
guideOK = true
break
end if
next i
return guideOK
End Function
Code: Select all
Function CheckAutoGuide
guideOK = (Guider.AutoguideStatus = "Guiding") and (not Guider.LostStar)
if not guideOK then
print "--- Guide lost ---"
lostGuide = lostGuide + 1
Guider.Stop
StartAutoGuide
end if
if lostGuide >= lostGuideMax then
print "--- Alert, guide lost 3 times ---"
'System.Execute("C:\AlertSoftware.exe")
lostGuide = 0
end if
return guideOK
End Function
At the beginning the script initializes the variables and starts the guide:
Code: Select all
lostGuide = 0
lostGuideMax = 3
ok = StartAutoguide
if not ok then
print "*** First autoguide failed - end ***"
End
end if
Code: Select all
...
Camera.Start(expo)
Camera.Wait
...
CheckAutoguide
A usual, you can check the two functions indoor using the Simulator of the Camera, Guider and Telescope.