I have to be missing something: Mesh bed leveling w/ BL Touch



  • I have to be missing something... I don't think that the mesh map ever gets used when I am doing my first bed level tests.

    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Thu Jan 03 2019 22:56:02 GMT-0600 (Central Standard Time)
    M561                ; clear any bed transform
    M98 Pdeployprobe.g  ; deploy mechanical Z probe
    G29                 ; probe the bed and enable compensation
    M98 Pretractprobe.g ; retract mechanical Z probe
    G29 S1              ; added because I read about it in Duet forum https://forum.duet3d.com/topic/4374/bed-mesh-compensation/5
    

    In my config.g

    ; Z-Probe
    M574 Z1 S2                                         ; Set endstops controlled by probe
    M307 H3 A-1 C-1 D-1                                ; Disable heater on PWM channel for BLTouch
    M558 P9 H5 F100 T2000                              ; Set Z probe type to bltouch and the dive height + speeds
    G31 P500 X39 Y-47 Z1.20                             ; Set Z probe trigger value, offset and trigger height
    M557 X45:405 Y50:370 S20                           ; Define mesh grid for gekotek
    ;M557 X45:420 Y20:430 S30                           ; Define mesh grid for buildplate
    G29 S1                                              ; Load the last bed mesh autocalibration
    

    I put a G29 S1 in both the homez.g and homeall.g. homez.g is below.

    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Thu Jan 03 2019 22:56:03 GMT-0600 (Central Standard Time)
    G29 S2            ; clear bed map
    G91               ; relative positioning
    G1 Z5 F6000 S2    ; lift Z relative to current position
    G90               ; absolute positioning
    G1 X210 Y215 F4000; go to first probe point
    G30               ; home Z by probing the bed
    G29 S1            ; Load the last bed mesh autocalibration
    


  • Hi,

    Well let's see...

    The M561 command has been superseded by G29 S2.

    But I don't think G29 S2 is needed there as I recall that it is not required prior to using G29 to probe and create the height map

    Executing the G29 command with no parameters is supposed to save the height map and enable compensation, unless there was a version of the firmware that failed to do that.

    I am using the most recent firmware and G29 does indeed create the height map file and enable compensation.

    According to the G29 documentation G28 must be executed before using G29. I do it right before just in case something has messed up the "homed" state of Z.

    There is no need to use G29 S1 in config.g since you have to home all before you can print anything and homing Z will enable mesh compensation, as you have G29 S1 in your homeZ.g file.

    In your homeZ.g file, before executing G30, you are positioning X,Y to 210,215 - where do those values come from?

    You actually don't need to use bed.g unless you simply want to use G32.

    You can invoke mesh bed compensation from DWC or you can create a macro. I use a macro.

    I put everything related to my Z probe into a macro file configprobe.g which allows me to make changes, as needed, without having to reboot the firmware.

    Frederick



  • I am on the most recent firmware also.

    @fcwilt said in I have to be missing something: Mesh bed leveling w/ BL Touch:

    In your homeZ.g file, before executing G30, you are positioning X,Y to 210,215 - where do those values come from?

    This is the center of my bed. I like to home z in the center.

    @fcwilt said in I have to be missing something: Mesh bed leveling w/ BL Touch:

    I put everything related to my Z probe into a macro file configprobe.g which allows me to make changes, as needed, without having to reboot the firmware.

    Would you mind sharing that macro?



  • I am also seeing where it is being saved in the G-Code Console. So I guess my question now is how do I get it to load that map without running the entire probe cycle.

    G32
    323 points probed, mean error -0.019, deviation 0.035
    Height map saved to file heightmap.csv



  • M375 or G29 S1



  • @xHOBOPHOBIAx said in I have to be missing something: Mesh bed leveling w/ BL Touch:

    I am also seeing where it is being saved in the G-Code Console. So I guess my question now is how do I get it to load that map without running the entire probe cycle.

    G32
    323 points probed, mean error -0.019, deviation 0.035
    Height map saved to file heightmap.csv

    The height map should be loaded at the point but perhaps invoking bed.g with G32 is doing something odd.

    As I mentioned, I think, I invoke mesh bed probing using a macro which basically does:

    • M98 P"configprobe.g"
    • G28 which invokes homeALL.g which in turn simply invokes: homeZ1.g homeX.g homeY.g homeZ2.g
    • G29 which does the "mesh" probing

    homeZ1.g does the "normal" homing of Z.
    homeZ2.g does the setting of the Z=0 datum using G30

    configprobe.g does basically what you are doing in config.g to setup the Z-probe.

    I'm out of town or I would just post the macro for you to examine.

    Frederick



  • So with that information it looks like the map is being created and loaded.

    Does anyone know how the z height is calculated if the print head goes to an area where the probe was not able to hit? That may be the issue.



  • @xHOBOPHOBIAx said in I have to be missing something: Mesh bed leveling w/ BL Touch:

    ... That may be the issue.

    I don't think you've said what you thought was the issue yet, and what sort of machine you are using?



  • @DocTrucker said in I have to be missing something: Mesh bed leveling w/ BL Touch:

    @xHOBOPHOBIAx said in I have to be missing something: Mesh bed leveling w/ BL Touch:

    ... That may be the issue.

    I don't think you've said what you thought was the issue yet, and what sort of machine you are using?

    Large coreXY printer. I am trying to print a small square at each corner and in the center to test bed level and mesh compensation. I home z with my BL Touch. I run the bed probing through the web interface. The front squares and the square in the middle of the bed have the same first layer where the two at the back of the bed are printing with the nozzle further from the bed.

    I tried a large square just in the center of the machine and it's first layer looks uniform. I am thinking the back two squares in my first test were printing over an area of the bed that wasn't probed because of my BL Touch offset and that could be the cause of the issue.



  • @xHOBOPHOBIAx said in I have to be missing something: Mesh bed leveling w/ BL Touch:

    Does anyone know how the z height is calculated if the print head goes to an area where the probe was not able to hit?

    Those areas will be interpolated.

    M98 Pdeployprobe.g ; deploy mechanical Z probe

    You should remove all the manual deploy and retract commands. The firmware will take care of deployment state.

    G31 P500

    Reduce your P500 to P25 to increase trigger sensitivity.

    G29 S1

    Best not to load the heightmap in config.g since you havent homed your printer yet. You should either move the G29 S1 to the end of your homeall.g or to the slicer start gcode after the Z axis has been homed.



  • @Phaedrux I'll try those things. Thanks.



  • I will keep testing, but I thing it is going like I am expecting now. I can feel the lead screws making small movements while printing so something is happening.


Log in to reply