ASCOM Safety Monitor

Issue #846 new
Niccolò Coli created an issue

Currently the Safety Monitor is implemented as a loop condition that skips the active sequence item if safe condition is False.

I see a few potential limitations of this behavior in case of emergency shutdown needed:

  • it could be tricky to make sure everything works as intended in case of multiple target/sequences
  • Even if the entire sequence/s is/are skipped, the emergency shutdown procedure may differ from the standard End Sequence set of actions

Suggestion is to make it possible for the Safety Monitor to trigger a pre-defined “emergency shutdown” set of actions when safe condition is False. Maybe a Safety Monitor Trigger ?

Comments (8)

  1. Niccolò Coli reporter

    Hi Stefan, I know your position on this is not favorable, but maybe I can elaborate a bit further and explain my use case. With a roll-off obs like mine, automating the roof closure is not trivial since there is a high risk that it can kill the scope if this is not properly parked. With my current project of observatory automation I am going to implement a system of photo-cells to detect if the scope is in parking position before the driver initiates a roof closure. This in theory should be ok, but still I would like to trigger un-assisted roof closures only for emergency cases. With the current implementation of Safety Monitor I’d have to always include a “Close dome shutter” as default at the end of my sequences for it to be effective.

    I see there is already an exception to the standard sequence approach under the the Dome tab in Options with the “Close on unsafe conditions” toggle.

    I am not sure if it is possible but I think having a special condition to the above toggle to only initiate closure after the ASCOM driver reports the scope is parked would be a possible solution to my case.

    I could then:

    • set a normal sequence with Safety Monitor and standard stop/park instructions in the sequence end area (but no dome closing condition)
    • toggle “Close dome on unsafe conditions” on
    • If Safety conditions are always met, the sequence will run till the end and park the scope but not close the roof
    • If Unsafe conditions are triggered , the sequence is skipped to the end, scope parked and only after the ASCOM driver reports the scope in parking position, roof closure is initiated

    Not sure if all the above makes sense, happy to discuss further, thank you!

  2. Dale Ghent

    I think Safety Monitor reactions are indeed special cases and the need to react differently, in terms of hardware actions, is a valid desire. The question is how best to do this without introducing any kind of implied (ie, hidden) actions or branched logic in the sequencer.

    Since I recently started running my club’s domed observatory, I’ve come to realize that the reaction to a Safety Monitor state change can be very particular to an observatory’s setup, operator’s desires around pausing and potential automatic recovery of a session, and even available resources, such as emergency battery power.

    As I think about how to achieve this while also attempting to preserve NINA’s own theory, a solution that grants this flexibility might look like this:

    1. The Safety Monitor trigger allows one to specify existing templates for use in response to Unsafe and Recovery situations. This could be a combobox that lists available user-created templates. The default actions for safe->unsafe would be the End of Sequence block/template, and the default actions for recovery (unsafe->safe) would be the Begin of Sequence actions/template.
    2. The templates that are selected will be configured to the user’s operational preferences in terms of how they wish to handle going from a safe to unsafe condition, and from an unsafe to safe (recovery) situation.
    3. A optional Recovery Timeout could be offered, where if the system sits for a period of time in an Unsafe state after completing the Unsafe actions, the normal End of Sequence actions would be executed. This would allow for the user to “give up” after a period of time and have their observatory fully shut down in its normal way. This is probably most useful to people who operate domes or RoRs where the telescope can clear the closed roof in any orientation.

    To expand on point 3, the reasoning here is that a dome or RoR that has sufficient clearance may just want to stop guiding and imaging, then only close the dome shutter or roof in response to an unsafe condition. The unsafe condition may be temporary and parking the mount or rotating the dome to its own park position and other “full shutdown” tasks (camera warming, setting switches, etc) are undesirable. If the Safety Monitor driver signals a return to normalcy within a specified length of time (minutes or hours), then the template specified by the Recovery options will be executed - just opening the shutter/roof, starting guiding, and then resuming the sequence where it left off. If the specified timeout expires without the Safety Monitor signalling that it is safe, then the full end-of-sequence instructions could be executed - parking the dome, warming the camera, and all the other things that would normally be done at the end of a night.

    Safety Monitor reactions are certainly unique and special cases within the logic flow of a sequence, but I don’t think the need to fullfill these will result in breaking NINA’s overall theory around sequence flow.

  3. Niccolò Coli reporter

    Yes I agree, what you propose is very similar to my first post suggestion. Maybe a custom Safety Monitor Plugin could do the job?

  4. Chris Woodhouse

    the other possibility is, just as with the startup, sequence and shutdown sections, there are two further sections, called shutdown and resume? One could drag down the instructions as before, but they are only entered/exited as a result of safety monitor triggers?

  5. Ruediger

    Hello all,

    I would bring up this open advanced sequencer instruction request again. There were very good ideas suggested above and I also would need a trigger on unsafe to abort the target and jump to end sequence. I have no dome, but it makes sense in case of clouds or wind gusts to abort the session park the mount in its safe position / execute the end sequence.

    Many thanks!
    Rüdiger

  6. Stefan B repo owner

    Sequencer Powerup plugins give more flexibility like “When becomes unsafe” as a trigger.

  7. Log in to comment