Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Overloading the Duet 3 Mini 5+ with commands, causing stuttering

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    5
    15
    399
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cosmowaveundefined
      cosmowave @VirtualBrown
      last edited by

      @VirtualBrown said in Overloading the Duet 3 Mini 5+ with commands, causing stuttering:

      I can mitigate it by decreasing the slicer resolution (0.05 from 0.012),

      This leads to a higher resolution. Or it is a typo?
      i can't imagine that the processor is overloaded with just controlling the printer. Do you have a "long" daemon.g file?

      Mankati FSXT+, DeltaTowerV2, E3D MS/TC

      VirtualBrownundefined 1 Reply Last reply Reply Quote 0
      • VirtualBrownundefined
        VirtualBrown @cosmowave
        last edited by

        @cosmowave Yes so changing the resolution from 0.012 to 0.05, making it coarser.

        Interesting, I hadn't considered the daemon file. There isn't too much in there, just some code to control the LEDs based on printer status. Do you think this could cause a problem?

        droftartsundefined 1 Reply Last reply Reply Quote 0
        • droftartsundefined
          droftarts administrators @VirtualBrown
          last edited by

          @VirtualBrown post your config.g and response to M122. If you have a daemon.g, post that too. What Duet hardware? A brief description of the printer may help, too.

          Ian

          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

          VirtualBrownundefined 1 Reply Last reply Reply Quote 0
          • VirtualBrownundefined
            VirtualBrown @droftarts
            last edited by

            @droftarts Hi, yeah so the printer is a Zortrax M200 I've converted, I added a Duet 3 Mini 5+. I think its got Nema 16s and mechanically runs very smoothly. I took the diagnostics this morning after printing some parts that have a few stutter artefacts overnight:

            IMG_4549.jpeg

            IMG_4550.jpeg

            === Diagnostics ===
            RepRapFirmware for Duet 3 Mini 5+ version 3.5.2 (2024-06-11 17:14:16) running on Duet 3 Mini5plus Ethernet (standalone mode)
            Board ID: BM90W-YV8LU-F65J0-409NL-1903Z-HKBR7
            Used output buffers: 1 of 40 (40 max)
            === RTOS ===
            Static ram: 103368
            Dynamic ram: 117356 of which 392 recycled
            Never used RAM 16300, free system stack 112 words
            Tasks: NETWORK(1,ready,23.0%,155) ETHERNET(5,nWait 7,0.1%,560) HEAT(3,nWait 1,0.1%,325) Move(4,nWait 6,3.7%,253) CanReceiv(6,nWait 1,0.0%,939) CanSender(5,nWait 7,0.0%,336) CanClock(7,delaying,0.0%,334) TMC(4,nWait 6,0.8%,100) MAIN(1,running,71.5%,623) IDLE(0,ready,0.0%,29) AIN(4,delaying,0.9%,255), total 100.0%
            Owned mutexes: HTTP(MAIN)
            === Platform ===
            Last reset 47:03:23 ago, cause: software
            Last software reset at 2024-09-12 10:32, reason: User, Gcodes spinning, available RAM 17836, slot 0
            Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00487000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
            Error status: 0x04
            Aux0 errors 0,0,0
            MCU revision 3, ADC conversions started 169425619, completed 169425617, timed out 0, errs 0
            MCU temperature: min 21.9, current 30.8, max 32.1
            Supply voltage: min 23.5, current 23.8, max 23.9, under voltage events: 0, over voltage events: 0, power good: yes
            Heap OK, handles allocated/used 99/0, heap memory allocated/used/recyclable 2048/668/668, gc cycles 310
            Events: 0 queued, 0 completed
            Driver 0: standstill, SG min 0, read errors 0, write errors 0, ifcnt 125, reads 53047, writes 4, timeouts 0, DMA errors 0, CC errors 0
            Driver 1: standstill, SG min 0, read errors 0, write errors 0, ifcnt 53, reads 53051, writes 0, timeouts 0, DMA errors 0, CC errors 0
            Driver 2: standstill, SG min 0, read errors 0, write errors 0, ifcnt 143, reads 53044, writes 6, timeouts 0, DMA errors 0, CC errors 0
            Driver 3: standstill, SG min 0, read errors 0, write errors 0, ifcnt 137, reads 53045, writes 6, timeouts 0, DMA errors 0, CC errors 0
            Driver 4: standstill, SG min 0, read errors 0, write errors 0, ifcnt 138, reads 53045, writes 6, timeouts 0, DMA errors 0, CC errors 0
            Driver 5: not present
            Driver 6: not present
            Date/time: 2024-09-14 09:36:11
            Cache data hit count 4294967295
            Slowest loop: 1550.99ms; fastest: 0.10ms
            === Storage ===
            Free file entries: 20
            SD card 0 detected, interface speed: 22.5MBytes/sec
            SD card longest read time 5.3ms, write time 215.4ms, max retries 0
            === Move ===
            DMs created 84, segments created 44, maxWait 5940785ms, bed compensation in use: mesh, height map offset 0.000, max steps late 1, min interval 0, bad calcs 0, ebfmin -0.00, ebfmax 1.00
            no step interrupt scheduled
            Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0
            === DDARing 0 ===
            Scheduled moves 2526188, completed 2526188, hiccups 0, stepErrors 0, LaErrors 0, Underruns [302, 1, 1064], CDDA state -1
            === DDARing 1 ===
            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
            Heater 0 is on, I-accum = 0.4
            Heater 1 is on, I-accum = 0.3
            === GCodes ===
            Movement locks held by null, null
            HTTP is ready with "m122 b0" 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
            File2 is idle in state(s) 0
            Queue2 is idle in state(s) 0
            Q0 segments left 0, axes/extruders owned 0x0000807
            Code queue 0 is empty
            Q1 segments left 0, axes/extruders owned 0x0000000
            Code queue 1 is empty
            === Filament sensors ===
            check 487148590 clear 138923008
            Extruder 0: pos 13756.29, errs: frame 2619 parity 10 ovrun 14317 pol 338 ovdue 0
            === CAN ===
            Messages queued 458274, received 0, lost 0, errs 241814300, boc 0
            Longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 26 (min 26), ts 254597/0/0
            Tx timeouts 0,0,254597,0,0,203677 last cancelled message type 30 dest 127
            === Network ===
            Slowest loop: 1549.47ms; fastest: 0.04ms
            Responder states: MQTT(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)
            HTTP sessions: 1 of 8
            = Ethernet =
            Interface state: active
            Error counts: 0 0 0 0 0 0
            Socket states: 2 2 2 2 2 0 0 0
            
            ; Configuration file for Duet 3 Mini 5+ (firmware version 3.3)
            ; executed by the firmware on start-up
            ;
            ; generated by RepRapFirmware Configuration Tool v3.3.10 on Mon May 23 2022 00:42:46 GMT+0100 (BST)
            
            ; General preferences
            M575 P1 S1 B57600                                  ; enable support for PanelDue
            G90                                                ; send absolute coordinates...
            M83                                                ; ...but relative extruder moves
            M550 P"Zortrax M200"                               ; set printer name
            
            ; Network
            M551 P"reprap"                                     ; set password
            M552 P0.0.0.0 S1                                   ; enable network and acquire dynamic address via DHCP
            M586 P0 S1                                         ; enable HTTP
            M586 P1 S0                                         ; disable FTP
            M586 P2 S0                                         ; disable Telnet
            
            ; Drives
            M569 P0.4 S0 D3 V0                                 ; physical drive 0.3 goes backwards
            M569 P0.3 S1 D3 V0                                 ; physical drive 0.2 goes backwards
            M569 P0.2 S0 D3 V0                                 ; physical drive 0.1 goes forwards
            M569 P0.0 S1 D3 V0                                 ; physical drive 0.0 goes forwards
            M584 X0.4 Y0.3 Z0.2 E0.0                           ; set drive mapping
            M350 X16 Y16 Z16 E16 I1                            ; configure microstepping with interpolation
            M92 X80.00 Y80.00 Z800.00 E120                     ; set steps per mm
            M566 X600.00 Y600.00 Z120 E10000 P1              ; set maximum instantaneous speed changes (mm/min)
            M203 X9000.00 Y9000.00 Z900.00 E10000             ; set maximum speeds (mm/min)
            M201 X1000.00 Y1000.00 Z400.00 E20000.00           ; set accelerations (mm/s^2)
            M906 X800 Y800 Z800 E450 I10                       ; set motor currents (mA)
            M84 S3                                             ; Disable motor idle current reduction
            
            ; Axis Limits
            M208 X0 Y0 Z0 S1                                   ; set axis minima
            M208 X200 Y188 Z180 S0                             ; set axis maxima
            
            ; Endstops
            M574 X1 S1 P"io6.in"                               ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io6.in
            M574 Y1 S1 P"io5.in"                               ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io5.in
            M574 Z1 S2                                         ; configure Z-probe endstop for low end on Z
            
            ; Z-Probe
            M950 S0 C"io3.out"                                 ; create servo pin 0 for BLTouch
            M558 P9 C"io3.in" H5 F200 A02 T6000                ; set Z probe type to bltouch and the dive height + speeds
            G31 P500 X0 Y-20 z0.37                             ; set Z probe trigger value, offset and trigger height - decrease to raise nozzel
            M557 X0:200 Y0:188 P20:20						   ; define mesh grid
            M671 X40:100:160 Y213:-13:213 P0.5                 ; define adjusting screw positions 
            
            ; Filament Monitor
            M591 D0 P3 C"io2.in" L25.87 S1                     ; filament monitor connected to io2.in calibrated with 25.87
            ;M591 D0                                           ; display filament sensor parameters for extruder drive 0
            
            ; Heaters
            M308 S0 P"temp0" Y"thermistor" T100000 B4138       ; configure sensor 0 as thermistor on pin temp0
            M950 H0 C"out0" T0                                 ; create bed heater output on out0 and map it to sensor 0
            M307 H0 B0 S1.00                                   ; 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
            M308 S1 P"temp1" Y"pt1000"                         ; configure sensor 1 as thermistor on pin temp1
            M950 H1 C"out1" T1                                 ; create nozzle heater output on out1 and map it to sensor 1
            M307 H1 B0 S1.00                                   ; disable bang-bang mode for heater  and set PWM limit
            M143 H1 S280                                       ; set temperature limit for heater 1 to 280C
            
            ; Fans
            M950 F0 C"out3" Q500                               ; create fan 0 on pin out3 and set its frequency
            M106 P0 S0 H-1                                     ; set fan 0 value. Thermostatic control is turned off
            M950 F1 C"out4" Q500                               ; create fan 1 on pin !out4 and set its frequency
            M106 P1 S1 H1 T45                                  ; set fan 1 value. Thermostatic control is turned on
            M950 F2 C"out5" Q500                               ; create fan 2 on pin out5 and set its frequency
            M106 P2 S0.5 H1:0 T45                              ; set fan 2 value. Thermostatic control is turned on
            M950 F3 C"out6" Q500                               ; create fan 3 on pin out6 and set its frequency
            M106 P3 S0.5 H1:0 T45                              ; set fan 3 value. Thermostatic control is turned on
            
            ; Tools
            M563 P0 S"Extruder1" D0 H1 F0                      ; define tool 0
            G10 P0 X0 Y0 Z0                                    ; set tool 0 axis offsets
            G10 P0 R0 S0                                       ; set initial tool 0 active and standby temperatures to 0C
            ;M572 D0 S0.1                					   ; set pressure advance to 0.1s
            
            ; Custom settings are not defined
            
            ; Miscellaneous
            M950 E0 C"led"                                     ; LED strip settings
            M912 P0 S-6.7
            M501                                               ; load saved parameters from non-volatile memory
            M911 S0 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000"  ; set voltage thresholds and actions to run on power loss
            
            
            
            ; LED control
            if {state.status} == "paused"
              M150 R255 U150 B070 P255 S21 F1  ; white
              M150 R255 U160 B000 P255 S21     ; yellow
              M300 S4000 P50 G4 P300 M300 S4000 P50 ; double beep
            elif {state.status} == "processing" || {state.status} == "busy"
              M150 R255 U150 B070 P255 S42    ; white
            elif {heat.heaters[0].current} > 32 || {heat.heaters[1].current} > 32
              M150 R255 U000 B000 P255 S04 F1 ; red
              M150 R255 U150 B070 P255 S13 F1 ; white
              M150 R255 U000 B000 P255 S08 F1 ; red
              M150 R255 U150 B070 P255 S13 F1 ; white
              M150 R255 U000 B000 P255 S04 F1 ; red
              M150 R255 U150 B070 P255 S03    ; white
            elif {state.status} == "idle"
              M150 R000 U255 B000 P255 S04 F1 ; green
              M150 R255 U150 B070 P255 S13 F1 ; white
              M150 R000 U255 B000 P255 S08 F1 ; green
              M150 R255 U150 B070 P255 S13 F1 ; white
              M150 R000 U255 B000 P255 S04 F1 ; green
              M150 R255 U150 B070 P255 S03    ; white
            else
              M150 R255 U150 B070 P255 S21 F1 ; white
              M150 R150 U0 B150 P255 S21      ; purple
            
            1 Reply Last reply Reply Quote 0
            • Phaedruxundefined
              Phaedrux Moderator
              last edited by Phaedrux

              Have you tried running a print without the daemon.g code?

              Is it always on curves?

              Z-Bot CoreXY Build | Thingiverse Profile

              VirtualBrownundefined 1 Reply Last reply Reply Quote 0
              • VirtualBrownundefined
                VirtualBrown @Phaedrux
                last edited by

                @Phaedrux Yes always on curves, and only with many parts on the bed and later in the print, like there's a cashe of memory that's getting filled.

                Its difficult to replicate as it requires the need to print quite a few curved parts (ovals or cylinders are the main culprits)...

                I can try with the deamon off, or is there a way to decrease the frequency which it runs?

                droftartsundefined 1 Reply Last reply Reply Quote 0
                • Phaedruxundefined
                  Phaedrux Moderator
                  last edited by

                  The default time for daemon.g to run is 10 seconds. To make it longer you can add a G4 delay at the end for longer than 10 seconds. Ex: G4 S20

                  Z-Bot CoreXY Build | Thingiverse Profile

                  1 Reply Last reply Reply Quote 0
                  • droftartsundefined
                    droftarts administrators @VirtualBrown
                    last edited by

                    @VirtualBrown It may be worth checking your SD card; it may be a slow read speed on Gcode with particularly short movements (ie curves with fine slicer resolution) is causing queue starvation. Check what class your current SD card is, how full it is, and what the read speeds are by seeing this page: https://docs.duet3d.com/en/User_manual/RepRapFirmware/SD_card#troubleshooting-sd-card-issues
                    We recommend SD cards of the following specification: https://docs.duet3d.com/en/User_manual/RepRapFirmware/SD_card#specification

                    Ian

                    Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                    VirtualBrownundefined 1 Reply Last reply Reply Quote 0
                    • VirtualBrownundefined
                      VirtualBrown @droftarts
                      last edited by

                      @droftarts Interesting, so the SD card is the original that came with the board and the interface speed looks as expected: 22.5 MB/s

                      But the read write test is very slow:
                      SD write speed for 10.0MByte file was 0.43MBytes/sec
                      Testing SD card read speed...

                      Doesn't seem to ever finish the read test.

                      Not much free space either:
                      SD card in slot 0: capacity 7.95GB, partition size 0.26GB, free space 0.06GB, speed 22.50MBytes/sec, cluster size 512 bytes

                      I'm not sure where its all gone, I regularly delete all the jobs.

                      Could be a nice fix as I have another 32 GB SD card, once I format it as FAT 32 do I just copy all the files over? Can I reformat it using Mac OS?

                      infiniteloopundefined droftartsundefined 2 Replies Last reply Reply Quote 0
                      • Phaedruxundefined
                        Phaedrux Moderator
                        last edited by Phaedrux

                        Your original card likely has a double partition arrangement. One for use with an SBC, and another smaller for use in standalone.

                        I'd suggest using a new, larger, faster card.

                        I would suggest using the official SD card association formatter tool. https://www.sdcard.org/downloads/formatter/

                        You can then copy the existing files from the SD card across. Keep it as a backup.

                        Z-Bot CoreXY Build | Thingiverse Profile

                        1 Reply Last reply Reply Quote 0
                        • infiniteloopundefined
                          infiniteloop @VirtualBrown
                          last edited by

                          @VirtualBrown said in Overloading the Duet 3 Mini 5+ with commands, causing stuttering:

                          once I format it as FAT 32 do I just copy all the files over? Can I reformat it using Mac OS?

                          Sure - works fine 👍

                          1 Reply Last reply Reply Quote 0
                          • droftartsundefined
                            droftarts administrators @VirtualBrown
                            last edited by

                            @VirtualBrown Also see my post here about SD cards bigger than 32GB: https://forum.duet3d.com/topic/36414/using-sd-cards-with-capacity-32gb

                            Ian

                            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                            1 Reply Last reply Reply Quote 0
                            • VirtualBrownundefined
                              VirtualBrown
                              last edited by

                              Thanks everyone for your help, it looks like a new SD card has fixed the problem, which is great!

                              droftartsundefined 1 Reply Last reply Reply Quote 0
                              • droftartsundefined
                                droftarts administrators @VirtualBrown
                                last edited by

                                @VirtualBrown Looking back at the M122 report you posted, I see:

                                === DDARing 0 ===
                                Scheduled moves 2526188, completed 2526188, hiccups 0, stepErrors 0, LaErrors 0, Underruns [302, 1, 1064], CDDA state -1
                                

                                It's the Underruns [302, 1, 1064] that will have been causing pauses.

                                The first underrun number is the number of 'lookahead' underruns, i.e. there were not enough spaces available in the move queue to do full lookahead. This type of underrun causes movement to be slower when there are very many short decelerating segments in succession. This should not cause a pause/stutter.

                                The second figure is the number of 'prepare' underruns. This indicates that the step interrupt service routine wanted another move, but although there was one it had not been prepared for execution. If the SD card was struggling to supply the next move, the processor may not have had time to prepare it for when it was needed. This may cause a stutter.

                                The third figure is the number of "no move" underruns. This indicates that the step interrupt routine wanted another move but none was available. If the SD card couldn't supply the next move in time to even be prepared, this will cause a stutter.

                                To check everything is okay now, start a print job, send M122. This will clear any existing errors. At the end of the job, send M122 again and see if it reports any of the above errors.

                                Probably just reformatting your original card would have cured it; I expect it was just running out of space, and causing files to be fragmented and taking longer to read.

                                Ian

                                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA