Measure lenght with stall detection?



  • Hi Guys,

    i've got a Question about a possible way to measure the Axis lenght with the stall detection Feature.
    Is there already a function/Gcode to do this?


  • administrators

    Yes, in firmware 1.20. First home the printer to one end of the axis as normal. Then use M574 to change the endstop for that axis to a stall detection endstop at the other end. Then use a G1 S3 command to move to beyond where the end of that axis is likely to be. It will set the corresponding M208 parameter to the axis position at which the stall occurs.

    You will need to tune the stall detection first.



  • Thank you, i already got a working stall detection Makro. 🙂
    So i just have to edite it a bit more. (I post it after i got it working)



  • It might be a good idea to temporarely lower the motor current for that axis during the stall detection movement too.



  • @Captain_sq:

    It might be a good idea to temporarely lower the motor current for that axis during the stall detection movement too.

    Like this? 😉

    [[language]]
    M913 X50 Y50	
    
    


  • Ok, i tryed this, but it it dosen't show me something in the Console.

    [[language]]
    ; This File is just for testing the "stall detection" Feature.
    ; It might need to be adjusted to get it to work with you're Printer/s
    
    ; Sensorless Homing test file for RepRapFirmware on D-Bot
    M915 XY S4 F0 R1
    
    ; More about M915 and how to set it up you can find here: 
    ; https://duet3d.com/wiki/G-code#M915:_Configure_motor_stall_detection
    
    ; Home X and Y
    G28 X0 Y0
    
    ; Setup Stall Detection on CoreXY for Xmax Ymin
    M400							; make sure everything has stopped before we make changes
    M574 X2 Y1 S3					; set endstops to use motor stall
    M913 X50 Y50					; reduce motor current to 50% to prevent belts slipping
    G91								; use relative positioning
    G1 S3 X500 F4000				; move the X to max until it detects the max Point
    G1 X-30							; move X away from max Point
    M400							; wait untill X is done
    G1 S3 Y-500 F4000				; move the Y to min until it detects the min Point
    G1 Y30
    G90								; back to absolute positioning
    M400							; make sure everything has stopped before we reset the motor currents
    M913 X100 Y100 Z100				; motor currents back to normal
    G1 X160 Y100 F2000					; centre the head and set a reasonable feed rate
    M574 X1 Y2 Z1 S0				; set endstops back to normal (is maybe different than you're normal)
    
    

  • administrators

    You will need to send M208 to find out the new axis length.



  • @AS-3D:

    @Captain_sq:

    It might be a good idea to temporarely lower the motor current for that axis during the stall detection movement too.

    Like this? 😉

    [[language]]
    M913 X50 Y50	
    
    

    Yes, that will probably work nicely, but isn't F4000 a bit fast running the gantry into its physical endstop?

    /Thom


Locked
 

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