I’m feeling quite pleased with myself tonight as I’ve figured out a way to set up a multiple target dragscript sequence that will manage target start and end times to ensure the target remains clear of trees and I don’t need to update start/end times or enter target coordinates in multiple places. The start/end criteria is handled in the sequence definition (through minimum altitude to start and hour angle to prevent a meridian flip) and I’ve set up a loop/wait in the dragscript to cycle around until the target reaches an appropriate altitude to commence imaging. If the next target is not ready to commence when the prior one completes, the scope homes while it waits. All I now need to do is work out the min altitude for each new target based on my local horizon (tree line).
Testing it tonight and if it works as planned, this will be a major breakthrough for me.
1 Like
Thanks for feedback Peter , DragScript can do a lot of interesting things …
Let we know
All the best
Leonardo
I would like to see how you are doing it if you don’t mind posting the script when you are finished
Here is what it looks like so far…cloudy tonight so time for a few tweaks however I think I’m close to complete
1 - Start: Events At Start are ENABLE
2 - Script
3 - Block: Initialise Variables
4 - Remark: ================== Automation from Startup to Shutdown======================
5 - Remark: -->>>> Initiate the Startup Actions to Run. 0= not done yet, >0 will be skipped
6 - String: Connect - Init Value = “0”
7 - String: Camera - Init Value = “0”
8 - String: BlindSolve - Init Value = “0”
9 - String: PlateSolve - Init Value = “1”
10 - String: AutoFocus - Init Value = “0”
11 - String: RoboStar - Init Value = “1”
12 - String: TestGuider - Init Value = “1”
13 - Remark: -->>>> DontMove is flag to decide where to carry out tests: 0 = at AZ50/ALT50, 1= at current location
14 - String: DontMove - Init Value = “0”
15 - Counter: Targets - Init Value = 0
16 - Remark: -->>>> Choose the Sequences to Run. 1=RUN, 0=SKIP
17 - String: SEQ1 - Init Value = “1”
18 - String: SEQ2 - Init Value = “1”
19 - String: SEQ3 - Init Value = “1”
20 - String: SEQ4 - Init Value = “0”
21 - String: SEQ5 - Init Value = “0”
22 - Decimal Number: FocusPos - Init Value = 16000
23 - Counter: Retries - Init Value = 0
24 - Decimal Number: HFD - Init Value = 20
25 - Counter: ResumeCount - Init Value = 0
26 - DO IF STRING VALUE: SEQ1 is Equal to “1”
27 - Update Counter: Targets - Offset by 1
28 - DO IF STRING VALUE: SEQ2 is Equal to “1”
29 - Update Counter: Targets - Offset by 1
30 - DO IF STRING VALUE: SEQ3 is Equal to “1”
31 - Update Counter: Targets - Offset by 1
32 - DO IF STRING VALUE: SEQ4 is Equal to “1”
33 - Update Counter: Targets - Offset by 1
34 - DO IF STRING VALUE: SEQ5 is Equal to “1”
35 - Update Counter: Targets - Offset by 1
36 - Counter: WaitTarget - Init Value = 0
37 - Block: Startup
38 - Remark: ==========================================================
39 - Remark: ---- Check if equipment has already been connected
40 - DO IF STRING VALUE: Connect is Not Equal to “0”
41 - Remark: ---- Skip this step if it has already been done (String value will be greater than 0)
42 - Goto Block: Setup Camera
43 - Remark: ---- Wait until 55 minutes before Astronomical Twilight
44 - Wait Astronomical Night: Manual Data [LAT:27° 30’ 00" S LON: 153° 00’ 00" E] - Offset (Before) 00:55:00 [hh:mm:ss]
45 - Remark: ---- Connect equipment and PHD2
46 - Connect Setup
47 - IF OK
48 - Remark: ---- When equipment is connected, update Connection status flag and proceed
49 - Update String: Connect - “1”
50 - Unparking
51 - Homing
52 - Stop Tracking
53 - Goto Block: Setup Camera
54 - Remark: ---- If the Connect Setup fails, wait 15 seconds and try three times.
55 - Wait Time: 00:00:15 [hh:mm:ss] Interval
56 - Repeat Block For n Times: 3
57 - Remark: ---- After three failures, jump to the Terminate Session block
58 - Remark: ************ TERMINATED - CONNECTION FAILED **************
59 - Goto Block: Terminate Session
60 - Remark: ==========================================================
61 - Block: Setup Camera
62 - Remark: ==========================================================
63 - Remark: ---- Check if camera has already cooled
64 - DO IF STRING VALUE: Camera is Not Equal to “0”
65 - Remark: ---- Skip this step if it has already been done (String value will greater than 0)
66 - Unparking
67 - Start Tracking
68 - Goto Block: InitialiseFocuser
69 - Remark: ---- Ensure scope is parked and cool down the camera while waiting for night
70 - Stop Tracking
71 - Homing
72 - Cooling Down: -15[°C] - Sync Cooling - Use Voyager Ramp Mode Cooling down-15[°C]
73 - IF OK
74 - Remark: ---- When camera gets to -15 degC, update camera status flag and proceed
75 - Update String: Camera - “1”
76 - Remark: ---- Wait until 40 mins before Astronomical Twilight then continue
77 - Wait Astronomical Night: Manual Data [LAT:27° 30’ 00" S LON: 153° 00’ 00" E] - Offset (Before) 00:40:00 [hh:mm:ss]
78 - Wait User OK: without timeout - Remove Dust Cap
79 - Unparking
80 - Start Tracking
81 - Goto Block: InitialiseFocuser
82 - Remark: ************ TERMINATED - PROBLEM WITH CAMERA **************
83 - Goto Block: Terminate Session
84 - Remark: ==========================================================
85 - Block: InitialiseFocuser
86 - Remark: ==========================================================
87 - Remark: ---- Ensure focuser is approximately in focus for next steps
88 - RoboFire Focuser Move From Variable: Label=FocusPos - Abs
89 - Remark: ==========================================================
90 - Block: RunTests
91 - Remark: ==========================================================
92 - Remark: Perform test actions - Blind Solve
93 - DO IF STRING VALUE: BlindSolve is Equal to “0”
94 - Remark: ---- Do this step if it has not been done already (String value will equal 0)
95 - Goto Block: Blind Solve
96 - Remark: Perform test actions - PlateSolve
97 - DO IF STRING VALUE: PlateSolve is Equal to “0”
98 - Remark: ---- Do this step if it has not been done already (String value will equal 0)
99 - Goto Block: Plate Solve
100 - Remark: Perform test actions - RoboStar Focus
101 - DO IF STRING VALUE: RoboStar is Equal to “0”
102 - Remark: ---- Do this step if it has not been done already (String value will equal 0)
103 - Goto Block: Test RoboStar
104 - Remark: Perform test actions - LocalField Focus
105 - DO IF STRING VALUE: AutoFocus is Equal to “0”
106 - Remark: ---- Do this step if it has not been done already (String value will equal 0)
107 - Goto Block: Test Autofocus
108 - Remark: Perform test actions - guiding
109 - DO IF STRING VALUE: TestGuider is Equal to “0”
110 - Remark: ---- Do this step if it has not been done already (String value will equal 0)
111 - Goto Block: Test Guiding
112 - Remark: ---- Diagnostics succeeded to get to this point. Set dont move flag to 0
113 - Update String: DontMove - “0”
114 - Remark: ---- Everything ready - wait for Astronomical Twilight
115 - Wait Astronomical Night: Manual Data [LAT:27° 30’ 00" S LON: 153° 00’ 00" E] - Offset (Before) 00:01:00 [hh:mm:ss]
116 - Remark: ==========================================================
117 - Block: Sequence 1
118 - Remark: ==========================================================
119 - Remark: ---- Do this sequence if SEQ1 = 1
120 - DO IF STRING VALUE: SEQ1 is Equal to “1”
121 - Remark: -->>>> Edit Sequence action to load correct Sequence and set start and stop times (or altitude)
122 - Sequence: Start and End from Sequence - C:\Users\OBS_Tosh\Documents\Voyager\ConfigSequence\NGC7293n.s2q
123 - IF SKIPPED
124 - Remark: ---- Sequence 1 skipped
125 - Goto Block: Sequence 2
126 - IF OK
127 - Guide Stop
128 - Update String: SEQ1 - “0”
129 - Update Counter: ResumeCount - Set to 0
130 - Update Counter: Targets - Offset by -1
131 - Update Counter: WaitTarget - Set to 0
132 - Goto Block: Sequence 2
133 - IF ERROR
134 - Remark: — Sequence 1 not OK
135 - Goto Block: DiagnosticInsitu
136 - IF TIMEOUT
137 - Remark: — Sequence 1 not OK
138 - Goto Block: DiagnosticInsitu
139 - Remark: ==========================================================
140 - Block: Sequence 2
141 - Remark: ==========================================================
142 - Remark: ---- Do this sequence if SEQ2 = 1
143 - DO IF STRING VALUE: SEQ2 is Equal to “1”
144 - Remark: -->>>> Edit Sequence action to load correct Sequence and set start and stop times (or altitude)
145 - Sequence: Start and End from Sequence - C:\Users\OBS_Tosh\Documents\Voyager\ConfigSequence\NGC253n.s2q
146 - IF SKIPPED
147 - Remark: — Sequence 2 skipped
148 - Goto Block: Sequence 3
149 - IF OK
150 - Guide Stop
151 - Update String: SEQ2 - “0”
152 - Update Counter: ResumeCount - Set to 0
153 - Update Counter: Targets - Offset by -1
154 - Update Counter: WaitTarget - Set to 0
155 - Goto Block: Sequence 3
156 - IF ERROR
157 - Remark: — Sequence 2 not OK
158 - Goto Block: DiagnosticInsitu
159 - IF TIMEOUT
160 - Remark: — Sequence 2 not OK
161 - Goto Block: DiagnosticInsitu
162 - Remark: ==========================================================
163 - Block: Sequence 3
164 - Remark: ==========================================================
165 - Remark: ---- Do this sequence if SEQ3 = 1
166 - DO IF STRING VALUE: SEQ3 is Equal to “1”
167 - Remark: -->>>> Edit Sequence action to load correct Sequence and set start and stop times (or altitude)
168 - Sequence: Start and End from Sequence - C:\Users\OBS_Tosh\Documents\Voyager\ConfigSequence\NGC1365n.s2q
169 - IF SKIPPED
170 - Remark: — Sequence 3 skipped
171 - Goto Block: Sequence 4
172 - IF OK
173 - Guide Stop
174 - Update String: SEQ3 - “0”
175 - Update Counter: ResumeCount - Set to 0
176 - Update Counter: Targets - Offset by -1
177 - Update Counter: WaitTarget - Set to 0
178 - Goto Block: Sequence 4
179 - IF ERROR
180 - Remark: — Sequence 3 not OK
181 - Goto Block: DiagnosticInsitu
182 - IF TIMEOUT
183 - Remark: — Sequence 3 not OK
184 - Goto Block: DiagnosticInsitu
185 - Remark: ==========================================================
186 - Block: Sequence 4
187 - Remark: ==========================================================
188 - Remark: ---- Do this sequence if SEQ4 = 1
189 - DO IF STRING VALUE: SEQ4 is Equal to “1”
190 - Remark: -->>>> Edit Sequence action to load correct Sequence and set start and stop times (or altitude)
191 - Sequence: Start 23:45:00 [hh:mm:ss] - End 02:50:00 [hh:mm:ss] - C:\Users\OBS_Tosh\Documents\Voyager\ConfigSequence\NGC1976.s2q
192 - IF SKIPPED
193 - Remark: — Sequence 4 skipped
194 - Goto Block: Sequence 5
195 - IF OK
196 - Guide Stop
197 - Update String: SEQ4 - “0”
198 - Update Counter: ResumeCount - Set to 0
199 - Update Counter: Targets - Offset by -1
200 - Update Counter: WaitTarget - Set to 0
201 - Goto Block: Sequence 5
202 - IF ERROR
203 - Remark: — Sequence 4 not OK
204 - Goto Block: DiagnosticInsitu
205 - IF TIMEOUT
206 - Remark: — Sequence 4 not OK
207 - Goto Block: DiagnosticInsitu
208 - Remark: ==========================================================
209 - Block: Sequence 5
210 - Remark: ==========================================================
211 - Remark: ---- Do this sequence if SEQ5 = 1
212 - DO IF STRING VALUE: SEQ5 is Equal to “1”
213 - Remark: -->>>> Edit Sequence action to load correct Sequence and set start and stop times (or altitude)
214 - Sequence: Start 01:15:00 [hh:mm:ss] - End 04:30:00 [hh:mm:ss] - C:\Users\OBS_Tosh\Documents\Voyager\ConfigSequence\NGC2239.s2q
215 - IF SKIPPED
216 - Remark: — Sequence 5 skipped
217 - DO IF COUNTER VALUE: Targets is Greater than 0
218 - Goto Block: Wait for Target
219 - Goto Block: Sequence Complete
220 - IF OK
221 - Guide Stop
222 - Update String: SEQ5 - “0”
223 - Update Counter: ResumeCount - Set to 0
224 - Update Counter: Targets - Offset by -1
225 - Goto Block: Sequence Complete
226 - IF ERROR
227 - Remark: — Sequence 5 not OK
228 - Goto Block: DiagnosticInsitu
229 - IF TIMEOUT
230 - Remark: — Sequence 5 not OK
231 - Goto Block: DiagnosticInsitu
232 - Goto Block: Sequence Complete
233 - Remark: ==========================================================
234 - Block: Wait for Target
235 - Remark: ==========================================================
236 - Guide Stop
237 - Remark: ---- <<<<< MOVE SCOPE TO ALT/AZ 50/50 AND WAIT 5 MINUTES >>>>>
238 - Goto ALT/AZ: ALT 50 00 00 - AZ 50 0 00 - FC: False
239 - Stop Tracking
240 - Update Counter: WaitTarget - Offset by 1
241 - DO IF COUNTER VALUE: WaitTarget is Lower or Equal to 6
242 - Wait Time: 00:05:00 [hh:mm:ss] Interval
243 - Remark: ---- <<<<< RETRY SEQUENCE >>>>>
244 - Unparking
245 - Start Tracking
246 - Goto Block: Sequence 1
247 - Remark: ************ TERMINATED - RETRIES LIMIT REACHED **************
248 - Goto Block: Terminate Session
249 - Remark: ==========================================================
250 - Block: Blind Solve
251 - Remark: ==========================================================
252 - DO IF STRING VALUE: DontMove is Equal to “0”
253 - Goto ALT/AZ: ALT 50 00 00 - AZ 50 0 00 - FC: False
254 - Remark: — slew to East clear sky
255 - Remark: ---- Solve and sync the scope with Blind Solve
256 - Blind Solving with Sync
257 - IF OK
258 - Update String: BlindSolve - “1”
259 - Remark: ---- Blind Solve succeeded, return to Prepare to Capture
260 - Goto Block: RunTests
261 - Remark: ---- Could be a real problem or just passing clouds or not dark enough yet
262 - Remark: ---- Wait 2 minutes then retry, 3 times
263 - Wait Time: 00:02:00 [hh:mm:ss] Interval
264 - Repeat Block For n Times: 3
265 - Remark: ************ PARK AND HOLD - BLIND SOLVE FAILED **************
266 - Update String: BlindSolve - “0”
267 - Goto Block: Park and Hold
268 - Remark: ==========================================================
269 - Block: Plate Solve
270 - Remark: ==========================================================
271 - DO IF STRING VALUE: DontMove is Equal to “0”
272 - Goto ALT/AZ: ALT 50 00 00 - AZ 50 0 00 - FC: False
273 - Remark: — slew to East clear sky
274 - Remark: ---- Solve and sync the scope with Plate Solver
275 - Plate Solving with Sync
276 - IF OK
277 - Update String: PlateSolve - “1”
278 - Remark: ---- Plate Solver succeeded, proceed to Prepare to Capture
279 - Goto Block: RunTests
280 - Remark: ---- Could be a real problem or just passing clouds or not dark enough yet
281 - Remark: ---- Wait 2 minutes then retry, 3 times
282 - Wait Time: 00:02:00 [hh:mm:ss] Interval
283 - Repeat Block For n Times: 3
284 - Remark: ************ PARK AND HOLD - PLATE SOLVER FAILED **************
285 - Update String: PlateSolve - “0”
286 - Goto Block: Park and Hold
287 - Remark: ==========================================================
288 - Block: Test Autofocus
289 - Remark: ==========================================================
290 - DO IF STRING VALUE: DontMove is Equal to “0”
291 - Goto ALT/AZ: ALT 50 00 00 - AZ 50 0 00 - FC: False
292 - Remark: — slew to East clear sky
293 - AutoFocus with RoboFire LocalField: Filter [0] Lum
294 - IF OK
295 - Update Decimal with Autofocus HFD: HFD
296 - DO IF DECIMAL VALUE: HFD is Between [1 : 8]
297 - Remark: ---- Local Field Autofocus is working
298 - Update Decimal from Focuser Position: FocusPos
299 - Update String: AutoFocus - “1”
300 - Goto Block: RunTests
301 - Remark: ---- Could be a real problem or just passing clouds or not dark enough yet
302 - Remark: ---- Wait 2 minutes then retry, 3 times
303 - Wait Time: 00:02:00 [hh:mm:ss] Interval
304 - Remark: ---- Ensure focuser is approximately in focus for next steps
305 - RoboFire Focuser Move From Variable: Label=FocusPos - Abs
306 - Repeat Block For n Times: 3
307 - Remark: ************ PARK AND HOLD - LOCALFIELD AUTOFOCUS FAILED **************
308 - Update String: AutoFocus - “0”
309 - Goto Block: Park and Hold
310 - Remark: ==========================================================
311 - Block: Test RoboStar
312 - Remark: ==========================================================
313 - DO IF STRING VALUE: DontMove is Equal to “0”
314 - Goto ALT/AZ: ALT 50 00 00 - AZ 50 0 00 - FC: False
315 - Remark: — slew to East clear sky
316 - AutoFocus with RoboStar: Filter [0] Lum
317 - IF OK
318 - Update Decimal with Autofocus HFD: HFD
319 - DO IF DECIMAL VALUE: HFD is Between [1 : 8]
320 - Remark: ---- Robo Star Autofocus is working
321 - Update Decimal from Focuser Position: FocusPos
322 - Update String: RoboStar - “1”
323 - Goto Block: RunTests
324 - Remark: ---- Could be a real problem or just passing clouds or not dark enough yet
325 - Remark: ---- Wait 2 minutes then retry, 3 times
326 - Wait Time: 00:02:00 [hh:mm:ss] Interval
327 - Remark: ---- Ensure focuser is approximately in focus for next steps
328 - RoboFire Focuser Move From Variable: Label=FocusPos - Abs
329 - Repeat Block For n Times: 3
330 - Remark: ************ PARK AND HOLD - ROBOSTAR AUTOFOCUS FAILED **************
331 - Update String: RoboStar - “0”
332 - Goto Block: Park and Hold
333 - Remark: ==========================================================
334 - Block: Test Guiding
335 - Remark: ==========================================================
336 - Guide Stop
337 - DO IF STRING VALUE: DontMove is Equal to “0”
338 - Goto ALT/AZ: ALT 50 00 00 - AZ 50 0 00 - FC: False
339 - Remark: — slew to East clear sky
340 - Guide Start: Time 1.5 [s] - Binning 2 - Use RoboGuide Star Selection
341 - IF OK
342 - Wait Time: 00:05:00 [hh:mm:ss] Interval
343 - Remark: ---- Guiding is working
344 - Guide Stop
345 - Update String: TestGuider - “1”
346 - Goto Block: RunTests
347 - Remark: — Problem with guiding - try again 3 times
348 - Guide Stop
349 - Wait Time: 00:02:00 [hh:mm:ss] Interval
350 - Repeat Block For n Times: 3
351 - Remark: ************ PARK AND HOLD - GUIDING FAILED **************
352 - Update String: TestGuider - “0”
353 - Guide Stop
354 - Goto Block: Park and Hold
355 - Remark: ==========================================================
356 - Block: DiagnosticInsitu
357 - Remark: ==========================================================
358 - Guide Stop
359 - Remark: — Problem with sequence - this block keeps scope in current position and reruns PlateSolve then Autofocus then guiding test
360 - Update String: DontMove - “1”
361 - Update String: PlateSolve - “0”
362 - Update String: AutoFocus - “0”
363 - Update String: TestGuider - “0”
364 - Goto Block: RunTests
365 - Remark: ==========================================================
366 - Block: Park and Hold
367 - Remark: ==========================================================
368 - Guide Stop
369 - Remark: ---- <<<<< HOME SCOPE AND WAIT 3 MINUTES >>>>>
370 - Stop Tracking
371 - Homing
372 - Update Counter: Retries - Offset by 1
373 - DO IF COUNTER VALUE: Retries is Lower or Equal to 10
374 - Wait Time: 00:03:00 [hh:mm:ss] Interval
375 - Remark: ---- <<<<< RETRY SEQUENCE >>>>>
376 - Unparking
377 - Start Tracking
378 - Goto Block: InitialiseFocuser
379 - Remark: ************ TERMINATED - RETRIES LIMIT REACHED **************
380 - Goto Block: Terminate Session
381 - Remark: ==========================================================
382 - Block: Sequence Complete
383 - Remark: ==========================================================
384 - Remark: $$$$$$$$$$$$$ SEQUENCE COMPLETED $$$$$$$$$$$$$$$$$$$$$
385 - Goto Block: Terminate Session
386 - Remark: ==========================================================
387 - Block: Terminate Session
388 - Remark: ==========================================================
389 - Remark: ---- Run Equipment Shutdown actions
390 - Guide Stop
391 - Stop Tracking
392 - Homing
393 - Warmup: Sync
394 - Disconnect Setup
395 - Disable Events
396 - Goto End
397 - End
398 - Events
399 - Emergency Suspend: Wait Resume for a time interval of : 00:05:00 [hh:mm:ss] - On Resume Timeout Restart DragScript
400 - Remark: ==========================================================
401 - Remark: ---- Control comes here if an Emergency Suspend event occurs
402 - Remark: ---- Move to Home position and stop tracking
403 - Remark: ---- Wait until end of night for an Emergency Resume - Do Emergency Exit if no Resume happens
404 - Guide Stop
405 - Stop Tracking
406 - Homing
407 - DO IF COUNTER VALUE: ResumeCount is Greater or Equal to 4
408 - Raise Emergency Exit Event
409 - Emergency Resume
410 - Remark: ==========================================================
411 - Remark: ---- Control comes here if an Emergency Resume event occurs
412 - Remark: ---- Start tracking and then control resumes from where the Suspend happened
413 - Start Tracking
414 - Update Counter: ResumeCount - Offset by 1
415 - Emergency Exit
416 - Remark: ==========================================================
417 - Remark: ---- Control comes here if an Emergency Exit event occurs
418 - Remark: ---- stop guider, move to Home position, stop tracking, warm camera and disconnect everything
419 - Guide Stop
420 - Stop Tracking
421 - Homing
422 - Warmup: Sync
423 - Disconnect Setup
1 Like
Happy to share. If anyone has a better way to do this I’d appreciate the feedback.
Here is my latest version .VOS file
RunMultipleSequences_V13.chg.vos (525.3 KB)
It includes some extra functionality to stop the sequence at the end of the night and control my obs power through scripts.