I've been running a script where if necessary I need to connect a focuser after disconnecting the scope.
All functioned correctly until the day before yesterday when due to an unknown reason the system returned the message "Could not connect the device" and stopped the script.
I found out the problem after some time because I checked the system before going to sleep. I normally use the script to command the scope through the night.
So my question is if in such a case it is possible to trap the error and foresee an instruction to put the system in safety.
Thanks and regards.
Alessandro
Error trapping
Re: Error trapping
Usually the .Connect commands stop the script if a connection error is found. For your research would you prefer a different Connect command which returns True or False?
-
- Posts: 20
- Joined: 09 May 2019, 08:02
Re: Error trapping
Hi Fabio,
thank you for the answer. Well, it could be useful having the possibility to check if the .connect was successful or not so I can foresee a routine either to continue (i.e. even if the image is not well focused I can do photometry) or to place the scope in a safe position and close the roof. In any case the scope is operating unattended and if the script is stopped nothing move until my next check.
Thanks.
Alessandro
thank you for the answer. Well, it could be useful having the possibility to check if the .connect was successful or not so I can foresee a routine either to continue (i.e. even if the image is not well focused I can do photometry) or to place the scope in a safe position and close the roof. In any case the scope is operating unattended and if the script is stopped nothing move until my next check.
Thanks.
Alessandro