CoreXY automatic leveling

  • Good Morning,

    I have built a Corexy type printer with three motors on the Z axis to do automatic leveling.

    I have also installed a limit switch for each Z axis, that is, three limit switches, one for each mortor, to establish a maximum height Z.

    When doing G32 the system does the leveling correctly.

    Is there any way of those correction values ​​that the G32 has generated to apply them after doing a homing Z?

    The idea is that after homing Z, the correction values ​​are applied and thus avoid performing the bed leveling several times, or starting from a more correct leveling.

    In the delta printer there is the command M666 to make the limit switch correction. What I did after leveling was to add the x, y, and z corrections to the M666 command in the config file, and so the next time I started the printer, after homing, the end of stroke correction was applied.

    How can this be applied to a Corexy with three limit switches, one for each Z axis motor?

    I don't know if I explained myself correctly since I'm using the translator.

    Duet 2 ethernet + Duex5
    firmware 2.05.1

    A greeting.

  • Moderator

    @adri84dj Can you post your config.g, homeall.g and homez.g? The important thing is how are you homing the bed at the moment. Do you split out the 3 Z motors to individual motors on Z, U and V axes, and home them individually?

    If so, you can find the offset you need relatively easily, by using 'G1 H3' for each individual Z motor.

    First, home Z, then level the bed using the Z probe. This will give the position you want at the end. Split the Z axis into three separate axes, Z, U and V, with one motor on each. Then send
    G1 H3 Z400 U400 V400. This moves each motor further than the full length of the axis. Make sure you do this slow enough to make the activation of the switch accurate.

    The motors should stop when they hit the microswitch, but the axis limit will not be reset; it will show the value it stopped at. The bed will not be level at the bottom if the microswitches aren't level, but the axes should report how far they have moved, eg Z300 U305 V310. So you should be able to put this into an M208 command for the Z, U and V axes, something like M208 Z300 U305 V310 S0

    When it comes to homing, split the Z into the three axes again, home them, then move them all up to the same point eg G1 Z250 U250 V250, before combining them back into Z.

    This is theoretical, but should work! It's an extension of this:

    Let me know if you need more information, and how you get on.


  • @droftarts


    These are my files

    homez.g homeall.g config.g

  • Moderator

    Please also include your bed.g

  • I have a corexy with 4 motors and did the same thing with another method. My bed is stationary but it is the same concept.

    Probe the bed, check the differents z offset per axis.

    In my home z, i have:
    Split the different z axis
    Home all axis.
    Lower the frame at 10mm
    Move every axis with your mesured zoffset
    Join all axis in your z.

    I even removed my z probe. This method works for me. There's probably a better way, but was not able to find it

    I can show you my homez if you want

  • Yes, please! homez.g that is.

  • ; homez.g

    M906 X800.00 Y800.00 Z1600.00:1600.00:1600.00:1600.00 U1600.00 V1600.00 W1600.00 E500.00 I50

    M584 Z6 U7 V8 W9 P6 ; split Z,U,V,W

    M906 X800.00 Y800.00 Z1800.00:1800.00:1800.00:1800.00 U1800.00 V1800.00 W1800.00 E500.00 I50
    G4 P500
    G1 Z380 U380 V380 W380 F4000 S1 ; move up to 380mm in the +Z direction, stopping if the homing switch is triggered

    G1 Z-4 U-4 V-4 W-4 F1600 S2
    G1 Z10 F700 S1
    G4 P500
    G1 U10 F700 S1
    G4 P500
    G1 V10 F700 S1
    G4 P500
    G1 W10 F700 S1
    G4 P500
    G1 Z-4 U-4 V-4 W-4 F1600 S2
    G1 U0.1 F700
    G4 P500
    G1 V0.5 F700
    G4 P500
    G1 W2.4 F700
    G4 P500

    M584 Z6:7:8:9 P3 ; join U,v,w to Z again
    G1 Z-200 F3000 ; move back again 10mm in the -Z direction
    G90 ; back to absolute mode

    M906 X800.00 Y800.00 Z1600.00:1600.00:1600.00:1600.00 U1600.00 V1600.00 W1600.00 E500.00 I50

    Forget the g4, it's not useful.

Log in to reply