I previously set up my Ender 3 with a precompiled binary of Marlin that already had the correct X and Y offsets for the attached BLTouch. Now I'm compiling my own, and rather than measure for myself I'd like to just use the same numbers.

When I send M851 through the terminal, it gives me the current value for the probe's Z offset from the extruder. I know I can also use M851 to set the X and Y offset, but there doesn't seem to be a way to read the current values.

Is there any way to query the printer for the current values of X_PROBE_OFFSET_FROM_EXTRUDER and Y_PROBE_OFFSET_FROM_EXTRUDER? Or, ideally, for any other arbitrary variable?


"#define" is a feature of the compiler preprocessor and isn't a feature of Marlin. So there is no general way to recover the value of a "#define variable" (which isn't actually a variable at all) unless Marlin explicitly provides the option.

In the current version of Marlin M851 will report the X and Y offsets. It appears you have an older version which does not do this. In older versions there appears to be no option to recover the value.

  • $\begingroup$ Makes sense, thank you. $\endgroup$ – Robert Apr 26 '20 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.