Skip to content

Backport #4167: expose absolute machine position as #5021-#5029 (2.9)#4168

Open
grandixximo wants to merge 1 commit into
LinuxCNC:2.9from
grandixximo:backport/machine-coord-params-2.9
Open

Backport #4167: expose absolute machine position as #5021-#5029 (2.9)#4168
grandixximo wants to merge 1 commit into
LinuxCNC:2.9from
grandixximo:backport/machine-coord-params-2.9

Conversation

@grandixximo

@grandixximo grandixximo commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Backport of #4167 to 2.9.

Adds a machine-coordinate current-position parameter set, #5021-#5029, for X Y Z A B C U V W: the current absolute machine position (G53 frame), with no coordinate system, G92/G52 or tool length offset applied, in the current program units. Read-only and volatile, filled each line alongside #5420-#5428 and not persisted to the var file.

Also adds the #<_abs_u>, #<_abs_v>, #<_abs_w> named parameters so the existing #<_abs_*> set (previously X Y Z A B C only) covers all nine axes. The shared computation is factored into get_abs_position(). The G38 documentation is updated to use this for converting a probe result to machine coordinates.

This is purely additive: it introduces new read-only parameters and does not change the value or behavior of any existing parameter. The only change to existing tests is the introspection dump in tests/remap/introspect, which now lists the three new named parameters.

Cherry-picked cleanly except for two trivial resolutions: the array is named _readonly_parameters on 2.9, and the introspect expected output was regenerated on 2.9.

Verified on 2.9: clean build, the new interp test passes, and 98/98 in tests/interp + tests/remap + tests/tlo + tests/g38.

@andypugh tagging you for the 2.9 sign-off. This adds parameters on the stable branch, if what landed yesterday was ok, this is better IMO.

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

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().
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