Skip to content

task: an E-stop reset leaves a machine that is on alone - #4801

Open
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:task-estop-reset-while-on
Open

grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:task-estop-reset-while-on

Conversation

@grandixximo

@grandixximo grandixximo commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

emcTaskSetState() ran the whole E-stop reset for ESTOP_RESET in any state: it aborted motion and the interpreter, stopped the spindles, turned the flood off and aborted iocontrol. Sent to a machine that is on, the machine stayed on and lost whatever it was doing, a running program or a homing. The docs only describe the reset as leaving E-stop, and halui.abort is the way to abort.

gmoccapy sends such a reset: when it shows a state change on its E-stop button, the button's handler sends that state again. With gstat reporting the reset after a reset and machine on that fall between two status polls (#4778), the reset arrives at a machine that is already on, and aborted a homing the ui-smoke driver had just started.

This skips ESTOP_RESET when the machine is on. Every other state runs it as before, including configs that tie iocontrol.0.emc-enable-in high, where task never reports E-stop. No in-tree sender relies on the abort while on: AXIS, gscreen, tklinuxcnc and the qtvcp action button check for E-stop first, and the tests reset only from E-stop or at startup.

tests/abort/feed-rate now also runs a move with the spindle and flood on, sends the reset, and checks that all of it keeps going; it fails without this change. interp, toolchanger, tool-info, motion-logger, abort, halui, linuxcncrsh, classicladder, hard-limits, home and mdi-queue pass (129 tests), and on the gmoccapy lathe sim a homing now completes when an ESTOP_RESET arrives during it.

@gmoccapy

gmoccapy commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Does this solve 4778?
If so the 4778 can be closed.

Norbert

@grandixximo

Copy link
Copy Markdown
Contributor Author

This is in combination with 4778, which now does not touch gmoccapy

image

@BsAtHome

BsAtHome commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Do we really need a new test for every single bugfix change? We went from 264 in 2.9 to 360 in master. And most of the new tests in master are recent.

emcTaskSetState() ran the whole E-stop reset for ESTOP_RESET in any state: it aborted motion and the interpreter, stopped the spindles, turned the flood off and aborted iocontrol. Sent to a machine that is on, the machine stayed on and lost whatever it was doing, a running program or a homing. The docs only describe the reset as leaving E-stop, and halui.abort is the way to abort.

gmoccapy sends such a reset: when it shows a state change on its E-stop button, the button's handler sends that state again. With gstat reporting the reset after a reset and machine on that fall between two status polls (LinuxCNC#4778), the reset arrives at a machine that is already on, and aborted a homing the ui-smoke driver had just started.

Skip ESTOP_RESET when the machine is on. Every other state runs it as before, including configs that tie iocontrol.0.emc-enable-in high, where task never reports E-stop. No in-tree sender relies on the abort while on: AXIS, gscreen, tklinuxcnc and the qtvcp action button check for E-stop first, and the tests reset only from E-stop or at startup.
@grandixximo
grandixximo force-pushed the task-estop-reset-while-on branch from 13206a5 to 223002a Compare November 9, 2026 08:40
@grandixximo

Copy link
Copy Markdown
Contributor Author

Fair point. I folded the check into tests/abort/feed-rate, which already starts the same sim, so this PR no longer adds a test. It still fails without the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants