Duet3D / RepRapFirmware

OO C++ RepRap Firmware
GNU General Public License v3.0
940 stars 534 forks source link

[Bug]: Stall detection work only with R0 & R1 #559

Closed rockman256 closed 2 years ago

rockman256 commented 2 years ago

Duet Forum Discussion Thread

https://forum.duet3d.com/category/30/beta-firmware

Which Duet products are you using?

Firmware Version

RepRapFirmware for Duet 2 WiFi/Ethernet 3.4.0rc1

Duet Web Control Version

Duet Web Control 3.4.0-rc1

Are you using a Single Board Computer (RaspberryPi) with your Duet?

Please upload the results of sending M122 in the gcode console.

=== Diagnostics ===
RepRapFirmware for Duet 2 WiFi/Ethernet version 3.4.0rc1 (2022-02-09 10:26:56) running on Duet WiFi 1.02 or later
Board ID: 08DGM-9T6BU-FG3S8-6J9DG-3S46Q-TVJVD
Used output buffers: 3 of 24 (24 max)
=== RTOS ===
Static ram: 23852
Dynamic ram: 74328 of which 232 recycled
Never used RAM 13596, free system stack 132 words
Tasks: NETWORK(ready,14.3%,243) HEAT(notifyWait,0.1%,332) Move(notifyWait,0.0%,305) MAIN(running,85.6%,410) IDLE(ready,0.0%,30), total 100.0%
Owned mutexes: WiFi(NETWORK)
=== Platform ===
Last reset 00:00:51 ago, cause: software
Last software reset at 2022-02-18 00:03, reason: User, GCodes spinning, available RAM 13668, slot 0
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
Error status: 0x04
Step timer max interval 0
MCU temperature: min 42.7, current 43.0, max 43.3
Supply voltage: min 23.9, current 24.0, max 24.1, under voltage events: 0, over voltage events: 0, power good: yes
Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
Events: 0 queued, 0 completed
Driver 0: pos 0, standstill, SG min 0
Driver 1: pos 0, standstill, SG min 0
Driver 2: pos 48000, standstill, SG min 0
Driver 3: pos 0, standstill, SG min n/a
Driver 4: pos 0, standstill, SG min n/a
Driver 5: pos 0
Driver 6: pos 0
Driver 7: pos 0
Driver 8: pos 0
Driver 9: pos 0
Driver 10: pos 0
Driver 11: pos 0
Date/time: 2022-02-18 00:04:14
Cache data hit count 1748317758
Slowest loop: 4.45ms; fastest: 0.16ms
I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
=== Storage ===
Free file entries: 10
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest read time 2.4ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 83, segments created 3, maxWait 41373ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 7, completed 7, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters 0 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0
=== 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 idle 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
Daemon is idle in state(s) 0
Autopause is idle in state(s) 0
Code queue is empty
=== Network ===
Slowest loop: 201.72ms; fastest: 0.10ms
Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions
HTTP sessions: 1 of 8
- WiFi -
Network state is active
WiFi module is connected to access point 
Failed messages: pending 0, notready 0, noresp 1
WiFi firmware version 1.25
WiFi MAC address b4:e6:2d:60:31:5a
WiFi Vcc 3.34, reset reason Turned on by main processor
WiFi flash size 4194304, free heap 23752
WiFi IP address 10.0.1.4
WiFi signal strength -52dBm, mode 802.11n, reconnections 0, sleep mode modem
Clock register 00002002
Socket states: 0 0 0 0 0 0 0 0

Please upload the content of your config.g file.

G90                                               ; send absolute coordinates...
M83                                               ; ...but relative extruder moves
M550 P"SteelBot3d"                                ; set printer name
M669 K1                                           ; select CoreXY mode

; Network
;M551 P"rock"                                      ; set password
M552 S1                                           ; enable network
M587 S"NETIS" P"1094276855"
M586 P0 S1                                        ; enable HTTP
M586 P1 S0                                        ; disable FTP
M586 P2 S0                                        ; disable Telnet

