Skip to content

docs: G38 probe to machine-coordinate conversion via #5401-#5409#4163

Merged
andypugh merged 1 commit into
LinuxCNC:masterfrom
grandixximo:docs/g38-machine-coords
Jun 14, 2026
Merged

docs: G38 probe to machine-coordinate conversion via #5401-#5409#4163
andypugh merged 1 commit into
LinuxCNC:masterfrom
grandixximo:docs/g38-machine-coords

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

Documents the official way to recover the absolute machine coordinate of a probe from the result parameters #5061-#5069.

Since #3996, #5401-#5409 report the tool length offset actually applied to motion (set by the G43 family, zeroed by G49). That makes the probe-to-machine conversion reliable whether or not a tool offset is active, so it no longer requires cancelling the offset with G49 first as the existing G38.2 example does.

Added under the G38._n_ straight probe section:

G38.2 Z-100 F100
#<zmachine> = [#5063 + #[5203 + #5220 * 20] + #5213 * #5210 + #5403]

Refs #4159

Document the official way to recover the absolute machine coordinate of
a probe from #5061-#5069. Since LinuxCNC#3996, #5401-#5409 report the applied
tool length offset, so the conversion works with or without an active
tool offset and does not require cancelling it with G49 first.

Refs LinuxCNC#4159
Comment thread docs/src/gcode/g-code.adoc
@andypugh andypugh merged commit 1ed052d into LinuxCNC:master Jun 14, 2026
16 checks passed
@c-morley

Copy link
Copy Markdown
Collaborator

Would if be possible to add a parameter that automatically calculates this anytime obe of the variables changes?

@grandixximo

grandixximo commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Other controllers expose the current point in two frames and subtract...

We already have the work-frame set in #5420-#5428. We are only missing the machine-frame set.

I checked and #5021-#5029 are free and can be used for machine-frame set.

Implementation is small. #5420-#5428 are already filled each line from the work-frame position; the machine set fills the same block with current + tool_offset + g5x_offset + g92_offset per axis.

What it gives:

  • absolute machine position directly
  • total offset per axis as [#5021 - #5420] similar to other controllers
  • the machine-coordinate probe point as [#5061 + #5021 - #5420]

I'll look into it tomorrow...

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.

4 participants