My multi-target dragscript with built in redundancies

Hello,

This is my multi-target drag script. It was designed based off a few others I’ve seen floating around with my own ideas injected in.

It has built in fail safes for cloud cover and other errors. You can do 2 targets per night but could easily be modified for more.

You may need to modify the guide calibration script to point to somewhere near DEC 0 for best performance. My HOME position just happens to be near DEC 0 so I use this.

Status updates are sent through Telegram so you’ll have to enter your appropriate telegram BOT info if you wish to use this, or switch to some other method of status updating.

I’ve tested different parts of this script thoroughly but it is still in what I would call a ‘BETA’ phase, as I’d like to do some more testing before calling it ‘FINAL’.

1 - Start: Events At Start are ENABLE
2 - Script
3 - Remark: ====================================================
4 - Remark: MASTER SCRIPT - ONE or TWO Targets
5 - Remark: YOU MUST SET VALUE FOR COUNTER : “# OF TARGETS”
6 - Remark: YOU MUST SET VALUE FOR “SKY FLATS” : No = 0, Yes = 1
7 - Remark: YOU MUST SET FILE PATHS FOR TARGETS & FLATS BELOW
8 - Remark: ====================================================
9 - Send Telegram: START : ##NOW##
10 - Block: ERROR COUNTERS
11 - Counter: # OF TARGETS - Init Value = 1
12 - Counter: SKY FLATS - Init Value = 1
13 - Counter: Connect Error Counter - Init Value = 0
14 - Counter: Sequence 1 Error Counter - Init Value = 0
15 - Counter: Sequence 2 Error Counter - Init Value = 0
16 - Counter: Initial Focus Error - Init Value = 0
17 - Counter: Guide Calibratiion Error - Init Value = 0
18 - Block: CONNECT & HOME
19 - Send Telegram: START
20 - DO IF SETUP DISCONNECTED
21 - Connect Setup with Timeout: TimeOut : 120[s]
22 - If OK
23 - Send Telegram: COMPLETE
24 - Update Counter: Connect Error Counter - Set to 0
25 - Homing
26 - Cooling Down: -20[°C] - Async Cooling - Use Voyager Ramp Mode Cooling down-20[°C]
27 - Parking
28 - Send Telegram: COMPLETE. COMPLETE. COMPLETE. WAITING…
29 - Wait Nautical Night: Manual Data [LAT:00° 00’ 00" N LON: 00° 00’ 00" W] - Offset (After) 00:30:00 [hh:mm:ss]
30 - Send Telegram: ARRIVED
31 - Unparking
32 - Start Tracking
33 - GoTo Block: INITIAL FOCUS
34 - If TIMEOUT
35 - Update Counter: Connect Error Counter - Offset by 1
36 - DO IF COUNTER VALUE: Connect Error Counter is Lower than 3
37 - Send Telegram: ERROR…Retrying 3 times…
38 - GoTo Block: CONNECT & HOME
39 - DO IF COUNTER VALUE: Connect Error Counter is Greater or Equal to 3
40 - Update Counter: Connect Error Counter - Set to 0
41 - Send Telegram: ERROR…Retried 3 times, attempting to park mount and ending session…
42 - Parking
43 - Disconnect Setup
44 - GoTo End
45 - If Error
46 - Update Counter: Connect Error Counter - Offset by 1
47 - DO IF COUNTER VALUE: Connect Error Counter is Lower than 3
48 - Send Telegram: ERROR : ##NOW##… 10 MINUTES…
49 - GoTo Block: CONNECT & HOME
50 - DO IF COUNTER VALUE: Connect Error Counter is Greater or Equal to 3
51 - Update Counter: Connect Error Counter - Set to 0
52 - Send Telegram: ERROR…Retried 3 times, attempting to park mount and ending session…
53 - Parking
54 - Forced Disconnect Setup
55 - GoTo End
56 - DO IF SETUP CONNECTED
57 - Send Telegram: COMPLETE
58 - Unparking
59 - Start Tracking
60 - Homing
61 - Cooling Down: -20[°C] - Async Cooling - Use Voyager Ramp Mode Cooling down-20[°C]
62 - Parking
63 - Send Telegram: COMPLETE. COMPLETE. COMPLETE. WAIT…
64 - Wait Nautical Night: Manual Data [LAT:00° 00’ 00" N LON: 00° 00’ 00" W] - Offset (After) 00:30:00 [hh:mm:ss]
65 - Send Telegram: ARRIVED
66 - Unparking
67 - Start Tracking
68 - GoTo Block: INITIAL FOCUS
69 - Block: INITIAL FOCUS
70 - Send Telegram: START : ##NOW##
71 - AutoFocus with RoboStar: Filter [0] IR/UV
72 - If OK
73 - Send Telegram: COMPLETE : ##NOW##
74 - GoTo Block: GUIDE CALIBRATION
75 - If Error
76 - Update Counter: Initial Focus Error - Offset by 1
77 - Parking
78 - DO IF COUNTER VALUE: Initial Focus Error is Lower or Equal to 30
79 - Send Telegram: ERROR : ##NOW##… 10 MINUTES…
80 - Wait Time: 00:10:00 [hh:mm:ss] Interval
81 - Unparking
82 - Start Tracking
83 - GoTo Block: INITIAL FOCUS
84 - DO IF COUNTER VALUE: Initial Focus Error is Greater than 30
85 - Update Counter: Initial Focus Error - Set to 0
86 - Send Telegram: ERROR : ##NOW##… 5 HOUR TIMEOUT - ENDING SESSION
87 - Unparking
88 - Start Tracking
89 - GoTo Block: GOODNIGHT
90 - Block: GUIDE CALIBRATION
91 - Send Telegram: START : ##NOW##
92 - Homing
93 - Acquiring Guide Star: Time 2 [s] - Binning 1 - Use RoboGuide Star Selection
94 - Calibrate Guide: Time 2 [s] - Binning 1 - Use RoboGuide Star Selection
95 - If OK
96 - Send Telegram: COMPLETE : ##NOW##
97 - Guide Stop
98 - GoTo Block: TARGET 1
99 - If Error
100 - Update Counter: Guide Calibratiion Error - Offset by 1
101 - Guide Stop
102 - Parking
103 - DO IF COUNTER VALUE: Guide Calibratiion Error is Lower or Equal to 30
104 - Send Telegram: ERROR : ##NOW##… 10 MINUTES…
105 - Wait Time: 00:10:00 [hh:mm:ss] Interval
106 - Unparking
107 - Start Tracking
108 - GoTo Block: GUIDE CALIBRATION
109 - DO IF COUNTER VALUE: Initial Focus Error is Greater than 30
110 - Update Counter: Guide Calibratiion Error - Set to 0
111 - Send Telegram: ERROR : ##NOW##… 5 HOUR TIMEOUT - ENDING SESSION
112 - Unparking
113 - Start Tracking
114 - GoTo Block: GOODNIGHT
115 - Block: TARGET 1
116 - DO IF COUNTER VALUE: # OF TARGETS is Equal to 0
117 - GoTo Block: SKY FLATS
118 - DO IF COUNTER VALUE: # OF TARGETS is Greater or Equal to 1
119 - Send Telegram: <IMAGING TARGET #1> START : ##NOW##
120 - Sequence: Start 19:00:00 [hh:mm:ss] - End 07:00:00 [hh:mm:ss] - C:.…
121 - If OK
122 - Send Telegram: <IMAGING TARGET #1> COMPLETE : ##NOW##
123 - DO IF COUNTER VALUE: # OF TARGETS is Equal to 1
124 - Guide Stop
125 - Parking
126 - GoTo Block: SKY FLATS
127 - DO IF COUNTER VALUE: # OF TARGETS is Greater or Equal to 2
128 - Guide Stop
129 - Parking
130 - GoTo Block: TARGET 2
131 - If Error
132 - Update Counter: Sequence 1 Error Counter - Offset by 1
133 - Guide Stop
134 - Parking
135 - DO IF COUNTER VALUE: Sequence 1 Error Counter is Lower than 30
136 - Send Telegram: <IMAGING TARGET #1> ERROR : ##NOW##… 10 MINUTES…
137 - Wait Time: 00:10:00 [hh:mm:ss] Interval
138 - Unparking
139 - Start Tracking
140 - GoTo Block: TARGET 1
141 - DO IF COUNTER VALUE: Sequence 1 Error Counter is Greater or Equal to 30
142 - Update Counter: Sequence 1 Error Counter - Set to 0
143 - Send Telegram: <IMAGING TARGET #2> ERROR : ##NOW##… 5 HOUR TIMEOUT - ENDING SESSION
144 - Unparking
145 - Start Tracking
146 - GoTo Block: GOODNIGHT
147 - Block: TARGET 2
148 - DO IF COUNTER VALUE: # OF TARGETS is Greater or Equal to 2
149 - Send Telegram: <IMAGING TARGET #2> START : ##NOW##
150 - Sequence: Start 19:00:00 [hh:mm:ss] - End 07:00:00 [hh:mm:ss] - C:.…
151 - If OK
152 - Send Telegram: <IMAGING TARGET #2> COMPLETE : ##NOW##
153 - DO IF COUNTER VALUE: # OF TARGETS is Equal to 2
154 - Guide Stop
155 - Parking
156 - GoTo Block: SKY FLATS
157 - If Error
158 - Update Counter: Sequence 2 Error Counter - Offset by 1
159 - Guide Stop
160 - Parking
161 - DO IF COUNTER VALUE: Sequence 2 Error Counter is Lower than 30
162 - Send Telegram: <IMAGING TARGET #2> ERROR : ##NOW##… 10 MINUTES…
163 - Wait Time: 00:10:00 [hh:mm:ss] Interval
164 - Unparking
165 - Start Tracking
166 - GoTo Block: TARGET 2
167 - DO IF COUNTER VALUE: Sequence 2 Error Counter is Greater or Equal to 30
168 - Update Counter: Sequence 2 Error Counter - Set to 0
169 - Send Telegram: <IMAGING TARGET #2> ERROR : ##NOW##… 5 HOUR TIMEOUT - ENDING SESSION
170 - Unparking
171 - Start Tracking
172 - GoTo Block: GOODNIGHT
173 - Block: SKY FLATS
174 - DO IF COUNTER VALUE: SKY FLATS is Equal to 0
175 - Send Telegram: NOT SELECTED
176 - GoTo Block: GOODNIGHT
177 - DO IF COUNTER VALUE: SKY FLATS is Greater or Equal to 1
178 - Send Telegram: SELECTED : ##NOW##. WAITING…
179 - Wait Dawn: Manual Data [LAT:00° 00’ 00" N LON: 00° 00’ 00" W] - Offset (Before) 00:00:00 [hh:mm:ss]
180 - Send Telegram: ARRIVED : ##NOW##. START
181 - Unparking
182 - Flat: C:.…
183 - If OK
184 - Send Telegram: COMPLETE : ##NOW##
185 - GoTo Block: GOODNIGHT
186 - If Error
187 - Send Telegram: ERROR : ##NOW##
188 - GoTo Block: GOODNIGHT
189 - Block: GOODNIGHT
190 - Parking
191 - Warmup: Async
192 - Wait Time: 00:15:00 [hh:mm:ss] Interval
193 - Disconnect Setup
194 - Send Telegram: COMPLETE. COMPLETE. COMPLETE… END : ##NOW##
195 - GoTo End
196 - Block: 1
197 - Block: 2
198 - End
199 - Events
200 - Events RoboTarget

Some line items are being truncated in the message above, particularly the Telegram messages. I’ve attached the file directly so you can load into Drag script editor and it will make more sense.

Master.chg.vos (221.9 KB)