3

I am using Marlin to control a PCB mill and figured this was the best place to ask.

I need to be able to level only a portion of the bed that is chosen at runtime. This is because I need to use a conductivity probe (i.e. the tip of the bit) and there's no certainty that the whole copper board is conductive (If part of it has already been milled out).

I know in configuration_adv.h there is the option to specify constants (MESH_MIN_X e.t.c) but I do not want to recompile and reupload the firmware every time I want to use the mill.

I was hoping there was either a macro I could use even if I had to send the G-Code for each specific point I wanted to level (I haven't figured out a way to do this) or modify the firmware to accept a command like

G29 J4 X30.70 Y50.80

Where the number after the decimal point (of X & Y) specifies the max position and the whole number specifies the minimum position.

If the latter was the only possible method I was hoping to be directed on how I would modify the firmware to accept new variations of G-code.

agarza
  • 1,734
  • 2
  • 16
  • 33
glassGlobe
  • 123
  • 5

1 Answers1

1

The Prusa printers can do this, based on the maximum and minimum values of X and Y the G-code of the sliced object; M555 will set the bounds of the probing area. However, you need a Prusa printer and use PrusaSlicer. This is a feature in Prusa's custom firmware.

Note that you can do this as well in Marlin firmware printers, but a little differently, this only works for Bilinear Levelling only.

See e.g. the manual entry for G29 - Bed Leveling (Bilinear) where G29 Fxxx Bxxx Lxxx Rxxx describe the area to probe.

Meanwhile, with ABL Bilinear there is already G29 F B L R to choose the probing area, although it always probes the same number of points (which keeps the planner code simpler).

Reference: @thinkyhead

0scar
  • 37,708
  • 12
  • 68
  • 156