Skip to content

task: hold an MDI back while a kinematics switch is still landing - #4951

Merged
grandixximo merged 1 commit into
LinuxCNC:masterfrom
grandixximo:ks-kins-wait
Dec 2, 2026
Merged

grandixximo merged 1 commit into
LinuxCNC:masterfrom
grandixximo:ks-kins-wait

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

An abort routine that selects a kinematics, G13.1 in ON_ABORT_COMMAND,
runs inside the interpreter at once, but its switch reaches motion later,
and until it has landed the interpreter is back on the type motion still
runs. An MDI arriving in that wait was read straight away under the old
type: G43.4 H1 sent right after an abort found the interpreter already on
the primary kinematics, queued no switch, and left G43.4 active with
motion in identity.

A G12.1 or G13.1 in a program or MDI line sets the wait flag, which holds
an MDI back. The abort routine cannot, so task now also queues an MDI that
arrives while it waits for a kinematics switch.

tests/kins-switch sends G43.4 H1 right after an abort, ten times. Under
load, runtests -j 4 with 8 CPU hogs in a sandbox, it failed 28 of 40 runs
without the change and passed 40 of 40 with it. The full runtests suite
passes.

An abort routine that selects a kinematics, G13.1 in ON_ABORT_COMMAND,
runs inside the interpreter at once, but its switch reaches motion later,
and until it has landed the interpreter is back on the type motion still
runs. An MDI arriving in that wait was read straight away under the old
type: G43.4 H1 sent right after an abort found the interpreter already on
the primary kinematics, queued no switch, and left G43.4 active with
motion in identity.

A G12.1 or G13.1 in a program or MDI line sets the wait flag, which holds
an MDI back. The abort routine cannot, so task now also queues an MDI that
arrives while it waits for a kinematics switch.

tests/kins-switch sends G43.4 H1 right after an abort, ten times. Under
load, runtests -j 4 with 8 CPU hogs in a sandbox, it failed 28 of 40 runs
without the change and passed 40 of 40 with it. The full runtests suite
passes.
@grandixximo
grandixximo merged commit 412091e into LinuxCNC:master Dec 2, 2026
19 checks passed
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.

1 participant