loss of step external driver duet 1XD
-
@tom33 I suggest you concentrate on getting it working using the latest 3.3RC build. You can find the files here https://www.dropbox.com/sh/nmpsl9a3jfsumm5/AAA6adSjEcd1AM_j5_tVberGa?dl=0.
-
I use this thread for this problem (https://forum.duet3d.com/topic/23731/firmware-bundle-3-3-0-released/20?_=1624282758108)
In the M122 B10 in the line CAN messages there is 131 messages lost maybe that create the wrong direction of the motor ?
config.g :
; Configuration file for Duet 3 (firmware version 3)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Mar 31 2021 11:16:46 GMT+0200 (heure d’été d’Europe centrale); General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"3D"
M451; Network
;M552 S1 P192.168.1.90 ; Enable Networking
;M553 P255.255.0.0
;M586 P0 S1 ; Enable HTTP
;M586 P1 S0 ; Disable FTP
;M586 P2 S0 ; Disable Telnet;G4 S5
M569 P0 S1 ; Drive 0 T0 Extrudeur Gauche
M569 P1 S1 ; Drive 1 T1 Extrudeur Droit
M569 P2 S1 ; Drive 2 T0 Extrudeur Bobine Gauche
M569 P3 S1 ; Drive 3 T1 Extrudeur Bobine Droit
M569 P4 S1 ; Drive 4 T1 Montée / Descente têteG4 S5
M569 P10.0 S0 R0 T6:3:6:1
M569 P20.0 S0 R0 T6:3:6:1
M569 P30.0 S0 R0 T6:3:6:1 ; Drive 30.0 Z;G4 S5
M584 X10.0 Y20.0 Z30.0 A3 B4 C0 E1:2 ; set drive mapping
M350 E16:16 I1 ; configure microstepping without interpolation
;M350 X32 I1 ;Y32 Z16 I1
M350 A16 B16 C16 I1 ; configure microstepping with interpolation
M92 X320 Y320 Z160 A582 B582 C300 E834:834 ; set steps per mm
M566 X250 Y250 Z150 A500 B500 C50 E500:500 ; set maximum instantaneous speed changes (mm/min)
M203 X12000 Y12000 Z3000 A1200 B1200 C10000 E1200:1200 ; set maximum speeds (mm/min)
M201 X1000 Y500 Z50 A500 B500 C500 E500:500 ; set accelerations (mm/s^2)
M906 A1200 B1200 C500 E600:600 I30 ; set motor currents (mA) and motor idle factor in per cent
M84 S60 ; Set idle timeout
M913 C100 ; Courant moteur Axe C 50%; Axis Limits
M208 X0:1040 Y0:525 Z0:534.3 A-10000:10000 B-10000:10000; Endstops
M574 X1 S1 P"!10.io1.in" ; configure active-high endstop for low end on X via pin io0.in
M574 Y2 S1 P"!20.io2.in" ; configure active-high endstop for low end on Y via pin io2.in ;P"!io3.in" "!20.io1.in"
M574 Z2 S1 P"!30.io1.in" ; configure active-high endstop for low end on Z via pin io4.in ;P"!io4.in" "!30.io1.in"
M574 A0
M574 B0
;M574 C1 S3;Stall Detection
;M915 C S2 F0 H200 R0 ; Coupler
;M915 P1 S1 F0 H280 R0 ; Coupler; Z-Probe
M558 P5 C"!io4.in" H7.5 F300 T6000 ; set Z probe type to switch and the dive height + speeds "!io8.in"
G31 P500 X0 Y0 Z-2.4 ; set Z probe trigger value, offset and trigger height
M557 X15:985 Y15:485 S150 ;define mesh grid;M558 K1 P5 C"io3.in" ; tool probe
; Heaters
; Bed heater
M308 S0 P"temp0" Y"thermistor" A"Plateau chauffant" T100000 B4138 C0 ; configure sensor 0 as thermistor on pin temp0
M950 H0 C"out5" T0 ; create bed heater output on out0 and map it to sensor 0
M307 H0 B0 R0.334 C356.2 D1.33 S1.00 V24.0 ; disable bang-bang mode for the bed heater and set PWM limit
M140 H0 ; map heated bed to heater 0
M143 H0 S120 ; set temperature limit for heater 0 to 120C; Tool 0 heater
M308 S1 P"temp1" Y"thermistor" A"E0" T98640 B4632.86 C9.4861662E-08 H0 L0 ; Set thermistor
;M307 H1 B0 R1.862 C397.7:397.7 D19.89 S1.00 V24.0
M307 H1 B0 R2.362 C397.7:397.7 D19.89 S1.00 V24.0
M950 H1 C"out1" T1 ; Extruder 0 heater
M143 H1 S300 ; Set temperature limit for heater 1 to 300C
M570 H1 P60 T35 S120;Tool 1 heater
M308 S2 P"temp2" Y"thermistor" A"E1" T100000 B4725 C7.06e-8 ; configure sensor 2 as thermistor on pin temp2
M307 H2 B0 R1.862 C397.7:397.7 D19.89 S1.00 V24.0
M950 H2 C"out2" T2 ; create nozzle heater output on out2 and map it to sensor 2
M143 H2 S280
M570 H2 P60 T35 S120; set temperature limit for heater 2 to 280C
;Heat chamber
M308 S3 P"temp3" Y"thermistor" A"Chambre" T100000 B4138 ; configure sensor 3 as thermistor on pin temp3
M950 H3 C"out3" T3 ; create chamber heater output on out3 and map it to sensor 3
M307 H3 B0 S1.00 ; disable bang-bang mode for the chamber heater and set PWM limit
M141 H3 ; map chamber to heater 3
M143 H3 S100 ; set temperature limit for heater 3 to 100C; Tools
M563 P0 S"E0" D0 H1 ;F0 ; Define Extruder 0 drive 0 Heater 1 Fan 0
G10 P0 X0 Y0 Z0 C5 ; Set offset
G10 P0 R0 S0 ; Reset initial tool 0 active and standby temperatures to 0CM563 P1 S"E1" D1 H2 ;F1 ; Define Extruder 1 drive 1 Heater 2 Fan 1
G10 P1 X0 Y0 Z0 C10 ; set tool 1 axis offsets Essais Z offset pour déplacement axe C
G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C;Filament Monitor
;M591 P3 C"io5.in" S1 D0 ; filament monitor connected to E0_stop
;M591 P4 C"io6.in" S1 D1 ; filament monitor connected to E0_stop; Fans
;M950 F0 C"out7" ; create fan 1 on pin out5 and set its frequency
;M950 F1 C"out8" ; create fan 2 on pin out6 and set its frequency;M106 P0 S255 H1:2 T20 ; set fan 0 value. Thermostatic control is turned on
;M106 P0 S0
;M106 P1 S0 ; set fan 2 value. Thermostatic control is turned on;Servo
;M950 S0 C"out5" ;Q500 ; Servo Montée / Descente
;M950 S6 C"io5.out" ; Servo B0
;M950 S8 C"io7.out" ; Servo B1;Input
M950 J0 C"!io0.in" ; Arret d'urgence
M581 T0 P0 S0 R0 ; T0 --> M112 Arret d'urgenceM950 J1 C"io1.in" ; Pause / Play trigger 2.g
M581 T2 P1 S0 R0 ; T6 --> M25 Pause / PlayM950 J2 C"io2.in" ; Pause / Stop trigger 3.g
M581 T3 P2 S0 R0 ; StopM950 J3 C"io3.in" ; Door
M581 T4 P3 S1 R0 ; DoorM950 J4 C"!10.io2.in+!20.io1.in+!20.io2.in" ; Endstop Min X Y Z
M581 T5 P5 S1 R0 ; trigger 5 min;M950 J6 C"20.io2.in" ; Endstop Min Y
;M950 J7 C"30.io2.in" ; Endstop Min Z;M581 T4 X Y Z S1 ; invoke trigger 4 when the X or Y endstop switch is triggered
;M581 T4 P5:6:7 S1 R1 ; invoke trigger 4 when an inactive-to-active edge is detected on input 0 or input 3 and a file is being printed from SD card;Output
M950 P0 C"10.out1" ; Verrouillage porte
M950 P7 C"out4" ; Relais freins moteurs ZM150 X0 ; set LED type to NeoPixel and set SPI frequency to 3MHz
; Custom settings are not defined
;M593 F50 ; cancel ringing at 50Hz (https://forum.e3d-online.com/threads/accelerometer-and-resonance-measurements-of-the-motion-system.3445/)
M376 H15 ; bed compensation taper; Miscellaneous
M501 ; load saved parameters from non-volatile memory
M911 S22.0 R22.5 ; P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" set voltage thresholds and actions to run on power lossM122 B10
M122 B10
Diagnostics for board 10:
Duet EXP1XD firmware version 3.3 (2021-06-15 16:12:29)
Bootloader ID: SAMC21 bootloader version 2.0 (2020-10-15b1)
Never used RAM 5504, free system stack 2743 words
Tasks: Move(notifyWait,0.3%,113) HEAT(delaying,0.0%,111) CanAsync(notifyWait,0.0%,64) CanRecv(notifyWait,0.0%,75) CanClock(notifyWait,0.0%,64) MAIN(running,96.1%,436) IDLE(ready,0.0%,41) AIN(delaying,3.6%,142), total 100.0%
Last reset 00:02:00 ago, cause: software
Last software reset time unknown, reason: HardFault, available RAM 2372, slot 0
Software reset code 0x0060 ICSR 0x0400f003 SP 0x200037f8 Task MAIN Freestk 4294967295 ok
Stack: 41000000 00000000 41000000 68184b01 41000000 0000cee9 0001065a 61000000 200027f0 000007a6 41000000 a5a5a5a5 a5a5a5a5 a5a5a5a5 a5a5a5a5 a5a5a5a5 a5a5a5a5 a5a5a5a5 a5a5a5a5 0000d6c7 a5a5a5a5 0000d767 a5a5a5a5 00011f85 a5a5a5a5 00000000 0000c6b5
Driver 0: position 640, 320.0 steps/mm, steps req 204160 done 204160
Moves scheduled 638, completed 638, in progress 0, hiccups 0, step errors 0, maxPrep 577, maxOverdue 5184984, maxInc 16110, mcErrs 0, gcmErrs 0
Peak sync jitter 0/6, peak Rx sync delay 207, resyncs 0/2, no step interrupt scheduled
VIN: 24.3V
MCU temperature: min 29.6C, current 29.6C, max 30.2C
Ticks since heat task active 15, ADC conversions started 60129, completed 60129, timed out 0, errs 0
Last sensors broadcast 0x00000000 found 0 20 ticks ago, loop time 0
CAN messages queued 45, send timeouts 0, received 1653, lost 131, free buffers 37, min 0, error reg 0
dup 0, oos 88/7/0/1, bm 542, wbm 14100113, rxMotionDelay 49010, adv -1315737/37187 -
@tom33 said in loss of step external driver duet 1XD:
In the M122 B10 in the line CAN messages there is 131 messages lost maybe that create the wrong direction of the motor ?
Yes that's certainly a problem; but so is this:
Last reset 00:02:00 ago, cause: software
Last software reset time unknown, reason: HardFault, available RAM 2372, slot 0It indicates that the board reset due to an error 2 minutes before you ran the M122 command. I will look into it.
-
@tom33 I would like to investigate that Hard Fault reset first. It might be recent, or a very old one. So please do the following:
- Send:
M122 B10 P1005
This will cause the 1XD board to reset.
-
If you then send M122 B10 it should display the time of the software reset and also flag it as "deliberate HardFault".
-
Reset the main board so that it reconfigures the 1XD board.
-
Run your test again
-
Run M122 and M122 B10 again, and post the results here.
-
@dc42 said in loss of step external driver duet 1XD:
M122
M122
=== Diagnostics ===
RepRapFirmware for Duet 3 MB6HC version 3.3 (2021-06-15 21:45:47) running on Duet 3 MB6HC v1.01 or later (standalone mode)
Board ID: 08DJM-9P63L-DJ3T0-6J9DL-3S06S-K81H9
Used output buffers: 3 of 40 (18 max)
=== RTOS ===
Static ram: 150904
Dynamic ram: 93128 of which 320 recycled
Never used RAM 106984, free system stack 155 words
Tasks: NETWORK(ready,27.1%,224) ETHERNET(notifyWait,0.1%,126) HEAT(delaying,0.0%,325) Move(notifyWait,0.1%,265) CanReceiv(notifyWait,0.0%,822) CanSender(notifyWait,0.0%,362) CanClock(delaying,0.0%,339) TMC(notifyWait,8.0%,93) MAIN(running,64.5%,1114) IDLE(ready,0.1%,29), total 100.0%
Owned mutexes: HTTP(MAIN)
=== Platform ===
Last reset 00:02:28 ago, cause: reset button
Last software reset at 2021-06-19 22:06, reason: User, GCodes spinning, available RAM 110148, slot 2
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a
Error status: 0x00
Step timer max interval 129
MCU temperature: min 30.1, current 31.4, max 31.6
Supply voltage: min 24.0, current 24.0, max 24.1, under voltage events: 0, over voltage events: 0, power good: yes
12V rail voltage: min 12.2, current 12.3, max 12.3, under voltage events: 0
Heap OK, handles allocated/used 99/0, heap memory allocated/used/recyclable 2048/8/8, gc cycles 0
Driver 0: position 145600, standstill, reads 37581, writes 16 timeouts 0, SG min/max 0/0
Driver 1: position 166400, standstill, reads 37583, writes 14 timeouts 0, SG min/max 0/0
Driver 2: position 0, standstill, reads 37583, writes 14 timeouts 0, SG min/max 0/0
Driver 3: position 0, standstill, reads 37584, writes 14 timeouts 0, SG min/max 0/0
Driver 4: position 0, standstill, reads 37584, writes 14 timeouts 0, SG min/max 0/0
Driver 5: position 0, standstill, reads 37587, writes 11 timeouts 0, SG min/max 0/0
Date/time: 2021-06-22 08:34:07
Slowest loop: 131.64ms; fastest: 0.04ms
=== Storage ===
Free file entries: 10
SD card 0 detected, interface speed: 25.0MBytes/sec
SD card longest read time 0.8ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 125, maxWait 16399ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 1750, completed moves 1750, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 1749, 5], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters = 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = 3 -1 -1 -1
=== GCodes ===
Segments left: 0
Movement lock held by null
HTTP is ready with "M122 " 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
SBC is idle in state(s) 0
Daemon is idle in state(s) 0
Aux2 is idle in state(s) 0
Autopause is idle in state(s) 0
Code queue is empty.
=== CAN ===
Messages queued 3106, received 23, lost 0, longest wait 2ms for reply type 6036, peak Tx sync delay 6, free buffers 49 (min 47), ts 745/744/0
Tx timeouts 0,0,0,0,0,0
=== Network ===
Slowest loop: 143.38ms; fastest: 0.02ms
Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions Telnet(0), 0 sessions
HTTP sessions: 1 of 8- Ethernet -
State: active
Error counts: 0 0 0 0 0
Socket states: 5 2 2 2 2 0 0 0
M122 B10
Diagnostics for board 10:
Duet EXP1XD firmware version 3.3 (2021-06-15 16:12:29)
Bootloader ID: SAMC21 bootloader version 2.0 (2020-10-15b1)
Never used RAM 5504, free system stack 2743 words
Tasks: Move(notifyWait,0.3%,111) HEAT(delaying,0.0%,117) CanAsync(notifyWait,0.0%,60) CanRecv(notifyWait,0.0%,75) CanClock(notifyWait,0.0%,64) MAIN(running,95.9%,412) IDLE(ready,0.0%,41) AIN(delaying,3.7%,142), total 100.0%
Last reset 00:04:17 ago, cause: software
Last software reset at 2021-06-19 21:27, reason: deliberate HardFault, available RAM 5504, slot 1
Software reset code 0x8060 ICSR 0x00000003 SP 0x20002b40 Task MAIN Freestk 822 ok
Stack: 20000001 00000000 0001e818 00000001 00000000 0000f6f3 00010810 01000000 a5a5a5a5 a5a5a5a5 00000000 00000000 20000d04 00000444 41000000 a5a5a5a5 a5a5a5a5 a5a5a5a5 a5a5a5a5 20003980 a5a5a5a5 a5a5a5a5 a5a5a5a5 0000feb5 a5a5a5a5 000158e5 a5a5a5a5
Driver 0: position -174720, 320.0 steps/mm, steps req 889600 done 569607
Moves scheduled 1317, completed 1317, in progress 0, hiccups 0, step errors 0, maxPrep 577, maxOverdue 5238786, maxInc 143999, mcErrs 0, gcmErrs 0
Peak sync jitter 0/5, peak Rx sync delay 217, resyncs 0/1, no step interrupt scheduled
VIN: 24.3V
MCU temperature: min 19.5C, current 20.0C, max 20.1C
Ticks since heat task active 78, ADC conversions started 128785, completed 128785, timed out 0, errs 0
Last sensors broadcast 0x00000000 found 0 83 ticks ago, loop time 0
CAN messages queued 42, send timeouts 0, received 2863, lost 575, free buffers 37, min 0, error reg 0
dup 0, oos 362/40/0/0, bm 906, wbm 143999, rxMotionDelay 49112, adv -1369537/37186 - Ethernet -
-
@tom33 thanks.
It looks like that original hard fault report was an old one generated from a previous version of the firmware, so we can discount it.
What I see from the M122 log was that the 1XD board received CAN commands faster than it could process them. As a result, some commands were lost and others were executed much later than they should have been. There are a number of factors contributing to this:
-
You are using a high XY steps/mm i.e. 32 instead of the more common values of 80 to 200. This increases the amount of processor time used to generate step pulses. I suggest you reconfigure the closed loop drivers to use a lower steps/mm.
-
You are using quite long M569 timings for the driver, i.e. T6:3:6:1. This will also slow down the processor a little (less in firmware 3.3 than in previous versions). The Leadshine drivers should be OK with T2.5:2.5:5:0.
-
I suspect that the file you are testing with uses lots of short moves. Please share that file so that I can analyse it.
-
-
-
@dc42 the thing I don't understand is, Now I'm using 3.3 RC+6 and I have no problem but with 3.3 release I have the problem...
Something have changed between both ? -
@tom33 are you using 3.3RC3+6 on both boards, or just one of them? If you are using RC3+6 on both of then, please try upgrading just the 1XD firmware to 3.3 stable, or just the main board firmware to 3.3 stable. If there has been a regression between 3.3RC3+6 and 3.3 stable then it would be helpful to know which firmware it is in. The CAN protocol hasn't changed between 3.3RC3+6 and 3.3 stable, so those versions will talk to each other over CAN.
-
I try :
1XD : 3.3.0 Main board 3.3.0 Result loss of step / communication
1XD : 3.3 RC+6 Main board 3.3.0 Result : Result loss of step / communication
1XD : 3.3 RC+6 Main board 3.3 RC+6 Result Ok
1XD : 3.3.0 Main board 3.3 RC+6 Result Ok -
@dc42 that helped you ?
-
@tom33 thanks, so it's a change in the
1XDmain board firmware between 3.3RC3+6 and 3.3 stable that has caused the issue. That tells me where to look. -
@tom33 I am working on tracking down and fixing this issue today. Until I have a fix, I suggest you use the combination of RRF 3.3RC3+6 on the main board and 3.3 on the 1XD boards.
-
@tom33 this is now fixed in RRF 3.4.0alpha which is available at https://www.dropbox.com/sh/cpwzsx0lrofa7r3/AABllKZQrgJThEvuMog0n4vWa?dl=0. It's compatible with firmware 3.3 stable on 1XD and other expansion boards. It's an alpha build because we don't yet have an official 3.4beta, but the changes since 3.3 are minor. See https://github.com/Duet3D/RepRapFirmware/wiki/Changelog-RRF-3.x-Beta-&-RC#reprapfirmware-34alpha.
We will probably do a 3.3.1 release including this fix.