Slowdowns / Pauses (PID algorithm and PWM freq.?...)
-
@Argo said in Slowdowns with new PID algorithm and low PWM freq.:
............ The old PID didn't have the "R" value if I remember correctly.
That's correct. Being a sad old git, I always comment out the old PID values when I enter a new one. That way one can revert back easily if something doesn't work as expected.
So I also have ......
;M307 H0 A230.8 C2252.5 D20.3 S1.00 B0 V27.3 ; auto tune 06/08/2019
EDIT. In the above case, the "V" was irrelevant because it's a mains heater with SSR.
-
I did some research and found Prusa dev blog article about the topic:
"Prusa Dev Diaries #2: How we made the heatbed silent:"
https://blog.prusaprinters.org/dev-diary-2-how-we-made-the-heatbed-silent_30946/I don't know though what is transferable to Duet hardware.
They are also describing slow downs with specific frequencies. -
The slowdown are still there.
After changing the PWM frequency to 100hz I could probe without slowdowns but during a print they still happen. Then I removed the "Q" flag as my old Duet 2 config also didn't use it. But it still happens...
https://www.youtube.com/watch?v=1WkCpfci4O4
(don't mind the sewing machine in the background)
The slowdowns always happen at corners. For the next test I'll disable pressure advance.M122:
m122 === Diagnostics === RepRapFirmware for Duet 3 Mini 5+ version 3.3beta2 running on Duet 3 Mini5plus Ethernet (standalone mode) Board ID: ZDWF8-8296U-D65J0-40KMU-J603Z-77MM8 Used output buffers: 1 of 40 (13 max) === RTOS === Static ram: 99720 Dynamic ram: 101012 of which 200 recycled Never used RAM 39916, free system stack 110 words Tasks: NETWORK(ready,225) ETHERNET(notifyWait,569) HEAT(delaying,299) CanReceiv(notifyWait,943) CanSender(notifyWait,358) CanClock(delaying,339) TMC(notifyWait,100) MAIN(running,363) IDLE(ready,20) AIN(delaying,260) Owned mutexes: === Platform === Last reset 00:16:22 ago, cause: software Last software reset at 2021-03-14 14:00, reason: User, GCodes spinning, available RAM 39916, slot 1 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00000000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Aux1 errors 0,0,0 Supply voltage: min 0.0, current 24.2, max 24.5, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 99/1, heap memory allocated/used/recyclable 2048/158/122, gc cycles 0 Driver 0: position 24640, ok, SG min/max 0/432, read errors 0, write errors 1, ifcnt 68, reads 8503, writes 18, timeouts 0, DMA errors 0 Driver 1: position 19797, ok, SG min/max 0/432, read errors 0, write errors 1, ifcnt 65, reads 8290, writes 18, timeouts 213, DMA errors 0, failedOp 0x06 Driver 2: position 2159, standstill, SG min/max 0/312, read errors 0, write errors 1, ifcnt 59, reads 8503, writes 15, timeouts 3, DMA errors 0, failedOp 0x71 Driver 3: position 0, standstill, SG min/max 0/386, read errors 0, write errors 1, ifcnt 50, reads 8252, writes 12, timeouts 256, DMA errors 0, failedOp 0x41 Driver 4: position 0, standstill, SG min/max 0/314, read errors 0, write errors 1, ifcnt 59, reads 8506, writes 15, timeouts 0, DMA errors 0 Driver 5: position 0, assumed not present Driver 6: position 0, assumed not present Date/time: 2021-03-14 14:17:03 Cache data hit count 1406805765 Slowest loop: 158.68ms; fastest: 0.11ms === Storage === Free file entries: 9 SD card 0 detected, interface speed: 22.5MBytes/sec SD card longest read time 7.2ms, write time 148.3ms, max retries 0 === Move === DMs created 83, maxWait 158038ms, bed compensation in use: mesh, comp offset 0.000 === MainDDARing === Scheduled moves 10999, completed moves 10963, hiccups 0, stepErrors 0, LaErrors 0, Underruns [1, 0, 18], CDDA state 3 === 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, chamberHeaters = -1 -1 Heater 0 is on, I-accum = 0.4 Heater 1 is on, I-accum = 0.8 === GCodes === Segments left: 1 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is doing "G1 F1800.000" 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 not empty: Queued 'M106 S249.9' for move 10985 1 of 16 codes have been queued. === Filament sensors === Extruder 0 sensor: ok === CAN === Messages queued 9142, send timeouts 9138, received 0, lost 0, longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 17 (min 16) Last cancelled message type 4514 dest 127 === Network === Slowest loop: 148.43ms; fastest: 0.03ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 1 of 8 - Ethernet - State: active Error counts: 0 0 0 0 0 Socket states: 2 2 2 2 2 0 0 0
config.g
; General preferences G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves ; Network M550 P"Pruset II MK3s" ; Set machine name M552 S1 ; Enable network ;*** Access point is configured manually via M587 M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Disable FTP M586 P2 S0 ; Disable Telnet M575 P1 S1 B57600 ; Panel Due ; Drive Mappings M569 P0.0 S1 V0 ; Drive 0: X Axis M569 P0.1 S0 V0 ; Drive 1: Y Axis M569 P0.2 S1 V0 ; Drive 2: Z Axis M569 P0.3 S1 V0 ; Drive 3: E Axis M569 P0.4 S1 V0 ; Drive 4: E1 used for Z1 ; Motor remapping for dual Z and axis Limits M584 X0 Y1 Z2:4 E3 ; two Z motors connected to driver outputs Z and E1 M671 X-37:287 Y0:0 S10 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis ; Micrpstepping and Speed M350 X32 Y32 E16 Z16 I1 ; Configure microstepping with interpolation M92 X200.00 Y200.00 Z400.00 E415.00 ; Set steps per mm ; Speeds, Acceleration and Jerk M566 X240.00 Y240.00 Z24.00 E270.00 P1 ; Set maximum instantaneous speed changes (mm/min) M203 X7200.00 Y7200.00 Z723.00 E1200.00 ; Set maximum speeds (mm/min) M201 X1250.00 Y1250.00 Z1000.00 E500.00 ; Set accelerations (mm/s^2) M204 P1250.0 T1250.0 ; set print and travel accelerations (mm(s^2) ; Motor currents M906 X800.00 Y850.00 Z700.00 E550.00 I15 ; Set motor currents (mA) and motor idle factor in percent M84 S30 ; Set idle timeout ; Printer geometry M208 X0:250 Y-4:215 Z-0.5:205 ; Axis Limits M564 H0 ; allow unhomed movement ; Endstops for each Axis M574 X1 S3 ; Set endstops controlled by motor load detection M574 Y1 S3 ; Set endstops controlled by motor load detection ; Stallgaurd Sensitivy M915 X S-2 F0 H200 R0 ; Set X axis Sensitivity M915 Y S0 F0 H200 R0 ; Set y axis Sensitivity ; Input Shaper ;M593 F58.5 P4 S0.2 ; Input Shaping 3.3/3.4 M593 F58.5 ; Z-Probe Super PINDA M574 Z1 S2 ; Set endstops controlled by probe M558 P5 C"^io3.in" I1 H1 F570 T6000 A50 S0.005 ; PINDA ; Mesh Grid and Sheets M557 X24:233 Y15:195 P8 ; Define mesh grid for probing ;G31 P1000 X23 Y5 Z1.530 ; Textured Sheet G31 P1000 X23 Y5 Z1.215 ; PEI Sheet ; Heatbed Heaters and Thermistor Bed M308 S0 P"temp0" Y"thermistor" T100000 B4725 C7.060000e-8 ; Set thermistor + ADC parameters for heater 0 Bed M950 H0 C"out0" T0 ; Creates Bed Heater M307 H0 R0.276 C365.2 D12.50 S1.00 V24.0 B0 ; PID 3.2 M140 H0 ; Bed uses Heater 0 M143 H0 S120 ; Set temperature limit for heater 0 to 120C Bed ; HotEnd Heaters and Thermistor HotEnd M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.060000e-8 ;define E0 temperature sensor e3d M950 H1 C"out1" T1 ; Create HotEnd Heater M307 H1 R2.301 C162.7:122.2 D7.10 S1.00 V24.3 B0 M143 H1 S285 ; Set temperature limit for heater 1 to 285C HotEnd M302 S185 R185 ; Fans M950 F1 C"out5" Q100 ; Creates HOTEND Fan M106 P1 T45 S210 H1 ; HOTEND Fan Settings M950 F0 C"out6" Q100 ; Creates PARTS COOLING FAN M106 P0 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off PARTS COOLING FAN ; Tools M563 P0 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 ; StealthCop calibration M17 G4 P150 G1 X1 Y1 Z1 G4 S2 M84 ; disable motors ; Filament Sensor Logic M98 P"0:/macros/02_Functions/StartupFilamentSensorCheck" ; Runout Sensor Logic: Startup with filament = runout sensor active Startup without filament = autoload active
-
@Argo Yes, your extruder jerk is really low and there is an interaction between extruder jerk and pressure advance. So if disabling PA cures the pauses, whack the extruder jerk up. It does no harm to set it really high as there are very few instances when it would ever come into play. I have mine set to 3600 (you have 270). I'd also whack the extruder acceleration up too. If it's too low, then it could slow down any XYE print moves. Similarly to extruder jerk, I set extruder acceleration really high (6000) so that it's out of the way.
Edit. .......and changing jerk policy to 0 might help.
-
Disabling PA does not cure the problem. When it happens it always pauses directly on the apex of a corner.
With my Duet 2 I never had problem with jerk policy set to 1.
The problems come and go with this new board though.Timeline with issues so far:
- Duet 3 Mini arrived - flashed latest stable 3.3.2 release: homing brutally crashes. In the forums i found a thread about a sensorless homing bug in 3.2.2. Version 3.3b1 fixes the issue
- 3.3b1 flashed: extruder is skipping steps / under-extrudes a lot. So I took the source code of 3.2.2 and took the one file that fixes sensorless homing from 3.3b1 and compiled my own working 3.2.2 and reported the bug on the forum. Printer worked like a charm (and I should've better stopped here )
- 3.3.b2 was released so I wanted to give it a try. Same issue as with 3.3b1. Flashed back to 3.2.2 and everything worked as expected. Then I got some instructions on how to test 3.3b2 for specific issues so I reflashed 3.3b2 and the underextrusion issue was gone, which I can't really explain why.
- New issue since then with 3.3b2 and 3.2.2: Slowdowns during probing and short pauses during a print. Adjusting to a higher PWM frequency fixed the probing slowdowns but the pauses during the print are still there.
Something is still off here. I was also expecting that there was a hidden gcode somewhere in the Slicer start gcode that enables debugging during a print but setting PWM to 10hz outside a print could reproduce the slowdowns during G29 probing. I also have no daemon.g with some messy code that might draw CPU power from the board.
Speaking of CPU power. Is there a way to see how much CPU power is used? I never really bothered with debugging but maybe that might help. -
@Argo I appreciate that you used jerk policy 1 before with Duet 2 but have you tried setting it to 0 with this board/firmware combination? Does the slow down correspond with layer change? Alternatively, do you use Z hop during retraction? - if so try disabling it. I'd be inclined to disable all the "embellishments" like input shaping, mesh grid, stall guard to see if that makes a difference and of so, then re-enable them one at a time.
-
Thanks for your help. Of course I tried your suggestion before posting.
Right now I've disabled / changed the following features:- input shaper (DAA) off.
- dynamic fan speed (slicer)
- jerk policy sest to 0
The issue does not happen during a layer change. It happens always at the outer perimeter at the on a test Voron Cube.
It also happens at the exact same spot when printing the outer perimeter.Right now I'm suspecting a Slicer issue/bug to be honest. The Voron cube has many overhangs paired with 45° corners.
The problem with those problems I'm having that they can be quite similar but have nothing to do with each other, like the problem with the probing slow downs when the PWM frequency is low. My thought was slow down, ok, when the print is having slow downs it must be the same issue but now I think it isn't.
I'll do another print and disable all overhang detection features in the Slicer software and report back.
EDIT.
Yes. The slow down during the print was a actual bug with the Slicer software and it's overhang detection and has nothing to do with the probing slowdowns when having a low PWM bed frequency. Right now I'm using 100hz for heater and fans. I don't know if that makes sense for the electronics of the board but probing does not slow down anymore with that frequency.
-
@Argo It's an easy trap to fall into. Problem A is caused by xyz, problem B looks just like A so one naturally thinks the cause is the same xyz,
So, in summary you just have weird behaviour when probing and when the bed PWM frequency is set to 10Hz. Increasing the bed PWM frequency to 100 Hz fixes the problem. Is that correct?
If so, then I'm not likely to be able to help because I don't use a Z probe (long story but I use a kinematic mount and have things arranged such that the nozzle acts as a switch for homing Z - the bed is mechanically flat and level so I don't use any form of firmware compensation).
But to help others help you, I suggest you provide more details. i.e. the board type, firmware version, what type of probe you use, etc. And maybe a short video clip showing the behaviour at 10Hz and again at 100Hz.
-
@deckingman
The pause during print has been fixed. It was a bug in the Slicer softwareTaking your advice to sum the issue up:
Slowdown during probes with low PWM bed frequency. After read the recommendation in the forum to use 10hz it began to have slowdowns during the probing sequence.Printer: Prusa MK3*ish printer. With Super PINDA probe. Mk3 heated bed 24v.
Board: FIRMWARE_NAME: RepRapFirmware for Duet 3 Mini 5+ FIRMWARE_VERSION: 3.3beta2 ELECTRONICS: Duet 3 Mini5plus Ethernet FIRMWARE_DATE: 2021-03-10 13:41:12
Bed PWM frequency at 10hz:
https://www.youtube.com/watch?v=OEk7ahEcNFs
By hearing at the tone you notice tiny little hiccups / slowdowns. Those are gone going up to 100hz PWM for the bed heater.
-
@Argo I’d guess the bed pwm is interfering with the probe. You can turn off heaters when probing, using the B parameter of M558. See https://duet3d.dozuki.com/Wiki/Gcode#Section_M558_in_RepRapFirmware_Num_3
Ian