Dual Z motor bed leveling



  • I'm building yet another machine. This one uses the mechanics of a Prusa i3 in an aluminum extrusion frame.

    When I run G32, I get the following error immediately after the probes to level the dual motors:

    "G32
    Error: Probe points P0 to P1 must be in clockwise order starting near X=0 Y=0"

    Here is my bed.g

    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    ; generated by RepRapFirmware Configuration Tool on Thu Jun 29 2017 21:34:03 GMT-0700 (MST)

    G28
    ;Testing
    M401 ; deploy Z probe
    G30 P0 X20 Y80 Z-99999 ; probe near a leadscrew
    G30 P1 X200 Y80 Z-99999 S2 ; probe near a leadscrew
    M402 ; retract probe
    ;Testing

    ; Clear any bed transform
    M561
    ;# Deployprobe.g
    M280 P3 S10 I1

    ;Run Mesh Grid Compensation
    G29

    ;#Retractprobe.g
    M280 P3 S90 I1

    What am I doing wrong?


  • administrators

    That message indicates that it isn't doing leadscrew bed levelling, it's executing the old code to to 3, 4 or 5-point bed compensation instead.

    What M584 and M671 commands do you have in config.g?



  • M584 X0 Y1 Z2:3 E4 P3 ; Dual Z Homing
    M671 X-67:328 S0.5 ; leadscrews offset for leveling

    In case it matters, I'm running v1.20 of the firmware.


  • administrators

    You need Y coordinates in the M671 command too. If you have only 2 leadscrews, use the midpoint of the Y axis, e.g. Y100:100.



  • OK. Thanks.



  • It works now but it tilted the bed by 2mm to one side. With a mostly level bed, it kept giving me errors about exceeding calculations. I kept having to increase the S value finally settling on S3.0 for it to not give an error. Then, the bed leveled itself but 2mm off to one side.



  • how are your Z motors connected?


  • administrators

    Check that your Z probe has the same trigger height at each of the two probe points. See https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe#Section_Calibrate_the_Z_probe_trigger_height for how to measure it.



  • I relevelled the bed manually by turning the leadscrews with the machine off and checked the Z probe trigger height and it was 2.4mm at all locations testes. I then ran a G32 and got this error.

    "G32
    Error: Some computed corrections exceed configured limit of 0.50mm: -2.039 -1.683"

    I am probing at X20 Y100 and X190 Y100

    The results of the mesh leveling were:

    Number of probe points: 25

    Probe area: 256.0 cm²

    Maximum deviations: -2.125 / -1.718 mm
    Mean error: -1.961 mm

    RMS error: 0.121 mm

    The heightmap is almost flat



  • @Dougal1957:

    how are your Z motors connected?

    Right motor in Drive 2 and the left in Drive 3. Jumpers in the second Z motor port.


  • administrators

    The main problem is that you have a large Z offset, both in the height map and in the bed leveling result. Looks like your Z=0 position after homing Z is off.


Log in to reply