Bed Self Leveling - bed.g to call M561 or not?



  • Good day all!

    I am building a CoreXY printer using a three independent Z motors to achieve auto leveling (self leveling) of the bed.
    I am running a DuetWifi and a Duex5.

    Here are my config.g related lines

    ; Drives Identification and rotation direction
    M569 P0 S0                                           ; Drive 0 Left Motor goes forwards
    M569 P1 S0                                           ; Drive 1 Right Motor goes forwards
    M569 P3 S1                                           ; Drive 3 Extruder motor goes backwards
    M569 P5 S0					     ; Drive 5 Zleft motor goes forward
    M569 P6 S0					     ; Drive 6 Zrear motor goes forward
    M569 P7 S0					     ; Drive 7 Zright motor goes forward
    
    ; Self Leveling configuration: (Needs to be posted before M350 microstepping)
    ; -Drive Selection 
    ; -Leadscrews position
    M584 X0 Y1 Z5:6:7 E3 				     ; Three Z motors connected to driver outputs 5, 6 and 7
    M671 X-25:160:355 Y-5:352:-5 S10	    	     ; leadscrews at front left, rear middle and front right
    

    and here is my entire bed.g

    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Sun Mar 17 2019 13:02:06 GMT-0400 (Eastern Daylight 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
    
    G28 				; Home
    G30 P0 X0 Y0 Z-99999 		; Probe near  Front Right leadscrew
    G30 P1 X0 Y310 Z-99999 		; PROBE POINT 2 Rear Left
    G30 P2 X130 Y310 Z-99999 	; Probe near Rear Middle leadscrew
    G30 P3 X290 Y310 Z-99999 	; PROBE POINT 4 Rear Right 
    G30 P4 X130 Y165 Z-99999 	; PROBE POINT 5 Center
    G30 P5 X130 Y0 Z-99999 		; PROBE POINT 6 Front Middle
    G30 P6 X290 Y0 Z-99999 S3 	; Probe near a leadscrew and calibrate the 3 motors to achieve self leveling
    G28				; Home
    

    Everything seams to be working fine as seen in this video:
    HevORT Z self leveling test

    Question #1

    As mentionned in the documentation, the bed.g should look like the uncommented portion of my here above code. I understand why the mecanical probe portion is disabled since i am using a BLtouch, but:

    Should I keep the M561 active to clear any bed transformation before probing my points?

    Thank you for your support! 🙂
    Olivier



  • I'm not sure it will matter since the act of doing the bed leveling will be replacing whatever transform is already present. But it wouldn't hurt to clear it first.


  • administrators

    You should always use either M561 or G29 S2 (they are equivalent) at or near the start of bed.g.

    If not using a bltouch and you are using a probe that needs to be deployed, you can use M401 before the group of G30 moves and M402 after it. That will deploy and retract the probe just once for the whole group, instead of once per probe point.



  • Thank you! I'll be placing a M561 at the beginning of my bed.g file 🙂



  • This post is deleted!

 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.