interp: expose absolute machine position as #5021-#5029#4167
Open
grandixximo wants to merge 1 commit into
Open
interp: expose absolute machine position as #5021-#5029#4167grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
Add a machine-coordinate current-position parameter set, matching the layout used by other controllers. Reading machine coordinates previously required either summing the individual offset registers by formula or the G30.1 trick (which writes the absolute position into #5181-#5186). #5021-#5029 hold the current absolute machine position (G53 frame) for X Y Z A B C U V W, in the current program units, with no coordinate system, G92/G52 or tool length offset applied. They are read-only and volatile, filled each line alongside #5420-#5428 and not persisted to the var file. This is the same value already available as the #<_abs_*> named parameters, which until now existed only for X Y Z A B C; the U V W named parameters (#<_abs_u>, #<_abs_v>, #<_abs_w>) are added to match. The shared computation is factored into get_abs_position().
9c1b6c1 to
6da626e
Compare
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.
Adds a machine-coordinate current-position parameter set,
#5021-#5029, for X Y Z A B C U V W.These report the current absolute machine position (G53 frame), with no coordinate system, G92/G52 or tool length offset applied, in the current program units. They are read-only and volatile, filled each line alongside
#5420-#5428and not persisted to the var file.This is the same value already exposed by the
#<_abs_*>named parameters, which existed only for X Y Z A B C; this also adds the missing#<_abs_u>,#<_abs_v>,#<_abs_w>so both sets cover all nine axes. The shared computation is factored intoget_abs_position().Until now the machine position had no numbered parameter; getting it required summing the individual offset registers by formula or the
G30.1trick (which writes the absolute position into#5181-#5186). With this set:#5021 - #5420,#5061 + #5021 - #5420(no coordinate rotation).The G38 documentation is updated to use this instead of the offset-summing formula. Includes a new interp test verifying the machine position tracks the commanded G53 location across coordinate system, G92, rotation and tool length offset, and that the numbered set agrees with the named set.
Follow-up to the #4159 #4163 discussion. @cmorley does this match what you had in mind?
@rene-dev this extends your global parameters, looks ok?