; Drives
M569 P0 S0                                        ; physical drive 0 goes forwards
M569 P1 S0                                        ; physical drive 1 goes forwards
M569 P2 S1                                        ; physical drive 2 goes forwards
M569 P3 S0                                        ; physical drive 3 goes forwards
M569 P4 S1                                        ; physical drive 3 goes forwards
M584 X0 Y1 Z2 E3:4                                ; set drive mapping
M350 X32 Y32 Z32 I0                               ; configure microstepping without interpolation
M350 E16:16 I1                                    ; configure microstepping with interpolation
M92 X320.00 Y320.00 Z3200.00 E415.00:415.00       ; set steps per mm
M566 X1200.00 Y1200.00 Z15.00 E600.00:600.00        ; set maximum instantaneous speed changes (mm/min)
M203 X12000.00 Y12000.00 Z800.00 E3600.00:3600.00 ; set maximum speeds (mm/min)
M201 X1600.00 Y1600.00 Z1000.00 E5000.00:5000.00      ; set accelerations (mm/s^2)
M906 X1300 Y1300 Z1000 E600:800 I30               ; set motor currents (mA) and motor idle factor in per cent
M84 S30                                           ; Set idle timeout
M915 P0:1 S1 R3 F0 H380

; Axis Limits
M208 X0 Y0 Z0 S1                                  ; set axis minima
M208 X370 Y252 Z354.70 S0                            ; set axis maxima

; Endstops
M574 X1 S3                                        ; configure sensorless endstop for low end on X
M574 Y1 S3                                        ; configure sensorless endstop for low end on Y
M574 Z2 S1 P"zstop"                               ; configure active-high endstop for high end on Z via pin zstop

; Z-Probe
M950 S0 C"exp.heater7"                            ; create servo pin 0 for BLTouch
M558 P9 C"^zprobe.in" H5 F200 T6000 P25             ; set Z probe type to bltouch and the dive height + speeds
G31 P500 X10Y40 Z0.4                       ; set Z probe trigger value, offset and trigger height
M557 X10:390 S50 Y-60:250 S20                              ; define mesh grid

; Heaters
M308 S0 P"bedtemp" Y"thermistor" T100000 B4138    ; configure sensor 0 as thermistor on pin bedtemp
M950 H0 C"bedheat" T0                             ; create bed heater output on bedheat and map it to sensor 0
M307 H0 B1 S1.00                                  ; enable bang-bang mode for the bed heater and set PWM limit
M140 H0                                           ; map heated bed to heater 0
M143 H0 S130                                      ; set temperature limit for heater 0 to 130C
M308 S1 P"spi.cs1" Y"rtd-max31865"                ; configure sensor 1 as thermocouple via CS pin spi.cs1
M950 H1 C"e0heat" T1                              ; create nozzle heater output on e0heat and map it to sensor 1
M307 H1 B0 S1.00                                  ; disable bang-bang mode for heater  and set PWM limit
M143 H1 S400                                     ; set temperature limit for heater 1 to 280C
M308 S2 P"spi.cs2" Y"rtd-max31865"                ; configure sensor 2 as thermocouple via CS pin spi.cs2
M950 H2 C"e1heat" T2                              ; create nozzle heater output on e1heat and map it to sensor 2
M307 H2 B0 S1.00                                  ; disable bang-bang mode for heater  and set PWM limit
M143 H2 S400                                      ; set temperature limit for heater 2 to 280C
;M307 H0 R0.698 K4.712:0.000 D1.72 E1.35 S1.00 B0
M307 H0 R0.639 K1.411:0.000 D10 E1.35 S1.00 B0
M307 H1 R3.499 C174.1:111.9 D6.16 S1.00 V23.8
M307 H2 R3.499 C174.1:111.9 D6.16 S1.00 V23.8

; Fans
M950 F0 C"fan0" Q25000                              ; create fan 0 on pin fan0 and set its frequency
M106 P0 S0 H-1                             ; set fan 0 value. Thermostatic control is turned on
M950 F1 C"fan1" Q500                              ; create fan 1 on pin fan1 and set its frequency
M106 P1 S0.8 H1:2 T45                                   ; set fan 1 value. Thermostatic control is turned off
M950 F2 C"fan2" Q500                              ; create fan 1 on pin fan1 and set its frequency
M106 P2 S1 H1:2 T45                                    ; set fan 1 value. Thermostatic control is turned off

