Log in

View Full Version here: : CCDSoft Scripting


JohnH
03-11-2011, 10:11 PM
Can anyone point me at some good help on CCDSoft scripting please? I want to automate LRGB and HOS imaging runs including focus offsets. I have done this in AstroArt4 and it was easy but I have not found any good doco on scripting in CCDSoft.

I think I can use vbs and I think there are other options also. What is the best tool for edit/testing of scripts for CCDSoft?

Here is what I had for AA4...

REM - 145m Bin modes
REM - 1x1 = 6 - 16 bit res
REM - 2x2 = 5
REM - 4x4 = 4
REM - 1x1 = 3 - 8 bit res
REM - 2x2 = 2
REM - 4x4 = 1
REM - Filters loaded 1=L,2=R,3=G, 4=B, 5=Ha ,6=Oiii,7=Sii
REM - Images stored to path$
input "Lum (s) - 0 for none ?",Lexp
input "Red (s) - 0 for none ?",Rexp
input "Green (s) - 0 for none ?",Gexp
input "Blue (s) - 0 for none ?",Bexp
input "Oxy (s) - 0 for none ?",Oexp
input "Halpha (s) - 0 for none ?",Hexp
input "Sulphur (s) - 0 for none ?",Sexp
input "Number of exposures ?",expcount
input "Object Name ?",object$
input "Focus Point L ?",Fpoint
input "Path ? eg C:\temp\ - folder MUST exist",path$
seq$ = "LRGBHOS"
for j= 1 to expcount
for i = 1 to 7
Focuser.GotoAbsolute(Fpoint)
filter$ = seq$[i]
bin = 6
if filter$ = "L" then
exposure = Lexp
offset = 0
endif
if filter$ = "R" then
exposure = Rexp
bin = 5
offset = -10
endif
if filter$ = "G" then
exposure = Gexp
bin = 5
offset = -10
endif
if filter$ = "B" then
exposure = Bexp
bin = 5
offset = 100
endif
if filter$ = "S" then
exposure = Sexp
offset = 10
endif
if filter$ = "O" then
exposure = Oexp
offset = 60
endif
if filter$ = "H" then
exposure = Hexp
offset = -10
endif
if exposure <> 0 then
name$=filter$+"_"+object$+"_"+str$(j)+".fit"
print i;filter$;bin;offset,exposure;name$
Wheel.Goto(filter$)
Focuser.GotoRelative(offset)
pause(15)
Camera.Binning(bin)
Camera.Start(exposure)
Camera.Wait
Image.Save(path$ + name$)
Image.Close
endif
next i
next j
Print "Finished!"
End

gregbradley
03-11-2011, 10:37 PM
There is a CCDsoft forum in Yahoo Groups. That'd be the place to ask.

If you find out, I'd love to know how to increase the number of channels you can program for imaging from the current LRGB only. It'd be handy to have 7.

Greg.

frolinmod
04-11-2011, 03:40 AM
Except that isn't that forum just about dead these days? The software bisque support website might be better. It's pretty active. Also take a look in the CCDsoft help file.

JohnH
04-11-2011, 06:26 AM
Thanks guys - will go there - thought I would try IIS land first...the help files are a bit thin on scripting - tells you what the func do but not how to develop and test a script. Eg vbs can be written in xl or other tools but difficult to excercise/debug ccdsoft scripts there.

Tandum
04-11-2011, 10:31 AM
John, I found examples and help a bit thin when I was playing with it. Here's a basic vbs script to take an image and I've attached a sample script for automapping tpoint that might help. There should not be a space in the word camera.

Dim objCam

Set objCam = WScript.CreateObject("CCDSoft.Camera.2")

objCam.Connect()

objCam.ExposureTime = 5.0
objCam.TakeImage()

Call Done


Sub Done
objCam.Disconnect()
Set objCam = Nothing
MsgBox ("Done")
End Sub

JohnH
04-11-2011, 11:12 AM
Thanks Robin, I found a few egs but it is not clear to me what properties the focuser object has when it is an ASCOM device. I want to use offests. Also I would like to vary the autoguide exposures dependant on the filter in use, also wondering what the best tools are for dev/testing (I am on notepad++ for now).

John

Tandum
04-11-2011, 11:39 AM
I just used notepad for messing about. You can download an ole/com explorer (http://www.softpedia.com/get/Tweak/Registry-Tweak/OLE-COM-Object-Explorer.shtml)which can read com objects installed on your machine and lists the interfaces/procedures available. It would look like this and can sort of help.