Does M574 S4 work ?

  • I have 3 Z axis steppers, CoreXY, I have stallguard working as an endstop - well I thought I did - on initialization to ensure steppers are in synch I drive the bed all the way to the bottom of the frame where each stepper has a hard stop and where the bed is mechanically as level as I can get it.

    The problem arises when I deliberately put the steppers out of synch - to tilt the bed basically.

    When I drive the steppers to the bottom all three motors stop on the first motor that contacts the hard stop - this is not the behaviour I require - I need the other two to keep going until they themselves stall.

    To this end I used M574 Z2 S4, Z2 because the stall is at the prints highest point (as in 330mm not 0), s4 is supposed to stall each motor individually.

    M574 docu states

    • New endstop type S4 means use motor stall detection (like S3) but if there are multiple motors, stop each one individually as it stalls.

    It does not do this - it stops all three motors when the first stalls.

    I read a section referred to that describes splitting up the Z steppers into single channels but that doc states that it does not apply to RRF3 in the introduction

    somebody care to verify the definition for this

    ; Configuration file for Duet 3 (firmware version 3)
    ; executed by the firmware on start-up
    ; generated by RepRapFirmware Configuration Tool v2.1.4 on Mon Dec 30 2019 11:11:59 GMT+0000 (Greenwich Mean Time)
    ; General preferences
    G90                                                   ; send absolute coordinates...
    M83                                                   ; ...but relative extruder moves
    M550 P"Duet 3"                                        ; set printer name
    M669 K1                                               ; select CoreXY mode
    ; Drives
    M569 P0.0 S0                                          ; physical drive 0.0 goes forwards X
    M569 P0.1 S0                                          ; physical drive 0.1 goes forwards Y
    M569 P0.2 S1                                          ; physical drive 0.2 goes forwards E
    M569 P0.3 S1                                          ; physical drive 0.3 goes Forwards Z1
    M569 P0.4 S1                                          ; physical drive 0.4 goes Forwards Z2
    M569 P0.5 S1                                          ; physical drive 0.5 goes Forwards Z3
    M584 X0 Y1 Z3:4:5 E2 P3				                  ; set drive mapping
    M350 X16 Y16 Z16 E16 I1                               ; configure microstepping with interpolation
    M92 X160.00 Y160.00 Z1600.00 E409.00    	; set steps per mm
    M566 X90.00 Y90.00 Z12.00 E120.00       	; set maximum instantaneous speed changes (mm/min)
    M203 X4800.00 Y4800.00 Z1480.00 E120.00 		; set maximum speeds (mm/min)
    M201 X100.00 Y100.00 Z20.00 E250.00       	; set accelerations (mm/s^2)
    M906 X1680 Y1680 Z1330 E1330 I30            ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                               ; Set idle timeout
    ; Axis Limits
    M208 X-157:162 Y-157:149 Z0:3330				; set axis Min / Max
    M671 X-188.7:10:199 Y-127:199:-127 S10		; Set Bed Pivot Locations
    ; Extruder /  Hot end
    M308 S0 P"spi.cs0" Y" rtd-max31865" A"Hot End" 		  ; configure sensor 0 as a PT100 on Port 1 of temperature daughter board
    M950 H0 C"out1" T0                                    ; create nozzle heater output on out2 and map it to sensor 1
    M143 H0 S320                                          ; set temperature limit for heater 1 to 320C
    M307 H0 B0 S1.00                                      ; disable bang-bang mode for the nozzle heater and set PWM limit
    M563 P0 S"Extruder" D0 H0 F1                          ; define tool 0
    G10 P0 X0 Y0 Z0                                       ; set tool 0 axis offsets
    G10 P0 R0 S0                                          ; set initial tool 0 active and standby temperatures to 0C
    M950 F0 C"out7"	Q500 A"Part Cool"		      		  ; set part cooling fan output
    M106 P0 H-1                  			      		  ; Thermostatic control is turned off
    M950 F1 C"out8" Q500 A"Extruder" 		      		  ; set hot end cooling fan output
    M106 P1 H0 T45               			      		  ; Thermostatic control is turned on, enables at 45C
    ; Bed
    M308 S1 P"temp0" Y"thermistor" A"Bed" T100000 B4725 C7.06e-8 	; configure sensor 1 as thermistor on pin temp0
    M950 H1 C"out2" T1 Q10                                			; create bed heater output on out1 and map it to sensor 1
    M143 H1 S120                                          			; set temperature limit for heater 0 to 120C
    M307 H1 B0 S0.5                                      			; disable bang-bang mode for the bed heater and set PWM limit
    M140 H1                                               			; map heated bed to heater 0
    ; MCU
    M308 S2 Y"mcu-temp" A"CPU"
    M950 F2 C"!out4" A"MCU" Q25000 L.07  
    M106 P2 T40:44 H2      ; set Duet cooling fan	
    ; Pinda Probe
    M308 S3 P"temp1" Y"thermistor" T100000 A"Pinda" B4725 C7.06e-8 	; configure sensor as thermistor on pin temp1
    M558 P5 C"!" H2 A3 F120 T2000          ; set Z probe type to switch filtered
    G31 P1 X-39 Y-31.5 Z2.0 C0.2 S40 H2                      ; set Z probe trigger, offset, trigger height, temperature compensation
    ; Spare Sensor
    ; M308 S4 P"spi.cs1" Y" rtd-max31865" A"Spare" 				  	; configure sensor 4 as a PT100 on Port 2 of temperature daughter board
    ; Filament Detection
    M591 D0 P3 C"" S1 R70:130 L24.8 E3.0 				;Duet3D rotating magnet sensor for extruder drive 0 is connected to I/O 5 input,
    														; enabled, sensitivity 24.8mm.rev, 70% to 130% tolerance, 3mm detection length
    ; Endstops
    M574 X1 S1 P"!"                                   ; configure active-hi endstop for low end on X via pin
    M574 Y1 S1 P"!"                                   ; configure active-hi endstop for low end on Y via pin
    M574 Z2 S4                              ; configure stall current detect endstop for Z
    M915 P3:4:5 S3 F0 H400 R0
    ; M915 P3 S3 F0 H400 R0
    ; M915 P4 S3 F0 H400 R0
    ; M915 P5 S3 F0 H400 R0
    ; define mesh grid
    ; LED Enable Relay
    M950 F3 C"out9" A"Led Relay" 		      ; set its name
    ; PINDA - Z-Probe
    G31 X-20 Y0
    ; Miscellaneous
    M501                                                  ; load saved parameters from non-volatile memory
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000"    ; set voltage thresholds and actions to run on power loss

  • Moderator

    Version of RRF3?

  • Current version is RC2

  • After trying numerous different ways to define my Z axis and in the absence of other input I can only conclude that the S4 when applied to a single axis with multiple motors doesn't work.

    Currently I have no choice but to manually drive the Z axis manually and disable stall detection on it.

  • I wonder if this one works now? I encountered a similar problem with S4 command on my triple motor Z axis bed.

  • administrators

    @astrn said in Does M574 S4 work ?:

    I wonder if this one works now? I encountered a similar problem with S4 command on my triple motor Z axis bed.

    What firmware version are you running?

  • What board do you have? It's labeled as Duet 3 but you're still running RRF2? Regardless you should upgrade to at least the stable branch of RRF 3.1.1

  • I'd forgotten about this one entirely - well almost entirely- I've never had to mechanically zero things since so it has become something of a none issue. The three axis bed leveling works extremely well, so much so that I've never needed to.

    I'm reluctant to list my config because my machine and yours may have very little in common but it is here config.g

    What I would like is a live Z similar to Prusa because I'm really fighting with 1st layers at the moment - but only with PETG ... I'm still trying to figure this out - I can print PETG flawlessly on the MK3S my coreXY won't play ball.

Log in to reply