SOES icon indicating copy to clipboard operation
SOES copied to clipboard

Allow delayed ESM state-change

Open konradhermsdorf opened this issue 7 months ago • 2 comments

Keep pending AL-Control-Event flag in ESCvar so a state-change request does not need to be serviced immediately. Also add an acknowledge-parameter to the pre_state_change()-callback which may be negated by the routine in order to postpone a state-change to the next run of the slave handler.

When AL-control request is asserted by master, the according AL-event flag is set by the ESC. The according AL-Event flag is cleared on reading the AL-Control register right at the top of ESC_state(); so the routine only ran once per AL-Control-Request. With the ESCvar.ALcontrol_pending flag, a not yet finished state-change allows running the state-change logic again until the state-change gets acknowledged by the pre_state_change() callback.

This approach allows SOES to service other requests (e.g. mailbox) while a state-change is pending.

Why ist this needed? A slave that needs some time to become (Pre-)Operational, e.g. one that needs to accelerate a rotating mass before entering PreOp needs to be able to delay a state change without setting the ALerror bit

konradhermsdorf avatar Sep 05 '25 08:09 konradhermsdorf

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 23 '25 11:09 CLAassistant

@hefloryd do you need further information?

konradhermsdorf avatar Oct 08 '25 11:10 konradhermsdorf