Bed leveling with 2 independent Z motors
resam last edited by
As already discussed on Github: https://github.com/dc42/RepRapFirmware/issues/133
I'm running DuetWifi with FW 1.19.2 and a CoreXY setup.
I want to do bed leveling with G32 with two independent Z motors, and two leadscrews on the center-left & center-right of my bed.
I followed this guide: Wiki: https://duet3d.com/wiki/Bed_levelling_using_multiple_independent_Z_motors
[[language]] M584 X0 Y1 Z2:4 ; Drive mapping: 0=A, 1=B, 2 and 4 are individual Z steppers M671 X-52:296 Y142:142 S15 ; Define positions of Z leadscrews M667 S1
[[language]] M561 ; clear any existing bed transform G28 ; home G30 P0 X10 Y142 Z-99999 G30 P1 X230 Y142 Z-99999 S2 G28 Z ```This gives me: `Error: probe points P0 to P1 must be in clockwise order starting near X=0 Y=0`. I suppose there is some math trickery involved, so I change Y to be 1mm more:
M561 ; clear any existing bed transform
G28 ; home
G30 P0 X10 Y142 Z-99999
G30 P1 X230 Y143 Z-99999 S2
Ok, now I get this error: `Bed calibration error: 2 points provided but only 3, 4 and 5 supported` Which is weird, because why would I want to probe 3 points on my 2-leadscrew setup? As far as I can tell, there is no code for a 2-point calibration: [https://github.com/dc42/RepRapFirmware/blob/cfbe3562cc52de52bed88f7360f36b64a8049571/src/Movement/BedProbing/RandomProbePointSet.cpp#L89](https://github.com/dc42/RepRapFirmware/blob/cfbe3562cc52de52bed88f7360f36b64a8049571/src/Movement/BedProbing/RandomProbePointSet.cpp#L89) Just for the sake of completeness, I added a third point (back-center). Now I finally get a bed map and some offset information. But still no auto-correction. I think I want to somehow trigger this ([https://github.com/dc42/RepRapFirmware/blob/8dda9ff9fa096a9093d0c85c276c43f140267e0f/src/Movement/Move.cpp#L846](https://github.com/dc42/RepRapFirmware/blob/8dda9ff9fa096a9093d0c85c276c43f140267e0f/src/Movement/Move.cpp#L846)), but fail for unknown reasons. Thanks for the help!
I got that error when M671 was not set correctly in my config. You can enter M671 in the console to check that it is set correctly. That was on a cartesian not on a CoreXY though.
The M671 command needs to come after the M667 command. I'll add this to the documentation.
resam last edited by
Thanks! That did the trick!
Now my bed is leveling correctly.
It would be nice if such G-code inter-dependencies would raise an error or something to make users aware of potential problems.