Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Independent control of single Z axis motor in multi-Z setup

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    2
    3
    187
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jhalewoodundefined
      jhalewood
      last edited by jhalewood

      Hi,

      From looking around, I don't believe it's possible for a user to control a single Z motor when you have multiple independent motors (i.e. in this setup https://docs.duet3d.com/User_manual/Connecting_hardware/Z_probe_auto_levelling).

      Though obviously the firmware can control the motors independently after a G32 command (after it completes, it will adjust each motor a different amount) - so maybe there is a way already?

      Every now and then, due to user error, physical manipulation etc the Z motors can become massively misaligned - more than "true bed levelling" can fix.

      I was wondering if the following macro was a viable solution, or would cause problems?

      I.e.: remap Z axis to a single motor, I've included M906 and M350 because the dictionary says these must come after M584 (is this necessary? my config.g has already loaded these on initial boot, and the values aren't changing), move the single motor, then reset the config back to what it was.

      M584 Z3
      M906 Z1500
      M350 Z32
      
      G91
      G1 F600 Z1
      
      M584 Z3:4:5
      M906 Z1500
      M350 Z32
      

      I would have 6 of these macros, singling out each motor and having an up and down for each. I would use them to grossly level the bed, then use G32 to finish fine tuning.

      I just want to make sure changing the motor assignment on the fly won't cause problems/damage the board? Or, if there is a better solution?

      Thanks

      droftartsundefined 1 Reply Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @jhalewood
        last edited by

        @jhalewood It's also possible to increase the distance that counts as a failure for 'true bed levelling', by increasing the M671 S parameter. But assuming the Z motors are moving so far that it risks a crash, I can see why you would want to do the initial levelling manually. You could alternatively home to endstops on each motor, or use stall homing, at the other end of the Z axis travel to level the bed. This has the advantage that, in the event of a power failure during printing, you can home the printer and continue the print.

        The way you suggest manually adjusting the bed should work fine. I did a quick test, and axes recombine correctly. You probably don't need the M906 and M350 commands, as it will use the existing Z axis parameters. You will need to set an axis value with G92 (eg G92 Z0) or allow movements before homing (M564 H0 S0) or you won't be able to move the axes. Also set movement back to absolute with G90 after the move.

        So your macro would look like:

        M564 H0 S0  ;  allow axis movement without homing, and outside boundaries
        M584 Z3     ; redefine Z axis to just one motor
        
        G91         ; relative movement
        G1 F600 Z1  ; move
        G90         ; absolute movement
        
        M584 Z3:4:5 ; recombine axes
        M564 H1 S1  ; limit movement
        

        Hope that helps.

        Ian

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

        jhalewoodundefined 1 Reply Last reply Reply Quote 0
        • jhalewoodundefined
          jhalewood @droftarts
          last edited by

          @droftarts Thank you so much Ian. Really appreciate that detailed input!

          You are correct about the crash, occasionally it can get so bad that even with increasing M671 S parameter, it'll crash.

          I wasn't sure about including the M906 and M350 commands, I only included because the gcode dictionary says

          M584 must come earlier in config.g than any M350 and M906 commands.

          But it makes sense they're not needed as already declared originally in order.

          Thanks again Ian!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA