LinuxCNC returns the results of a probe in the current WCS, which unfortunately is not consistent with most other controls. Even though LinuxCNC uses the same gcode (G38) and result parameters (#5061-5069) as Fanuc controls, Fanuc probes in machine coords, while LCNC probes in the current WCS. This has tripped me up more than once!
Several of the main devs and I discussed possible solutions, including adding parameters to LCNC for the probed pos in machine coords (seb has a branch where he started to implement this), or even changing the current behaviour to be fully compatible with Fanuc. The full discussion thread is in the dev mailing list. No additional progress has been made, and I don't expect any.
Workaround
A workaround I came up with was to make use of parameter indirection to get the offset of the currently active WCS and add the probed pos value to that to get the probed pos in ABS coords.
Calculate ABS z pos at which probe tripped:
Code:
#<abs_probed_z_pos> = #[5203 + [20 * #5220]] + #5063
If you need the probed post for other axes simply replace the x below with the axis number. (x = 1, y = 2, z = 3 ....)
Code:
#<abs_probed_pos> = #[520x + [20 * #5220]] + #506x
Cheers,
Kurt