Stall detection buggy/inconsistent
semi55 last edited by semi55
I have some really inconsistent results with stall detection. Sensorless homing works fine, as well as recognizing a stall during printing. The problem lies in the rehome procedure.
FYI: I have a BLtouch on my Y-Axis (Belt printer). I use sensorless homing on the X-axis during the rehoming procedure and the BLtouch for homing the Y-axis. I run on SBC mode controlling an STM based board with multiple configurations. The rehome files is located in the sys folder of the active configuration
This is my rehome.g file:
; home X M280 P0 S160 ; reset Bltouch for robustness M402 ; retract probe for safety reasons G91 ; relative positioning G1 H2 Y-5 X5 F10000 ; lift y relative to current position G1 H2 X10 Y10 F18000 ; move X relative to current position ;Stall detection section M574 Y1 S3 ; Enable sensorless homing on Y axis M574 X1 S3 ; Enable sensorless homing on X axis M915 P0 S30 H150 R0 ; Stall sensitivity Y axis M915 P3 S30 H150 R0 ; Stall sensitivity X axis M913 X70 Y70 ; Lower motor current G4 P200 ; delay to ensure settings are made M400 ; Wait for commands to finish G1 H1 X-245 F2400 ; move quickly to X axis endstop and stop there (first pass) G1 H2 X10 Y10 F18000 ; move X relative to current position G1 H1 X-245 F2000 ; move slowly to X axis endstop once more (second pass) G1 X10 ; move X M913 X100 Y100 ; reset motor currents M574 Y1 S2 ; Enable Z-probe again ; home Y G91 ; relative positioning G1 H2 Y-15 X15 F10000 ; lift y relative to current position M401 ; deploy probe G1 H1 Y-285 F2000 ; move Y down until BLTouch is triggered G92 Y1.8 ; set Bltouch offset M402 ; retract probe G1 Y5 ; move Y up M574 Y1 S3 ; Enable sensorless homing on Y axis again M24 ; resume print M915 X Y S28 R3 F1 H200
This script succeeds roughly 20% of the time. Most of the time at some point of this script, the printer just stops and does nothing. It can't resume the print when this is happening.
semi55 last edited by
@phaedrux I've tried to send M122 through the DWC when it stops but unfortunately I got no output.
I've hooked up Pronterface directly to the STM board next and also got nothing until I've rebooted the firmware through theDWC:
>>>M122 SENDING:M122 //after reboot:// Done printing file Cancelled printing file 0:/gcodes/stallV2.gcode, print time was 0h 0m Printing resumed === Diagnostics === RepRapFirmware for STM32F4 based Boards (biquskrpro_1.1) version 3.3_2 (2021-06-19 17:12:49) running on STM32F4 (SBC mode) Used output buffers: 4 of 40 (16 max) === RTOS === Static ram: 18112 Dynamic ram: 63788 of which 24 recycled Never used RAM 48120, free system stack 117 words Tasks: SBC(ready,6.8%,316) HEAT(suspended,0.0%,343) MAIN(running,93.1%,428) IDLE(ready,0.0%,30), total 100.0% Owned mutexes: USB(MAIN) === Platform === Last reset 00:02:03 ago, cause: [software] Last software reset at 2021-07-27 08:59, reason: User, none spinning, available RAM 48360, slot 0 Software reset code 0x0012 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0xe000ed38 SP 0x00000000 Task SBC Freestk 0 n/a Error status: 0x00 [ERROR] Error status: 0x00 Step timer max interval 0 MCU temperature: min 57.5, current 58.3, max 58.3 Supply voltage: min 24.0, current 24.0, max 24.0, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 99/2, heap memory allocated/used/recyclable 2048/96/64, gc cycles 0 Driver 0: position 1295, 2209 standstill, reads 6627, writes 6, SG min/max 12/450 Driver 1: position 311, no-driver-detected Driver 2: position 386, 2209 standstill, reads 6633, writes 0, SG min/max 8/8 Driver 3: position 0, 2209 standstill, reads 6626, writes 6, SG min/max 70/460 Driver 4: position 0, no-driver-detected Driver 5: position 0, 2209 standstill, reads 6632, writes 0, SG min/max 0/2 Driver 6: position 0 Driver 7: position 0 Driver 8: position 0 Driver 9: position 0 Driver 10: position 0 Date/time: 2021-07-27 09:01:35 Slowest loop: 78.40ms; fastest: 0.03ms === Move === DMs created 83, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === DDARing === Scheduled moves 39, completed moves 39, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = 1, chamberHeaters = 2 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File* is idle in state(s) 0 USB is ready with "M122" in state(s) 0 Aux is idle in state(s) 0 Trigger* is idle in state(s) 0 Queue* is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 0, running macro Aux2 is idle in state(s) 0
jay_s_uk last edited by
@semi55 can you upgrade to 3.3.0_5?
It also looks as though 2 of your driver's aren't in UART mode.
Can you post an output of M122 P200
semi55 last edited by
@jay_s_uk I've upgraded the board to 3.3.0_5 and the SBC to the latest 3.3.0 stable release but unfortunately with no effect. It still stops randomly sometimes.
I've tried to cancel the print after it stopped and got this:
M0 H1 Error: M0: Pause the print before attempting to cancel it
which seems odd as the print should be paused, or is it maybe because it is getting stuck in the script somewhere?
Driver 1 and and 4 are not in use btw. I have a weird arrangement due to one driver slot being fried.
This is the output of M122 P200: