PolishookDavid / LAST_OCS

Code controling the LAST project Observatory
0 stars 0 forks source link

(new feature) Check final position after moving focusers #31

Open simonegarrappa opened 3 months ago

simonegarrappa commented 3 months ago

A feature we might want to add is a check that the focuser actually reached the desired position after moving it. This would spot quickly focuser problems (e.g. loosen screws, commands pile-up).

EranOfek commented 3 months ago

In addition, if focuser didn't reach the designated position: (1) write error message into log file; (2) send an e-mail message to users listed in some config file.

EastEriq commented 3 months ago

yes, and prepare me a coffee with meringues and whipped cream.

Supervision/monitoring/alert, both at the Unit and at the System Health level, belongs for sanity elsewhere than business logic code. Some initial idea about what tools to use is into https://github.com/EastEriq/LAST_SuperunitMonitoring/issues/5

EastEriq commented 3 months ago

Self note: .Status reports as 'stuck' if the driver says ~reached, but I could also check if .Pos~=.TargetPos. I would think that the two are equivalent.

And obviously, the motor driver only knows about itself and not about what should be moved, if the gears are broken, don't move grasp the spindle or whatever else.