missing steps detection while printing does not work



  • Hi,

    there is an problem with Stall detection while printing however sensorless homing works fine while homing.
    Is it right to define the motor stall detection in start g-code or at the end of config-file.

    Until now it is at the end of my start gcode (and in config.g)
    start-gcode from cura:

    M574 X2 Y1 S3
    M915 X Y S5 R3 
    M117 Printing...
    

    my config.g

    
    M555 P2 ; Set output to look like Marlin
    
    M575 P1 B57600 S1 ; Set auxiliary serial port baud rate and require checksum (for PanelDue)
    
    ; Motor remapping for dual Y
    M584 X0 Y1:4 Z2 E3
    
    ; Disable Heater 2 and remap as Fan
    M307 H2 A-1 C-1 D-1 
    ;M42 P2 S# PWM on that pin, where # is 0.0 - 1.0 or 2 - 255.
    
    
    M569 P0 S1 ; Drive 0 goes forwards (change to S0 to reverse it)
    M569 P1 S0 ; Drive 1 goes backwards 	 Y1
    M569 P2 S0 ; Drive 2 goes forwards	 Z
    M569 P3 S1 ; Drive 3 goes forwards	 E
    M569 P4 S1 ; Drive 4 goes forwards 	 Y2
    
    M350 X16 Y16:16 Z16 E16 I1 ; set 16x microstepping with interpolation
    M574 X1 Y1 Z0 S3         ; set homing switch configuration (Y homing switch only, at low end, active high)
    M906 X850 Y850 Z1200 E800 ; Set motor currents (mA)
    M201 X800 Y800 Z90 E1000 ; Accelerations (mm/s^2)
    M203 X15000 Y15000 Z2000 E3600 ; Maximum speeds (mm/min)
    M566 X600 Y600 Z100 E20 ; Maximum jerk speeds mm/minute
    M208 X340 Y440 Z9999 ; set axis maxima and high homing switch positions (adjust to suit your machine)
    M208 X0 Y0 Z0 S1 ; set axis minima and low homing switch positions (adjust to make X=0 and Y=0 the edges of the bed)
    M92 X100.334 Y89.619:89.619 Z314.9607  ; set axis steps/mm  
    M92 E460.78 ; set extruder steps/mm
    G21 ; Work in millimetres
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves
    
    M305 P0 T100000 B3950 R4700 H0 L0  	; Put your own H and/or L values here to set the bed thermistor ADC correction
    M305 P1 T100000 B4388 R4700 H0 L0 	; Put your own H and/or L values here to set the first nozzle thermistor ADC correction
    M305 P2 T100000 B4388 R4700 H0 L0 	; Put your own H and/or L values here to set the second nozzle thermistor ADC correction
    M143 H0 S270 						; Un-comment this to set maximum extruder temperature, default is 262C
    M141 H3 							; Un-comment this to set chamber heater/thermistor channel
    
    M563 P0 D0 H1 			; tool 0 uses extruder drive 0 and heater 1 
    G10 P0 S0 R0 X0 Y0 		; set tool 0 temperatures and offsets
    
    M915 X Y S5 R3 ; Schrittverluste checken
    
    M556 S100 X0 Y0 Z0 ; Put your axis compensation here
    M912 P0 S0 ; Put your CPU temperature sensor correction here
    M501 ; Run config-override.g
    T0 ; Select the first head
    

    my rehome.g and homeall.g

    M400                  ; make sure everything has stopped before we make changes
    M564 H0 S0
    M574 X2 Y1 S3         ; set endstops to use motor stall
    M913 X50 Y70          ; drop motor currents to 50%
    M915 X Y S5 R0 F0     ; set X and Y to sensitivity 2, do nothing when stall, unfiltered
    G91                   ; use relative positioning
    G1 Y10 F1200          ; lift Z
    
    G1 S1 X700 F3600 ; move right/back 325mm, stopping at the endstop
    G4 P500		
    G1 S1 Y-700 F3600 ; move right/back 325mm, stopping at the endstop
    G4 P500				; wait 500msec
    G1 X-20 Y20            ; move away from end
    M915 X Y S2 R0 F0    ; increase sensitivity
    G1 S1 X400 F3600      ; move right 325mm, stopping at the endstop
    G1 S1 Y-400 F3600      ; move back 325mm, stopping at the endstop
    G1 X-5 Y5            ; move away from end
    
    G4 P500			; wait 500msec
    G92 Z0			; Zero Z manually
    M400                  ; make sure everything has stopped before we reset the motor currents
    G90                   ; back to absolute positioning
    M913 X100 Y100        ; motor currents back to 100%
    M574 X2 Y1 S3         ; define active low microswitches
    M564 H1 S1
    

  • administrators

    @benkue said in missing steps detection while printing does not work:

    Is it right to define the motor stall detection in start g-code or at the end of config-file.

    It should not matter to doing it either way.

    I see you are turning it off on your homing commands, is the printer homing after the segment of start.g you posted?


  • administrators

    Getting motor stall detection working while printing is tricky. Some guidelines:

    • Stall detection is unreliable at low speeds (Trinamic's datasheet suggests below approx. 1 rev/sec). So RRF ignores stall detection at low speeds. You can configure the minimum speed at which stall detection will be considered reliable using the H parameter of M915.

    • Stall detection does not work at high speeds where the motor torque is limited by the supply voltage. You can get an estimate of this speed using the calculator at reprapfirmware.org.

    • Stall detection probably works more reliably with high inductance motors. But the higher the inductance, the lower the speed at which the motor becomes torque limited due to insufficient supply voltage.

    • As the motor heats up, the voltage drop across the windings increases. This increase in indistinguishable from the increase in in-phase back EMF as the motor approaches the stall. So if you set the stall sensitivity too low, you may get false stall reports when the motor has heated up. This is more of a problem at low speeds.

    So you best chance of getting stall detection to work during printing is if your printer is a Cartesian one with 24V power and medium inductance motors, that uses modest travel speeds. Like Prusa's i3.



  • @t3p3tony
    The printer is homing at the beginning.

    ;DUET2 start-code
    G90               ; Set to Absolute Positioning
    M82               ; Set extruder to absolute mode
    G21               ; Metric values
    G28 
    ...
    ...
    M915 X Y S5 R3 
    M117 Printing...
    

    In which line i turn it off?

    @dc42
    I have an cartesian printer supplied by 24v with 2A 9kg/cm motors. But it seems that the duet will not recognise losing steps while printing. No matter in which situation (fast or low). Is it really enabled ? the last line in start code is M915 X Y S5 R3


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.