task: gate probe completion on full motion drain (#3650)#3970
Closed
grandixximo wants to merge 1 commit intoLinuxCNC:masterfrom
Closed
task: gate probe completion on full motion drain (#3650)#3970grandixximo wants to merge 1 commit intoLinuxCNC:masterfrom
grandixximo wants to merge 1 commit intoLinuxCNC:masterfrom
Conversation
Probe is a queue-buster: the interpreter must wait for the probing
motion to fully stop before reading probe parameters (#5061..#5069),
otherwise the result is sampled mid-motion and the position reported
is stale.
Previously EMC_TRAJ_PROBE_TYPE returned EMC_TASK_EXEC::DONE as its
postcondition, so the interp_list could advance to the next command
(typically EMC_TASK_PLAN_SYNCH) and then to the next read() before the
trajectory queue had fully drained. With a bouncy probe (re-trip during
deceleration) or under cyclic G38.x sequences, the next read_inputs()
ran while motion.traj.queue > 0 and the CHKS guard fired:
"Queue is not empty after probing"
Add a dedicated EMC_TASK_EXEC::WAITING_FOR_PROBE postcondition state
that holds the interp_list until:
- motion.status == DONE
- io.status == DONE
- motion.traj.queue == 0
- motion.traj.probing is clear
This makes the safety guarantee explicit at the probe boundary instead
of relying on the next command's precondition to drain the queue, and
covers the timing windows where bouncy probe edges or rapid successive
G38.x commands let the interpreter race ahead of the planner.
Closes LinuxCNC#3650
Closes LinuxCNC#662
Closes LinuxCNC#263
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
working on it