sardana-org / sardana

Moved to GitLab: https://gitlab.com/sardana-org/sardana
39 stars 52 forks source link

abort of external macro #1606

Open kklmn opened 3 years ago

kklmn commented 3 years ago

Hi,

If I create a door object as door = taurus.Device(my/door/path) and then run a macro as door.runMacro(my_macro_str), the macro executor in Taurus GUI doesn't change its buttons: the stop button remains gray and the Run button remains green. So there is no way to abort the macro. The State LED goes to blue though.

I think the macro executor should react also to externally started macros, not only to those started from within its widget.

Thank you, as always!

reszelaz commented 3 years ago

Hi @kklmn,

We were discussing it in https://github.com/sardana-org/sardana/pull/1109 starting from this https://github.com/sardana-org/sardana/pull/1109#issuecomment-502992707 (there are also some interesting comments in continuation, sorry, but these are mixed with the PR review comments).

I do not have a strong opinion on how these widgets should behave. Before we decide to change/maintain the current behavior I will try to post here the consequences of both options.

I will come back to this issue (and others you've posted recently) after Thursday's Sardana follow-up meeting - I'm a bit busy these days.

Cheers

kklmn commented 3 years ago

Hi @reszelaz,

Thank you for pointing to the old discussion in #1109!

I think much of that discussion has a very abstract ground; people probably assume that there will be several competing operators that start various spock sessions. In my reality, this is never the case: the beamline operator is always one person at a time. So if I want to abort a scan, I do want to abort it. And it is indeed confusing when I start it in one widget (terminal) and cannot abort from another one connected to the same door. @stanislaw55 says exactly the opposite with no explanation about his confusion of what with what.

I can reduce my opinion on macro controlling to this sentence: If a widget (terminal) reacts on the macro, e.g. prints the door output, the same widget, or a near widget, should be able to abort it. For example, the Sardana/Taurus macro executor is near the DoorOutput widget. And inversely, abortion should be ignored if the output is silent to the macro.

More explanation: I have beamline optimization widgets on one screen (8 screens in total). On another screen is my plotting tool and the standard Taurus Sardana integration widgets including DoorOutput. When I start an optimization macro, I look at the plots and DoorOutput. Because my focus is already there, aborting is easier from that screen. Certainly, I can put abortion buttons in my widgets, this is just against users' and my intuition.

kklmn commented 3 years ago

if there are two opposite opinions on the issue, should there be a corresponding user option?