Manual Mesh Leveling.

  • Hi,

    I can't seem to figure out how to get the machine to run a multi-point manual mesh leveling like you can do with marlin.

    Whatever I do it always seems to run automatically and either crashes the head, or just pretends it has been triggered.

    This is my bed.g code…
    [c]; bed.g
    ; called to perform automatic bed compensation via G32
    ; generated by RepRapFirmware Configuration Tool on Fri May 12 2017 11:12:14 GMT+0100 (GMT Daylight Time)

    ; Clear any bed transform

    ; Home all axes

    ; Probe the bed at 5 points
    G30 P0 X25 Y25 H0 Z-99999
    G30 P1 X25 Y265 H0 Z-99999
    G30 P2 X175 Y265 H0 Z-99999
    G30 P3 X175 Y25 H0 Z-99999
    G30 P4 X100 Y100 H0 Z-99999 S[/c]

    extract from config.g
    [c]; Endstops
    M574 X2 Y2 Z2 S1 ; Define active high microswitches
    M558 P0 X0 Y0 Z0.5 H5 F120 T5000 ;
    G31 P600 X0 Y0 Z186 ; Set Z probe trigger value, offset and trigger height

    ; Mesh Leveling Grid
    M557 X25:175 Y25:265 S30

    All axis home to their MAX value. There is no probe on the hotend and only an endstop on Z+. From my understanding of things I should be able to manually jog the bed up and down to get the right numbers at each of the points. What am I missing?

  • administrators

    To use manual bed compensation, you have to measure the height error at each compensation point, and put that figure into the Z parameter of the corresponding G30 command. The Z-99999 value is what tells is to probe for the height error.

  • Is there no method to manually probe by jogging the bed up and down to get the value for each point?

  • administrators


    Is there no method to manually probe by jogging the bed up and down to get the value for each point?

    No. Almost everyone has a Z probe these days, and those that don't have mechanical bed levelling adjustment so that they can get the bed level without any need for compensation. If you think it is an important feature, please check that whether it is already on the firmware wish list at and add it if it isn't.

  • I now interested in this too. Have tried enough of the probes.
    DC42 inconsistent due to .5 PEI
    Precision piezo - fiddly to install and reliability is very dependent on the design and mounting.
    Induction probe - too low trigger height on aluminium with thicker PEI.
    Would be great to just go around the bed and measure the amount of points and be done with that.
    I have solid bed so there will be no changes i think

  • administrators

    You can do this since firmware 1.19, by setting probe type 0 (P0) in the M558 command and configuring a mesh for G29 or a bed.g file for G32 in the usual way. If using PanelDue as the user interface, install the latest release candidate firmware on it.

  • Moderator

    Hi @dc42

    I am not sure if I get this correctly.

    Background: I am currently using an Anet A8 with its stock board and Marlin 1.1.8.
    I have no Z-Probe and explicitly chose to not use one. What I currently do is to coarsely level my bed using the adjustment screws and moving the head to various points over the bed and then use Marlins Mesh Bed Leveling Assistant to probe 9 points on the bed and for each I will move the nozzle up/down to adjust the correct distance between bed and nozzle at this point. This will then result in adjustments of the Z-Axis while printing.

    I am now looking into replacing the stock mainboard by a Duet Wifi (I started with an all-low-end printer and now am upgrading step-by-step) and having this kind of semi-automatic leveling-compensation is a must for me. So can you please confirm that I can to the above with RRF because from the documentation at it does not look to me like that. I want to minimize using my adjustment screws and move the compensation mainly to software.

    Best regards

  • You can still use a microswitch for a z-probe. Here's mine mounted beside the E3D V6. I could reduce the offset a little more by having it between the fan duct and the bracket, but alas this idea came after design and print!

    I've a bracket that includes a bolt that drops down lower than the head and I just screw it on when I need to probe for bed level. The exact z-offset isn't precise but I always follow the bed level check with a nozzle height check with a bit of paper and use "G10 P0 T0 Z[offset value]" to correct for tool to probe offset inaccuracies. Only probelm I get is occasionally setting the G10 offset too low or high.


    Edit: It's a work in progress. Could tuck the extruder a little closer to the beam, reduce the width of the carriage, and convert to a three wheel system to name a few pending mods.

    Edit 2: Tidying wiring is an urgent job but pending rewire of machine would render that work obsolete...

  • Moderator

    @doctrucker said in Manual Mesh Leveling.:

    You can still use a microswitch for a z-probe.

    Thanks for the suggestion but that is not what I want to do.
    I want my Z-endstop microswitch fixed to the frame and triggered when the gantry lowers to around Z=0. At this point I would then start to adjust the bed manually with the adjustment screws with bed and hotend cold using a sheet of paper and manually moving the head/bed around to get a good initial leveling.
    After this process is finished, I heat up both bed and hotend to regular operating temperature and start fine-leveling by initiating Marlin's Mesh Bed Leveling. This will move the head to nine points and let's me adjust Z-height via a menu in definable increments (currently set to 0.02mm) until I am satisfied with the bed-nozzle-distance of this exact point. Then it will move to the next point and so on until all nine points are adjusted. It will then convert this into a software compensation to adjust Z-height while printing just as any automatic bed-leveling does as well - just not having a Z-probe that finds the required distance automatically (I would not mind doing this via GCODE commands instead of using an on-screen menu, though).

    All I want to know is, if I can achieve something like this with RRF or not. Or if there is another approach I could take given the hardware setup is fixed as described.

    Best regards

  • Didn't spot this was a recent dig up of an old thread. Just flash read it and saw one contributor compaining about various probes without listing the microswitch method. My bad.

  • Moderator

    @doctrucker Yeah, sorry for digging up old threads anyway. I just want this sorted out before I make such in investment in a new board just to find out that I can no longer have my workflow (that works great for me) and also have to further change my hardware setup - and since I would have to change all my connectors to use the Duet Wifi simply returning it then would also be no easy task.
    @dc42 said that this would work now but the documentation is either lacking on describing this specific use-case or I misunderstood something here.

  • administrators

    @wilriker, good point, using P0 in the M558 command needs to be documented.

  • administrators

    I have updated the pages on mesh bed compensation and Z probe configuration to cover the case of no Z probe.

  • Moderator

    Thank you very much! The updated documentation also answers my question whether or not a PanelDue is required (it's not).

    I ordered my Duet Wifi today. 🙂

Log in to reply