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

2x Z-axis motors home together then sync invididually - need input

Scheduled Pinned Locked Moved
General Discussion
4
11
2.5k
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.
  • undefined
    dintid
    last edited by 27 Sept 2017, 06:41

    Hello all,
    I need a bit of help here to sync up my z-axis motors.
    This is not a request for help to use autolevel function.

    I have read all about autolevel function in 1.19 firmware and much else, but havn't been able to find something I thought I could use. I'm not super good at figuring out ways to use Gcodes though, so here I am asking for help 🙂

    Current setup

    • I have 2 motors on z-axis.

    • They each have a driver

    • I have placed a limit-switch near each motor, which is triggered when they go to max

      • only one limit switch is in use right now untill I get this synching working

    What I need help doing:

    • I want my z-gantry to home to Z-max (rough homing)

    • I then want my 2 z-motors to sync up as they might get out of sync by manual manipulation or other forces

      • This step is what I need help doing! 🙂

    Afterwards

    • When motors are synced up at Z-max, I want them to go back to Z-min as they do now

    • I am mannually leveling my bed one-time

    • I am using a BLTouch to ensure correct distance between nozzle and plate as I change plates for different materials

    • I do not want any autocompensation feature setup (autolevel)

    RepRapFirmware supported G-codes: https://duet3d.com/wiki/G-code

    1 Reply Last reply Reply Quote 0
    • undefined
      dintid
      last edited by 27 Sept 2017, 12:39

      I have mapped my drives and am using the last 2 drivers and corrosponding endstops on the Duex5 for the Z motors.

      I guess It's something about homing the Z together.. then homing each of the motors seperately using virtual axes.. but it's this step I don't know how to do? 🙂

      RepRapFirmware supported G-codes: https://duet3d.com/wiki/G-code

      1 Reply Last reply Reply Quote 0
      • undefined
        dc42 administrators
        last edited by 27 Sept 2017, 18:27

        Autolevel is not the same as autocompensation, although many people mistakenly talk about autolevel when they really mean auto compensation.

        My advice is to Z home using a single homing switch, and then use the bltouch to autolevel the bed in a line between your two leadscrews, thereby correcting them if they get out of sync. You can do this by probing at two or more points. See https://duet3d.com/wiki/Bed_levelling_using_multiple_independent_Z_motors.

        But it's possible to use multiple Z homing switches if you really want to. In the Z homing sequence you need to use M584 to separate the Z motors into Z and U, home Z and U simultaneously, then use M584 again to assign them both to Z once more.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • undefined
          dintid
          last edited by 28 Sept 2017, 07:02

          I do NOT want to use BLTouch as neither autocompensation or autolevel - I wrote the very last line to ensure people understood that these options are not what I want. To avoid people focusing on it.

          I want to sync up my Z-motors before each print start
          Some firmware revisions back you wrote a code snippet you thought I might be able to use.. but I didn't want the hazzle as you said the upcoming firmware would support it naitively… it doesn't though, so now I need to do this virtual axis thing.

          I have reasigned my z motors to use the last 2 drivers on the Duex5 and they move just fine, but they seem to just keep using the old Z endstop.. ie, saying triggered all the same - I do not know how to make them use 2 different endstops?

          As I started out saying, I am really struggling with these Gcodes, so I really need some help contructing it, and all the people I've talked to are just as lost as I am, so please help here…
          This is a vital function for any printer using more than 1 motor for Z axis and doesn't rely on any form of autocompensation or other forms of autolevel.

          Config.g as is now
          This is what I have now, and it doesn't work. I have tried remapping the original Z to E, just to see if it made any difference, but it doesn't.

          Please do NOT focus on the BLTouch as I don't use it yet. I want to use this afterwards to just ensure distance between nozzle and bed - not autocompensate anything.

          [[language]]
          ; Endstops
          M574 X1 Y1 Z2 S1 ; 1=min end. 2=high end. S1=Normally Closed
          M558 P5 X0 Y0 Z1 H5 F120 T6000 ; Set Z probe type/mode 5, the axes for which it is used and the probe + travel speeds
          G31 P25 X-30 Y-5 Z1.5 ; Set BLTouch z probe trigger value, offset and trigger height.
          ; M557 X15:215 Y15:205 S20 ; Define mesh grid
          ; Define Drives
          ; Motor remapping for dual Z
          M584 X0 Y1 Z8:9 E3:4:5:6:7:2 ; Driver 0 For X, 1 for Y, Extruder 3-7, Z 8-9 + individually as UV
          ; Physical Drive conention
          M569 P0 S1 ; Drive 0 A
          M569 P1 S0 ; Drive 1 B
          M569 P2 S0 ; Drive 2 - Original Z - unused
          M569 P3 S0 ; Extruder0 - Physical Tool 0
          M569 P4 S0 ; Extruder1 - Physical Tool 1
          M569 P5 S0 ; Extruder2 - Physical Tool 2
          M569 P6 S0 ; Extruder3 - Physical Tool 3
          M569 P7 S0 ; Extruder4 - Physical Tool 4
          M569 P8 S0 ; Drive 8 - Left z-motor
          M569 P9 S0 ; Drive 9 - Right z-motor

          This Marlin run FT-5 shows what it is I want - except I home to Z-max
          I didn't know about this project when I first asked, but another user posted it yesterday:

          • This video shows nicely what I want to avoid https://www.youtube.com/watch?v=txZ5YuRMAzI&list=WL&index=7^

          • Marlin firmare supports this directly (project post) http://folgerforum.com/t/trouble-getting-dual-z-end-stops-dual-z-steppers-working/889

          RepRapFirmware supported G-codes: https://duet3d.com/wiki/G-code

          1 Reply Last reply Reply Quote 0
          • undefined
            dintid
            last edited by 28 Sept 2017, 07:21

            Redid some, but still no joy:

            [[language]]
            ; Motor remapping for dual Z
            M584 X0 Y1 Z8:9 U9 E3:4:5:6:7:2 ; Driver 0 For X, 1 for Y, Extruder 3-7, Z 8-9 + individually as Z+U
            ; Physical Drive conention
            M569 P0 S1 ; Drive 0 A
            M569 P1 S0 ; Drive 1 B
            M569 P2 S0 ; Drive 2 - Original Z - unused
            M569 P3 S0 ; Extruder0 - Physical Tool 0
            M569 P4 S0 ; Extruder1 - Physical Tool 1
            M569 P5 S0 ; Extruder2 - Physical Tool 2
            M569 P6 S0 ; Extruder3 - Physical Tool 3
            M569 P7 S0 ; Extruder4 - Physical Tool 4
            M569 P8 S0 ; Drive 8 - Left z-motor
            M569 P9 S0 ; Drive 9 - Right z-motor

            And homez.g

            [[language]]
            G91 ; relative mode
            M584 Z2 ; split Z into 2 (Z+U)
            G1 Z330 U330 F2000 S1 ; Move up to 330mm in the +Z direction, stopping if the homing switch is triggered
            G1 Z-2 U-2 F600 S0 ; move 2mm in the -Z direction - S2?
            G1 Z5 U5 F70 S1 ; move slowly 10mm in the +Z direction, stopping at the homing switch
            M584 Z8:9 ; join U to Z again - Driver 8+9
            G1 Z-5 F3000 ; move back again 5mm in the -Z direction
            G90 ; back to absolute mode

            RepRapFirmware supported G-codes: https://duet3d.com/wiki/G-code

            1 Reply Last reply Reply Quote 0
            • undefined
              strips
              last edited by 28 Sept 2017, 08:01

              Take a look here: https://forum.e3d-online.com/index.php?threads/bigbox-dual-optical-z-max-endstops.2675

              I have implemented what I think you are asking about.

              I have optical end stops near Z1 max and Z2 max but the kind of switches should not matter.

              I have not yet enabled leveling of Z1 and Z2 by IR-probe.

              Ender 5 Plus, E3D Bigbox Dual

              1 Reply Last reply Reply Quote 0
              • undefined
                dintid
                last edited by 28 Sept 2017, 10:58

                @strips:

                Take a look here: https://forum.e3d-online.com/index.php?threads/bigbox-dual-optical-z-max-endstops.2675

                I have implemented what I think you are asking about.

                I have optical end stops near Z1 max and Z2 max but the kind of switches should not matter.

                I have not yet enabled leveling of Z1 and Z2 by IR-probe.

                Thanks 🙂 I actually found yours yesterday and I can verify that I have exact same setup.. except mine are connected on the Duex5, so I have come to belive its a matter of firmware not being able to remap the Z endstop somewhere else. (can someone confirm this?)

                I have rewired my machine but havn't tested yet, as I'm in the process of figuring out wheter I can use 1 shared + wire up to 2 independently controlled fans (heatsink and object fan) as I'm 1pin short on my connector, but not sure I can, as I measure 0,4 ohm between them, and - is not shared.

                RepRapFirmware supported G-codes: https://duet3d.com/wiki/G-code

                1 Reply Last reply Reply Quote 0
                • undefined
                  dintid
                  last edited by 28 Sept 2017, 11:19

                  @strips:

                  Take a look here: https://forum.e3d-online.com/index.php?threads/bigbox-dual-optical-z-max-endstops.2675

                  I have implemented what I think you are asking about.

                  I have optical end stops near Z1 max and Z2 max but the kind of switches should not matter.

                  I have not yet enabled leveling of Z1 and Z2 by IR-probe.

                  I have this now, but can't test untill a bit later, as I had begun soldering on some new nice Aviation plugs 🙂

                  [[language]]
                  ; Define Drives
                  ; Motor remapping for dual Z
                  M584 X0 Y1 Z2:3 U3 E5:6:7:8:9 ; Driver 0 For X, 1 for Y, Z=2:3 U=3, Extruder 5-9
                  ; Physical Drive conention
                  M569 P0 S1 ; Drive 0 A
                  M569 P1 S0 ; Drive 1 B
                  M569 P2 S0 ; Left z-motor (original Z)
                  M569 P3 S0 ; Right z-motor (Ex0)
                  ; M569 P4 S0 ; EX1 - unused
                  M569 P5 S0 ; Extruder0 - Physical Tool 0
                  M569 P6 S0 ; Extruder1 - Physical Tool 1
                  M569 P7 S0 ; Extruder2 - Physical Tool 2
                  M569 P8 S0 ; Extruder3 - Physical Tool 3
                  M569 P9 S0 ; Extruder4 - Physical Tool 4
                  ; Configure Drives
                  M350 X16 Y16 Z16:16 U16 E16:16:16:16:16 I1 ; Configure microstepping with interpolation
                  M92 X160 Y160 Z800:800 U800 ; Steps per mm for XY and Z1:2 +U
                  M92 E1025:1025:1025:1025:1025 ; Set steps per mm for 5x physical Extruders
                  M566 X900 Y900 Z12:12 U12 E120:120:120:120:120 ; Maximum instantaneous speed changes (mm/min)
                  M203 X12000 Y12000 Z1000:1000 U1000 E3000:3000:3000:3000:3000 ; Maximum speeds (mm/min)
                  M201 X500 Y500 Z250:250 U250 E250:250:250:250:250 ; Accelerations (mm/s^2)
                  M906 X1000 Y1000 Z800:800 U800 I0 ; Motor currents (mA) and motor idle factor % for XYZ
                  M906 E1000:1000:1000:1000:1000 I50 ; Motor currents (mA) and ide factor % for Extruder motors
                  M84 S30 ; Set idle timeout
                  ; Endstops
                  M574 X1 Y1 Z2 U2 S1 ; 1=min end. 2=high end. S1=Normally Closed

                  RepRapFirmware supported G-codes: https://duet3d.com/wiki/G-code

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    Martin_S
                    last edited by 29 Sept 2017, 17:16

                    Hi Morten, best of luck with this setup.
                    Let us know if you made any progress.

                    Subscribed, I'm also interested.

                    If it ain't broke, fix it till it is =)

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      dintid
                      last edited by 30 Sept 2017, 11:15

                      @Martin_S:

                      Hi Morten, best of luck with this setup.
                      Let us know if you made any progress.

                      Subscribed, I'm also interested.

                      Thanks. I found this post where he did the exact same thing I wanted to do https://forum.e3d-online.com/index.php?threads/bigbox-dual-optical-z-max-endstops.2675/#post-29578

                      I have tried setting it up but for some reason I can't get the Z motor to run when doing the setup anymore, so need to figure out what's up. Just havn't had time to do so.
                      Tried switching motors around and confirmed it wasn't wires or motor.. sure hope it isn't the driver, but I can't see any reason why it should suddenly have died on me as I always remove all power when redoing wires… so I guess it's my config, but can't seem to find the error.

                      RepRapFirmware supported G-codes: https://duet3d.com/wiki/G-code

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        dintid
                        last edited by 10 Jan 2017, 12:39 1 Oct 2017, 12:27

                        @Martin_S:

                        Hi Morten, best of luck with this setup.
                        Let us know if you made any progress.

                        Subscribed, I'm also interested.

                        Wahh, found out what was wrong.. AFTER I spend a day rewiring to move all Extruderst to the Duex5 and so had to solder in extensions to the wires etc…

                        As I had been using the Z driver to drive both motors at first, I had removed the jumpers back in january.. I thought nothing off it as Ramps doesn't populate the pins when not in use... and I hadn't noticed it either... untill I for the 100th time looked over the diagram to check up on drive numbers and noticed the "jumpers" written on the diagram if you only use 1 Z motor.

                        After I put in the jumpers everything works perfectly.
                        I am going to write a blogpost about it, but for now:

                        My Config.g and homez.g is as follows
                        Description:
                        My XY for CoreXY AB. All 5 extruders on Duex5 and the 2 Z-drivers on Z and Ex0
                        [h]Config.g[/h]

                        [[language]]
                        ; Define Drives
                        ; Physical Drive conention
                        M569 P0 S1 ; Drive 0 A
                        M569 P1 S0 ; Drive 1 B
                        M569 P2 S0 ; Left z-motor (original Z)
                        M569 P3 S0 ; Right z-motor (Ex0)
                        ; M569 P4 S0 ; EX1 - unused
                        M569 P5 S0 ; Extruder0 - Physical Tool 0
                        M569 P6 S0 ; Extruder1 - Physical Tool 1
                        M569 P7 S0 ; Extruder2 - Physical Tool 2
                        M569 P8 S0 ; Extruder3 - Physical Tool 3
                        M569 P9 S0 ; Extruder4 - Physical Tool 4
                        ; Motor remapping for dual Z
                        M584 X0 Y1 Z2:3 U3 E5:6:7:8:9 P3 ; Driver 0 For X, 1 for Y, Z=2:3 U=3, Extruder 5-9 - P3 is number of visible axes XYZ = U is hidden
                        ; Configure Drives
                        M350 X16 Y16 Z16:16 U16 E16:16:16:16:16 I1 ; Configure microstepping with interpolation
                        M92 X160 Y160 Z800:800 U800 ; Steps per mm for XY and Z2:3 +U3
                        M92 E1025:1025:1025:1025:1025 ; Set steps per mm for 5x physical Extruders
                        M566 X900 Y900 Z12:12 U12 E120:120:120:120:120 ; Maximum instantaneous speed changes (mm/min)
                        M203 X12000 Y12000 Z1000:1000 U1000 E3000:3000:3000:3000:3000 ; Maximum speeds (mm/min)
                        M201 X500 Y500 Z250:250 U250 E250:250:250:250:250 ; Accelerations (mm/s^2)
                        M906 X1000 Y1000 Z800:800 U800 I0 ; Motor currents (mA) and motor idle factor % for XYZ
                        M906 E1000:1000:1000:1000:1000 I50 ; Motor currents (mA) and ide factor % for Extruder motors
                        M84 S30 ; Set idle timeout

                        [h]Homez.g[/h]

                        [[language]]
                        G91 ; Relative mode
                        M584 Z2 ; Split Z into 2 (Z+U)
                        G1 Z250 U250 F2000 S1 ; Move up to 250mm in the +Z direction. Stop if endstop is triggered
                        G1 Z-3 U-3 F600 S2 ; Move 2mm in the -Z direction - S2 = If containing axis letters: offset will be added to the pause coordinates
                        G1 Z3 U3 F100 S1 ; Move slowly 5mm in the +Z direction, stopping at the homing switch
                        M584 Z2:3 ; Join U to Z again - Driver 8+9
                        G1 Z-5 F3000 ; Move back again 5mm in the -Z direction
                        G90 ; Back to absolute mode

                        Huge thanks to Stian Indal for paving the way with his original post over on the E3D-online forum
                        https://forum.e3d-online.com/index.php?threads/bigbox-dual-optical-z-max-endstops.2675/#post-29578

                        RepRapFirmware supported G-codes: https://duet3d.com/wiki/G-code

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