D3/RPi 3.2b1 issue with multi independent z-motors

  • I'm putting this in the beta category, but I'm really not sure if it's related to the beta.

    Note our Z is belt driven and has been calculated to X-85 and X424 and since it lifts both front and rear, we've defined Y and center to the build plate.

    I need some help here. I had this working perfectly - or at least I thought I did - and it's recently become completely inaccurate. I've isolated a routine into a macro that shows the issue.

    M558 K0 P9 C"20.io0.in" H3 F100 T12000 A5 R0.1 S0.01
    M671 X-85:424 Y132.4:132.4 S2
    G1 X132.4 Y132.4 F24000	 ; aligns BLTouch in center of build plate
    G30 Z-99999
    G30 P0 X0 Z-99999
    G30 P1 X260 Z-99999 S2
    M557 X14.5:265.5 Y14.5:265.5 S115.5
    G29 S0

    These are the relevant lines that are involved. If I run homez.g, the routine lifts the gantry to the top of the machine, levels it, and then everything is back square. However, running this macro multiple times in a row, without homing z, results in the following:


    What am I doing wrong? Or is this an issue with the beta? By the 3rd time I ran it, I could physically see the gantry out of square to the bed.. Thanks

  • Here is what it's doing. FIrst is running the macro after running homez.g to square the machine; second is after running the macro again (no homing z); and third is after running it again.. it is doubling the offset each time

    I would love to be corrected on some simple mistake here, but I can't find one. I may roll back to 3.1.1 on this machine if there isn't a simple solution.


  • this looks like the motors are in the wrong order.

    try swapping the z connectors on the duet.

  • administrators

    As @Veti says. The usual reason for repeated G32 corrections diverging is that the leadscrew coordinates specified in M671 are not in the same order as the corresponding Z motor drivers in M584.

  • @Veti @dc42 thanks! I'll try this right now.. I pray it's just my ignorance! SO MUCH TO LEARN.. but we are getting there!

  • Thank you both for the assistance! I was not aware these coordinates were in a specific order.. but that does make sense. However, I now know how this was introduced as this is the machine I recently rewired to put in the enclosure I've posted photos of.


    M671 X-85:424 Y132.4:132.4 S2


    M671 X424:-85 Y132.4:132.4 S2

    Corrected the issue!

    For those following along or find this later down the road, I decided to fix this by flipping the order of the z-motors in my config's M584 instead of flipping the order in the M671 as shown above.

Log in to reply