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

    [3.01RC10+1][DSF 2.1.2] Individual Z motors don't stop together

    Scheduled Pinned Locked Moved
    Beta Firmware
    3
    8
    283
    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.
    • wilrikerundefined
      wilriker
      last edited by wilriker

      I have a setup with two Z steppers that have individual endstops. They home together, stop individually, then the right Z stepper is addressed as W alone to apply some correction (endstops are not 100% at same height) and then W is hidden again.

      Everything works as normal except for one scenario (that never happens while regular using):
      If I command Z axis to make a very long move (I think at least 200mm) at a commanded speed that exceeds the configured maximum speed then the right stepper will overshoot.

      config.g

      ; General preferences
      G90                                                ; Send absolute coordinates...
      M83                                                ; ...but relative extruder moves
      M555 P0                                            ; Set firmware compatibility to native RepRapFirmware
      ;M81                                                ; Make system aware of power control
      
      ; Network
      ;M550 P"duet3-6HC"                                  ; Set machine name
      
      ; Pin Definitions START -------------------------
      
      ; Temperature sensors for heaters
      M308 S0 P"0.temp0"  Y"thermistor" T100000 B4408 C7.269774e-8 H-7  ; Set thermistor + ADC parameters for bed heater      - from Kenoovo's R-T-Sheet for Marlin #13 25-50-100
      M308 S1 P"20.temp0" Y"thermistor" T100000 B4981 C1.635671e-7 H-9  ; Set thermistor + ADC parameters for hotend V6 clone - from Kenoovo's R-T-Sheet for Marlin #13 25-200-240
      
      ; Heaters
      M950 H0 C"0.out0" T0 Q50                           ; Bed heater
      M950 H1 C"20.out0" T1                              ; First hot-end
      
      ; Fans
      M950 F0 C"20.out1+out1.tach" Q10                   ; Fan 0 has a low PWM frequency of only 10Hz
      M950 F1 C"20.out2+out2.tach" Q25000                ; Fan 1 has a high PWM frequency of 25kHz
      ;M950 F2 C"!0.out6+0.out6.tach" Q25000              ; Fan 2 has a high PWM frequency of 25kHz and is inverted
      
      ; Pin Definitions END ---------------------------
      
      ; Drives START ----------------------------------
      ; Driver Assignments
      M584 X0.0 Y0.1 Z0.2:0.3 W0.3 E20.0                 ; Assign one driver X, Y and E and two to Z
      
      ; Driver settings
      M569 P0.0 S1                                       ; Drive X (0) goes forwards
      M569 P0.1 S0                                       ; Drive Y (1)  goes backwards
      M569 P0.2 S0                                       ; Drive Zl (2) goes backwards
      M569 P0.3 S0                                       ; Drive Zr (4) goes backwards
      M569 P20.0 S0                                      ; Drive E0 (20.0) goes backwards
      
      ; Stepping
      ; Set steps per mm (at default 16x microstepping)
      M92 X100
      M92 Y100
      M92 Z1600 ; Z1597.204294
      M92 W1600 ; W1597.204294
      M92 E450.7434
      M350 X16    Y16    Z16    W16    E16        I1     ; Configure microstepping with interpolation
      
      ; Max accel, speed, jerk
      M201 X12000  Y1800  Z100  W100  E5000              ; Set accelerations (mm/s^2)
      M203 X27000 Y27000 Z1500  W1500 E2600              ; Set maximum speeds (mm/min)
      M205 X15    Y12    Z0.5   W0.5  E30                ; Set maximum instantaneous speed changes (i.e. jerk) (mm/s)
      ;M204 P1000                                         ; Lower accelerations when printing though (mm/s^2)
      M593 F51.1247
      
      ; Currents
      M906 X1300  Y1300  Z1000  W1000 E600   I50         ; Set motor currents (mA) and motor idle factor in percent (increments of 50mA, rounded down otherwise)
      M84 S60                                            ; Set idle timeout
      
      ; stallGuard
      M915 X  S6  R1                                     ; Enable logging of stallGuard for X axes
      M915 Y  S5  R1                                     ; Enable logging of stallGuard for Y axes
      M915 Z  S3  R1                                     ; Enable logging of stallGuard for Z axes
      M915 P4 S4  R0                                     ; Enable logging of stallGuard for E axes
      ; Drives END ------------------------------------
      
      ; Axis Limits
      M208 X-14.7:225 Y-44:219 Z0:230 W0:230             ; Set axis coordinates - 0,0 front left
      
      ; Endstops
      M574 X1 S1 P"0.io6.in"                             ; Set active high endstop at low end on X
      M574 Y1 S1 P"0.io1.in"                             ; Set active high endstop at low end on Y
      M574 Z1 S1 P"0.io2.in+0.io3.in"                    ; Set active high endstop at low end on Z with two separate endstops
      M591 D0 P5 C"20.io1.in" A0 R40:120 E3.0 S0         ; Duet3D laser sensor for extruder drive 0 is connected to endstop input 3 (E0), tolerance 40 to 120%, 3mm comparison length
      
      ; Z-Probe
      M558 P0 H2 F120 T6000                              ; Disable Z probe but set dive height, probe speed and travel speed
      M557 X5:215 Y20:195 P6:6                           ; Define mesh grid
      M376 H10                                           ; Set bed compensation to taper off over 10mm
      
      ; Heaters and Temperatures START ----------------------------------
      
      ; Bed heater assignment
      M140 P0 H0                                         ; Assign heater 0 to the first bed
      
      ; Temperature limits
      M143 H0 S150                                       ; Set temperature limit for bed heater to 150C
      M143 H1 S290                                       ; Set temperature limit for hotend to 290C
      
      ; PID
      M307 H0 A256.1 C928.9 D1.0 S1.00 V23.6 B0          ; Use PID on bed heater - tuned@75°C@50Hz
      ;M307 H1 A576.0 C573.6 D15.7 S1.00 V23.7 B0         ; Use PID on hotend - tuned@210°C@250Hz
      M307 H1 A327.9 C158.3 D6.5  S1.00 V23.7 B0         ; Use PID on hotend - tuned@210°C@250Hz
      
      ; Additional sensors
      M308 S4               Y"mcutemp"     A"MCU"          ; MCU temperature
      M308 S5               Y"drivers"     A"TMC"          ; TMC driver over-temperature state
      M308 S8  P"0.spi.cs0" Y"dht22"       A"Amb. Temp"    ; DHT22 ambient temperature
      ;M308 S9  P"S8.1"      Y"dhthumidity" A"Amb. Hum[%]"  ; DHT22 ambient humidity - this sensor in DHT22 is defect
      M308 S10 P"0.spi.cs1" Y"dht22"       A"Fil. Temp"    ; DHT22 filament temperature
      M308 S11 P"S10.1"     Y"dhthumidity" A"Fil. Hum[%]"  ; DHT22 filament humidity
      
      ; CPU Temperature offset
      M912 P0 S-8
      ; Heaters and Temperatures END ------------------------------------
      
      ; Fans
      M106 P0 S0 H-1 C"Part Cooling Fan"                 ; Set fan 0 value. Thermostatic control is turned off
      M106 P1 S1 H1 T40 C"Hotend Fan"                    ; Set fan 1 value. Thermostatic control is turned on
      ;M106 P2 S0 H-1 C"Hardware Fan"                     ; Set fan 2 value. Thermostatic control is turned off
      
      ; Tools
      M563 P0 S"Hotend" D0 H1                            ; Define tool 0
      ;G10 P0 X-16.4 Y-44 Z0                              ; Set tool 0 axis offsets
      G10 P0 R0 S0                                       ; Set initial tool 0 active and standby temperatures to 0°C
      M563 P1 S"Hotend1" D0 H1                            ; Define tool 1
      ;M563 P2 S"Hotend2" D0 H1                            ; Define tool 2
      ;M563 P3 S"Hotend3" D0 H1                            ; Define tool 3
      ;M563 P4 S"Hotend4" D0 H1                            ; Define tool 4
      ;M563 P5 S"Hotend5" D0 H1                            ; Define tool 5
      ;M563 P6 S"Hotend6" D0 H1                            ; Define tool 6
      ;M563 P7 S"Hotend7" D0 H1                            ; Define tool 7
      ;M563 P8 S"Hotend8" D0 H1                            ; Define tool 8
      ;M563 P9 S"Hotend9" D0 H1                            ; Define tool 9
      ;M563 P10 S"Hotend10" D0 H1                            ; Define tool 10
      ;M563 P11 S"Hotend11" D0 H1                            ; Define tool 11
      ;M563 P12 S"Hotend13" D0 H1                            ; Define tool 12
      
      ; Automatic power saving
      M911 S21 R23 P"M913 X0 Y0 Z50 G91 M83 G1 Z3 E-1 F1000" ; Set voltage thresholds and actions to run on power loss
      
      ; Custom settings
      M671 X5.5:214.5:120 Y214.5:214.5:3.4 P0.5          ; Adjustment screws for bed, thread pitch 0.5mm
      M404 N1.75 D0.4	                                   ; Filament width and nozzle diameter - not really used by anything
      M207 S0.4 F6000 T2000 Z0.0                         ; Firmware retract settings (default)
      M572 D0 S0.07                                      ; Pressure advance
      
      ; Miscellaneous
      M584 P3                                            ; Hide additional axes
      ;T0                                                 ; Select first tool
      

      homez.g

      ; homez.g
      ; called to home the Z axis
      G91               ; relative positioning
      
      M400              ; Wait for all movements to finish
      M913 Z50          ; Reduce motor current
      
      G1 H1 Z-300 F900  ; move quickly to Z axis endstop and stop there (first pass)
      G1 Z1 F3000       ; go back a few mm
      G1 H1 Z-300 F180  ; move slowly to Z axis endstop once more (second pass)
      
      M584 P4           ; Enable W axis
      G1 H2 W0.34       ; Correction factor between the two endstop positions
      M584 P3           ; Disable W axis
      
      M400              ; Wait for all movements to finish
      G0 Z0.5           ; Endstops are below zero so lift to zero
      M913 Z100         ; Restore motor current
      
      G90               ; absolute positioning
      G92 Z0            ; Set Z=0
      

      Sequence of commands:

      • Home Z
      • G0 Z200 F1501 (top speed set at 1500mm/min)
      • or when at Z200: G0 Z0 F1501

      then the right stepper will overshoot a few mm.

      It works with all speeds up to 1500mm/min correctly and it works with shorter moves correctly.

      Manuel
      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
      with probably always latest firmware/DWC (incl. betas or self-compiled)
      My Tool Collection

      deckingmanundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • deckingmanundefined
        deckingman @wilriker
        last edited by deckingman

        @wilriker Long shot - is there any binding or friction on one of the Z screws? Maybe the effective torque is dropping more on one motor than the other at higher speeds so the left one is missing some steps that the right one isn't. Try not reducing the motor currents to 50% and see if that makes any difference.

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        wilrikerundefined 1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @wilriker
          last edited by dc42

          @wilriker said in [3.01RC10+1][DSF 2.1.2] Individual Z motors don't stop together:

          Sequence of commands:

          Home Z
          G0 Z200 F1501 (top speed set at 1500mm/min)
          or when at Z200: G0 Z0 F1501

          then the right stepper will overshoot a few mm.

          I'm suspicious of this bit:

          It works with all speeds up to 1500mm/min correctly and it works with shorter moves correctly.

          Are you absolutely certain? What happens if you increase the max Z (and W if you like) speeds to 1501 in the M203 command?

          Does reducing the Z acceleration in M201 make any difference?

          One other test please: before the 200mm long move, please send M584 P4, read off the Z and W coordinates, then send M583 P3 again. Then do the 200mm move. Then repeat the M584 commands to get the new W and Z coordinates. Check that the error has occurred, and report the old and new values here.

          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

          wilrikerundefined 1 Reply Last reply Reply Quote 0
          • wilrikerundefined
            wilriker @deckingman
            last edited by

            @deckingman Hey Ian, it does not appear while homing. And once it moved out of position near Z max it will rehome at 50% current without any problem. This clearly is not mechanical but firmware.

            Manuel
            Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
            with probably always latest firmware/DWC (incl. betas or self-compiled)
            My Tool Collection

            deckingmanundefined 1 Reply Last reply Reply Quote 0
            • wilrikerundefined
              wilriker @dc42
              last edited by wilriker

              @dc42 said in [3.01RC10+1][DSF 2.1.2] Individual Z motors don't stop together:

              @wilriker said in [3.01RC10+1][DSF 2.1.2] Individual Z motors don't stop together:
              I'm suspicious of this bit:

              It works with all speeds up to 1500mm/min correctly and it works with shorter moves correctly.

              Are you absolutely certain? What happens if you increase the max Z (and W if you like) speeds to 1501 in the M203 command?

              I have never been able to reproduce it with either shorter moves or speeds up to configured M203 value.
              I will try increasing M203 to 1501 and see if it still happens then.

              Does reducing the Z acceleration in M201 make any difference?

              One other test please: before the 200mm long move, please send M584 P4, read off the Z and W coordinates, then send M583 P3 again. Then do the 200mm move. Then repeat the M584 commands to get the new W and Z coordinates. Check that the error has occurred, and report the old and new values here.

              Will test all of that later and report back.

              Manuel
              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
              with probably always latest firmware/DWC (incl. betas or self-compiled)
              My Tool Collection

              1 Reply Last reply Reply Quote 0
              • deckingmanundefined
                deckingman @wilriker
                last edited by

                @wilriker said in [3.01RC10+1][DSF 2.1.2] Individual Z motors don't stop together:

                @deckingman Hey Ian, it does not appear while homing. And once it moved out of position near Z max it will rehome at 50% current without any problem. This clearly is not mechanical but firmware.

                Yes but if I read it right, you are homing at a slower speed and motor torque drops off at higher speed. That's why I was wondering if there is a bit of "stiction" which the motor is able to overcome at 900mm/min but not at 1500mm/min? Or maybe I'm still not reading what you are saying correctly.......

                Ian
                https://somei3deas.wordpress.com/
                https://www.youtube.com/@deckingman

                1 Reply Last reply Reply Quote 0
                • wilrikerundefined
                  wilriker
                  last edited by

                  What I forgot to mention: there is a chance with each stepper driver power-cycle for this to occur or not, i.e. when I get it once I will get it every time until the driver is powered down. If it does not happen it won't until driver power down.

                  Manuel
                  Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                  with probably always latest firmware/DWC (incl. betas or self-compiled)
                  My Tool Collection

                  1 Reply Last reply Reply Quote 0
                  • wilrikerundefined
                    wilriker
                    last edited by wilriker

                    Strangely after being able to reproduce it most of the times I just had a hard time getting it to happen again right now.

                    OK, I tried the following now:

                    • Reduce M203 Z to 600mm/min (and W always the same value set) -> I was unable to reproduce it with F601 (only a few attempts)
                    • Increase M203 Z to 1501mm/min -> I was unable to reproduce it with F1502
                    • After very many tries I was able to reproduce it again with M203 Z1500 and F1501
                      • After homing W as at 0.3 and after it moved out of sync at the top it was at 0.0
                      • AFAICT W stays at 0.3 after homing until I unhide the axis for the first time. If I unhide, hide, unhide it after homing without any movement it will switch it's position from 0.3 to 0.0
                      • I saw it only once now that the left motor overshot
                      • Reducing the acceleration from 100 to 75 made the overshoot worse, reducing to 50 made even "worser"
                      • increasing the acceleration from 100 to 150 seemed to make it a bit better but still overshooting
                      • Increasing acceleration further to 175, 200, 250 or 1000 (did not even know my Z axis was capable of that) I was not able to reproduce with or it was so low of an overshoot that it was no longer visible

                    EDIT: G92 W0 in homez.g seems to cure it.

                    Manuel
                    Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                    with probably always latest firmware/DWC (incl. betas or self-compiled)
                    My Tool Collection

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