Repository navigation
interp: take the G52/G92 offset from status on abort - #4967
Open
grandixximo wants to merge 1 commit into
Open
grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
The interpreter reads ahead of the machine. When a program was aborted after the read ahead had passed a G52 or G92 the machine never reached, the interpreter kept that offset while status, and so the DRO, still had the old one, and the next move went to the read ahead's offset (LinuxCNC#2908). DISABLE_G92_PERSISTENCE did not clear the offset on an abort either, only at startup and at M2/M30. On abort the interpreter now takes the offset the machine has from status, as it does the coordinate system, and tells canon so status and interpreter agree. With DISABLE_G92_PERSISTENCE it clears the offset, as M2 does. A new canon call, GET_EXTERNAL_G92_OFFSET, reads it. tests/statbuffer-g5x-abort sets G52 X7 from MDI, aborts a program whose read ahead has passed a G52 X3, and checks the DRO, #5211 and where G0 X0 goes; it runs again with DISABLE_G92_PERSISTENCE = 1 and expects 0. Its fixed sleeps are now waits on status. Without the fix it ends at 3 in both runs. The docs say the offset follows an abort, and overview.adoc no longer has the persistence of #5211-#5219 backwards.
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.
The interpreter reads ahead of the machine. When a program is aborted after the read ahead has passed a G52 or G92 the machine never reached, the interpreter keeps that offset while status, and so the DRO, still has the old one. The next move goes to the read ahead's offset. Example from #2908:
G52 X100then(abort, ...); the DRO shows no offset, andG0 X0from MDI drives to X100.DISABLE_G92_PERSISTENCEdid not clear the offset on an abort either, only at startup and at M2/M30.On abort the interpreter now takes the offset the machine has from status, as it does the coordinate system, and tells canon, so status and interpreter agree. With
DISABLE_G92_PERSISTENCEit clears the offset, as M2 does. A new canon call,GET_EXTERNAL_G92_OFFSET, reads it; sai and the preview have no machine and keep the interpreter's offset.tests/statbuffer-g5x-abort sets
G52 X7from MDI, aborts a program whose read ahead has passed aG52 X3, and checks the DRO,#5211and whereG0 X0goes. It runs again withDISABLE_G92_PERSISTENCE = 1and expects 0. Without the fix it ends at 3 in both runs. Its fixed sleeps are now waits on status, and test.sh usesset -e, since runtests runs it withbash -xand the-eon the first line was ignored.The docs say the offset follows an abort, and overview.adoc no longer has the persistence of
#5211-#5219backwards.Fixes #2908. Part of #4953.