manual bed levelling assistant



  • Hi,

    could the code here https://duet3d.dozuki.com/Wiki/Using_the_manual_bed_levelling_assistant
    be updated to something like this(?):

    For RRF>=3.x with conditional g-code
    For a cartesian printer with x,y&z (with x&y horizontal, z vertical)
    Points in clockwise order

    File config.g:

    ;for 3-point levelling for a heatplate with 200x200, with offset of 10mm as distance absolute border all around, with 3rd screw in the back of the user in the middle:
    ;e.g. clockwise order: point1 (0+10,0+10), point2 ((0+200)/2, 200-10), point3 (200-10,0+10)
    ;M671 X{(move.axes[0].min+10}:{(move.axes[0].min+move.axes[0].max)/2}:{(move.axes[0].max-10} Y {move.axes[1].min+10}:{move.axes[1].max-10}:{move.axes[1].min+10} P0.5 ; P=Pitch of levelling screws
    
    

    File bed.g:

    G53 ;Use machine coordinates
    ; If the printer hasn't been homed, home it
    if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed
      G28					; home printer
    M400 					; finishes all current moves and and thus clears the buffer
    G90 ; set to Absolute Positioning
    M561 ; clear any bed transform
    ;M401 ; deploy Z probe (-> if you defined it in config.g - comment if defined M558 P0 in config.g for no probe installed)
    G30 P0 x{move.axes[0].min+10} y{move.axes[1].min+10} Z-99999 ; probe near an adjusting screw
    G30 P1 X{(move.axes[0].min+move.axes[0].max)/2} Y{move.axes[1].max-10} Z-99999 ;probe near an adjusting screw
    G30 P2 x{move.axes[0].max-10} y{move.axes[1].min+10} Z-99999 S3 ;probe near an adjusting screw and report adjustments needed for S_ points
    ;M402 ; retract probe (-> if you defined it in config.g - comment if defined M558 P0 in config.g for no probe installed)
    

    ? 🙄

    Edit: had some minor bugs in it but seems to work now 🙂
    M292

    Sadly this was promted via console

    Warning: 3/4-point bed compensation is deprecated and will be removed in a future firmware release. Please use G29 mesh bed compensation instead.
    Bed equation fits points [10.0, 10.0, -0.000] [110.0, 210.0, -0.000] [210.0, 10.0, -0.000]
    

    (Sad for those people that do not need a z-probe because they are fine without... -> Please keep this way of single-point-probing with only 3/4 points -> Or can I still manually probe within G29 (without a probe deployed and the offset between probe points so big like they are on a 4-screw bed e.g. from 10 to 190 with a 180mm jump distance which would equal to the same?) But still that leaves the question how to set that up for a 3-screw (single-point manual) plate with G29 then? Hmmm)

    +1 to keep it as long as possible please! auto-z-probe adds another piece of cost/hardware-weight/wiring&potential-code-issues which some people like me just seem to not need...



  • The warning about being deprecated says to use G29 instead.

    With G29 you can do 4 points without any problem.

    Question: Given that your hardware is not going to be changing frequently (if at all) why bother with computing the points needed for M671 or G30?

    It certainly doesn't improve readability.

    Thanks.

    Frederick



  • @fcwilt said in manual bed levelling assistant:

    Yeah more of an exercise could be hard-coded. (But I guess it is ok to post it in an forum?)

    My understanding of G29 was that it is for meshbed-levelling (which I guess was invented for something automatic) but will look into it if it works also with manual levelling. Will test and see if it works also for manual

    I tried this in config.g and it seems to work:

    Z-Probe:
    M558 P0 H5 F120 T6000                              ; disable Z probe but set dive height, probe speed and travel speed
    
    ;For G29:
    ; define mesh grid (with G29 later for actual probing)
    M557 X15:195 Y15:195 S180                           ; define mesh grid with G29 for probing
    

    So Mesh-bed-levelling understands that it is an manual levelling and goes to all corners!

    Edit: Fun-fact I tried it also with the new conditional g-code and it works also:

    Z-Probe:
    M558 P0 H5 F120 T6000                              ; disable Z probe but set dive height, probe speed and travel speed
    
    ;For G29:
    ; define mesh grid (with G29 later for actual probing)
    M557 X{move.axes[0].min+15}:{move.axes[0].max-15} Y{move.axes[1].min+15}:{move.axes[1].max-15} P2:2) ; define mesh grid with G29 for probing, see M208 before this for platesize	
    

    (The only single-use-case was a plate with 3 screws as originally posted - or is it possible with circle-probing 3 points? Will try that next I guess)



  • @LB said in manual bed levelling assistant:

    @fcwilt said in manual bed levelling assistant:

    Yeah more of an exercise could be hard-coded. (But I guess it is ok to post it in an forum?)

    My understanding of G29 was that it is for meshbed-levelling (which I guess was invented for something automatic) but will look into it if it works also with manual levelling. Will test and see if it works also for manual

    Mesh Bed Compensation (MBC) is intended to compensate for irregularities in the surface of the bed. As a result it also compensates for a bed that is not level BUT it is better to level the bed as best as you can and then rely on MBC Just to deal with bed surface irregularities.

    To help level the bed the firmware provides the Manual Bed Leveling Assistant (MBLA) and Auto Bed Leveling (ABL).

    MBLA relies on your printer having adjustment screws of some sort that you can turn by hand to level the bed. Like MBC, it probes the bed but the result is information on how much to turn each adjustment screw to level the bed. It normally takes me several iterations to get the bed truly level.

    ABL relies on your printer having multiple Z axis steppers that the firmware can use to level the bed. Again, like MBC and MBLA, it probes the bed but the result is stepper movement that works to level the bed. Sometimes it can take more than one iteration to get the best result.

    MBC and MBLA/ABL work together to improve the performance of your printer.

    I recently modified one of my printers with 3 Z axis steppers so I could try using ABL. It works great and I'm glad I took the time to modify the printer.

    Frederick



  • @fcwilt said in manual bed levelling assistant:

    Mesh Bed Compensation (MBC) is intended to compensate for irregularities in the surface of the bed. As a result it also compensates for a bed that is not level BUT it is better to level the bed as best as you can and then rely to deal with bed surface irregularities.
    To help level the bed the firmware provides the Manual Bed Leveling Assistant (MBLA) and Auto Bed Leveling (ABL).
    MBLA relies on your printer having adjustment screws of some sort that you can turn by hand to level the bed. Like MBC, it probes the bed but the result is information on how much to turn each adjustment screw to level the bed. It normally takes me several iterations to get the bed truly level.
    ABL relies on your printer having multiple Z axis steppers that the firmware can use to level the bed. Again, like MBC and MBLA, it probes the bed but the result is stepper movement that works to level the bed. Sometimes it can take more than one iteration to get the best result.
    MBC and MBLA/ABL work together to improve the performance of your printer.
    I recently modified one of my printers with 3 Z axis steppers so I could try using ABL. It works great and I'm glad I took the time to modify the printer.
    Frederick

    This is the best explanation so far for me. Thanks! At least 1 good thing this post then had: Your explanation and the method to go for in the future should be put into this website maybe (e.g. to avoid having other users like me find it and think it is "up to date" and post here in the forum): https://duet3d.dozuki.com/Wiki/Using_the_manual_bed_levelling_assistant


  • Moderator

    @fcwilt I've adapted your reply as part of an introduction to the MBL page.



  • @Phaedrux said in manual bed levelling assistant:

    @fcwilt I've adapted your reply as part of an introduction to the MBL page.

    I read it - great!

    @fcwilt
    @Phaedrux

    Maybe someone should also add on the same page, that from RRF>=___ it is recommended to use M557 (after M208 if used with conditional-g-code) with G29

    e.g. in my case for a cartesian:

    in config.g something like

    M557 X{move.axes[0].min+15}:{move.axes[0].max-15} Y{move.axes[1].min+15}:{move.axes[1].max-15} P2:2) ; define mesh grid with G29 for probing, in this case for a manual levelling with 4 screws with 15mm offset from the heatplate
    

    in bed.g something like

    
    
    G53 ;Use machine coordinates
    ; If the printer hasn't been homed, home it
    if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed
      G28					; home printer
    M400 					; finishes all current moves and and thus clears the buffer
    G90 ; set to Absolute Positioning
    M561 ; clear any bed transform
    
    
    ;G29 (newer probing mode(s)) workflow:
    
    ;M401 				; deploy Z probe (-> if you defined it in config.g - comment if defined M558 P0 in config.g for no probe installed)
    G29  				; mesh bed probe (needs acrive z-probe via M558), if no S or S=0 -> probe the bed, save height map to /sys/heightmap.csv and enable compensation
    ;M402 				; retract probe (-> if you defined it in config.g - comment if defined M558 P0 in config.g for no probe installed)
    ;M376				; optional set bed compensation taper, define a height to taper off the compensation if needed
    

    (I do not know where these "{1}" come from seems the software running this site is adding them to code-snippets...)

    Good idea?


Log in to reply