; Tools
M563 P0 D0 H1 F0:1                                ; define tool 0
G10 P0 X0 Y0 Z0                                   ; set tool 0 axis offsets
M568 P0 R140 S235                                    ; set initial tool 0 active and standby temperatures to 0C
M207 P0 S0.7 F3600 Z0.075 ;установка ретрактов
M563 P1 D1 H2 F0:1                                ; define tool 1
G10 P1 X-20 Y0 Z0                                  ; set tool 1 axis offsets
M568 P1 R140 S210                                     ; set initial tool 1 active and standby temperatures to 0C
M207 P1 S4.0 F6000 Z0.08

M950 J2 C"!e0stop" ; Assign Pin2 to Pause
M581 P2 T1 C0 S1 R0  ;  - физичская кнопка паузы
M582 T1
G4 P10000
M955 P0 C"spi.cs4+spi.cs3"

Please upload the content of any other releveant macro files.

m915
Driver 0: stall threshold 1, filter off, steps/sec 380 (38.0 mm/sec), coolstep 0, action on stall: none
Driver 1: stall threshold 1, filter off, steps/sec 380 (38.0 mm/sec), coolstep 0, action on stall: none
Driver 2: stall threshold 1, filter off, steps/sec 200 (2.0 mm/sec), coolstep 0, action on stall: none
Driver 3: stall threshold 1, filter off, steps/sec 200 (7.7 mm/sec), coolstep 0, action on stall: none
Driver 4: stall threshold 1, filter off, steps/sec 200 (7.7 mm/sec), coolstep 0, action on stall: none

Details specific to your printer.

DIY CoreXY

Links to additional info.

No response

What happened?

stall detection work only at homing. And when i use R1 - it can report me about stall detection. But, when i try set R2 or R3 - is nothing happend. it just keeps printing, don't pause the print. image image

dc42 commented 2 years ago

This is a known issue that has already been resolved in the source code for forthcoming RC2 release. See https://github.com/Duet3D/RepRapFirmware/wiki/Changelog-RRF-3.x-RC#reprapfirmware-340rc2.

dc42 commented 2 years ago

PS - the fix is currently awaiting testing. If you wish to help with this, you can find a preview 3.4.0rc1+2 build of RRF at https://www.dropbox.com/sh/2dt7sbqpx6l74np/AADn4-lpcil1iqnWKkiVri3Ia?dl=0.

dc42 commented 2 years ago

Fixed in release 3.4.0.

kgolger commented 2 years ago

A hello to the developers!

Same error on Release 3.4.1 on my Duet2 Wifi. If M915 was invoked with parameter R2 or R3 then no action was taken on a driver stall as if R0 had been used. R1 is working. rehome.g and driver_stall.g are stored in the /sys/ folder. Stallguard parameter are calibrated (M915 X Y S9 H200 F0 R3). Homing is without stallguard. M915 is active during printing (started from SD-card). Printing speed is 100-200mm/s. Stepper are 1.8deg (200steps/rot) with 160 esteps.

M915 messages:

20.8.2022, 14:57:07 | Driver 0: stall threshold 9, filter off, steps/sec 200 (39.9 mm/sec), coolstep 0, action on stall: run macro Driver 1: stall threshold 9, filter off, steps/sec 200 (39.9 mm/sec), coolstep 0, action on stall: run macro Driver 2: stall threshold 1, filter off, steps/sec 200 (8.0 mm/sec), coolstep 0, action on stall: none Driver 3: stall threshold 1, filter off, steps/sec 200 (8.1 mm/sec), coolstep 0, action on stall: none Driver 4: stall threshold 1, filter off, steps/sec 200 (40.0 mm/sec), coolstep 0, action on stall: none -- | --

After these messages - no macro executing:

20.8.2022, 14:58:23 | Warning: Driver 0 stall -- | -- 20.8.2022, 14:58:15 | Warning: Driver 0 stall Warning: Driver 0 stall Warning: Driver 0 stall 20.8.2022, 14:57:44 | Warning: Driver 1 stall 20.8.2022, 14:57:40 | Warning: Driver 1 stall Warning: Driver 1 stall 20.8.2022, 14:57:35 | Warning: Driver 1 stall Warning: Driver 1 stall

Did I miss something?

Thanks for help!

wbr, Karl

T3P3 commented 2 years ago

Please use our forum for support (forum.duet3d.com).

Check the release notes about the change to events, also documentation here: https://docs.duet3d.com/User_manual/RepRapFirmware/Events