Solved 3.5.0rc1: Input shaping causes layer shifts!?
-
@gloomyandy first of all (a little offtopic), thanks for forwarding that M915 topic to droftarts! I am actually quite curious what that value means - and how to use it. Maybe an example in the documentation would help there... I suspected you might need to convert the binary or hex value that you can get from the datasheet to a decimal value - but I could not find any confirmation about this, not even here in the forum.
But back to topic: the layer shift is almost exactly in the same area as it was with the original current settings and Spreadcycle enabled. Thus, with this new finding, I suspect that it is the same as noted initially with the tests with RC2 and StealthChop - layer shifts happen, but not in 100% of the cases. Thus, I deem the layer shift not happening at that lower height with the currents slightly risen just a lucky coincidence.
To sum up the results so far as I see them (anything you might read from the M122 reports above not included):
- Stealthchop and Input shaping enabled gives a "bang" and a significant mechanical impulse in y direction at 5.5...5.65mm height, sometimes resulting in a y axis layer shift. The gcode shows quite increased short motions there.
- Spreadcycle and Input shaping results often (but not always) in x layer shifts starting at about 2.5mm - without any obvious reason from the gcode. As might be expected, x axis layer shifts of one hotend do not affect the second one, therefore a miscalculation somewhere can be excluded. Until now, every part printed with that setup up that height showed a y layer shift at 5.5...5.65mm. Higher currents do not seem to reliably change this.
- as soon as Input shaping is deactivated, the part is printed fine, both with StealthChop and Spreadcycle.
The test part I print is indeed the gcode file attached to the first post. y direction is along the longer side of the part, x direction is along the shorter side. (edit: I might need to slightly change the temperatures specified in there soon however since the original filament rolls I used for that file are getting empty now...)
(2nd edit: remark about x layer shift not affecting 2nd hotend added, impulse accompanying bang added)
-
@NeoDue thanks for your report. Do you still get a bang at the point of the layer shift when running in spreadcycle mode?
-
@dc42 Yes, I still get that sound with Spreadcycle (edit) and Input shaping enabled (/edit) (noted above in the post about the first test with Spreadcycle) but I indeed forgot to mention that in the summary. It seems in relation to the printing noise more silent though. (On the other hand, the printer is quite noisy with Spreadcycle so that might the cause for the observation)
-
@NeoDue thanks, a bang that isn't related to stealthchop could mean that something is wrong with the step pulse train. However, your M122 reports all show the maximum late steps as 1, so it's not caused by steps being scheduled for times after the move is supposed to finish.
-
@NeoDue Just to confirm, when you get the layer shift at 2.5mm in spreadcycle, do you hear a bang then or is that only at the layer shift at 5.5mm?
I had a look at the gcode and I could not see anything that was out of the ordinary around the 2.5mm layer height. Could you provide some information about your printer and the print? It looks like it may be an idex of some sort? With your test print I think you use both tools, but looking at the gcode it looks like the first layer shift at 2.5mm happens before the second tool is used, is that correct?
-
@NeoDue Also what input shaper settings are you currently using when running this test?
-
@NeoDue I've tried printing your file twice on my E3D toolchanger and didn't get any layer shifts or hear any bangs up to 6mm height, which is where I stopped it. However the adhesion between the top part and the bed wasn't sufficient so that part broke away. I saw it curling up a little before it broke away.
I wasn't using the same config.g settings as you are, so I'll try again with those settings. Please provide your up to date config.g file including the input shaping setting you are using.
-
@gloomyandy Sorry! I forget that you have a lot of communications here and therefore probably do not remember previous discussions
The printer is a Snapmaker J1 (an IDEX printer indeed) where I replaced the original Marlin controller with the Duet. Apart from that, it is mostly as delivered from the factory - exceptions are parts of the hotends and the filament sensors, all not relevant in our case.
The steppers are from a company called Mocotech. You cannot find much about those since they do not seem to sell them separately, but I managed to dig out a datasheet for the y stepper:
Looks pretty standard to me...The print is a battery box that was sliced in Prusaslicer. Black is printed with hotend 1, green with hotend 2. I did not choose this part deliberately, it simply was the first part I printed after activating Input shaping.
I have tested both of the two Input shaping settings noted in my config.pro, both behave identical in terms of the issue. The bang only happens at the 5.5...5.65mm y axis layer shift, but due to the construction of the printer (classic cartesian XY head printer, just a second printhead added), Y has a signifcantly higher mass which ends up in a much higher impulse than such an effect would have if it occurred on the X axis.
-
@dc42 did you use the config.pro from the post https://forum.duet3d.com/post/332000 ?
Both M593 Input shaping commands are included there and one is active. (There are two since the results from the plugin suggest these two produce identical results and I want to choose the one that creates better results in reality).
-
@dc42 said in 3.5.0rc1: Input shaping causes layer shifts!?:
thanks, a bang that isn't related to stealthchop could mean that something is wrong with the step pulse train. However, your M122 reports all show the maximum late steps as 1, so it's not caused by steps being scheduled for times after the move is supposed to finish.
@dc42 thanks for that information. If I translate "step pulse train" correctly, something like this is what I would suspect, judging from what I see. Are there any thinkable cases where such a delayed step might happen without showing up in M122?
I also have an oscilloscope here which is however limited to 10MHz / 1MHz for single shots due to its age (it is an old Tek222). If it helps, I could try to measure something - stepper currents or such, but I am afraid my rusty electronics knowledge needs advice on what might be appropriate or what might be harmful (well, apart from the obvious risk of creating a short circuit... maybe some effects of the capacity of the probe or such ...?
-
@gloomyandy just an update on the M915 T topic: the current rc3 changelog makes it clear: "[Duet 3 MB6HC] [Duet 3 EXP3HC] [Duet 3 EXP1HCL] If you were using the T parameter of the M915 command, this value was incorrectly being written to the stall sensitivity register in previous releases. It is now written to the correct register (COOLCONF)."
This means your initial thought was right after all and the documentation at https://docs.duet3d.com/en/User_manual/Connecting_hardware/Motors_tuning#configuring-coolstep is wrong
-
@NeoDue Yes we had a discussion about this offline @droftarts I think this section (which mentions using M915 T) may need reviewing: https://docs.duet3d.com/en/User_manual/Connecting_hardware/Motors_tuning#stealthchop-tuning
@NeoDue I thinik that this section is now correct: https://docs.duet3d.com/en/User_manual/Connecting_hardware/Motors_tuning#configuring-coolstep
-
-
@gloomyandy Sorry, haven't had a chance to update it yet!
Ian
-
@droftarts May I ask you to move the latest posts regarding M915 in this thread to the thread I just created? https://forum.duet3d.com/topic/34802/how-to-use-m915-t-parameter
That might help others to find that information more easily.
-
All, if you have been getting layer shifts associated with enabling input shaping when using 3.5 beta and RC versions, please try the binaries at https://www.dropbox.com/scl/fo/p0136wx04h8xf6ejwdnn9/h?rlkey=efrfwyb6o5tqid11gustz3uvy&dl=0. I found and fixed a possible cause of these, but as I can't reproduce the problem I don't know whether the issue is fixed or not.
-
@dc42 thanks a lot for your detective work! I will upgrade and test this weekend!
-
@dc42 I think I’m suffering from the same issue. This new version didn’t fix my layer shift issue.
-
@adrian please provide a M122 report taken after the layer shifts occur. Note, if you run M122 more than once, then only the first M122 report after the layer shifts contains the data that I am interested in.
-
This post is deleted! -
code_text ```=== Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.5.0-rc.3+ (2024-02-01 12:47:37) running on Duet 3 MB6HC v1.02 or later (standalone mode) Board ID: 08DJM-956BA-NA3TJ-6J1F8-3S06Q-1U86S Used output buffers: 7 of 40 (40 max) === RTOS === Static ram: 155208 Dynamic ram: 124836 of which 592 recycled Never used RAM 61708, free system stack 134 words Tasks: NETWORK(1,ready,504.0%,156) ETHERNET(5,nWait 7,0.6%,117) ACCEL(6,nWait 6,0.0%,344) HEAT(3,nWait 6,0.7%,321) Move(4,nWait 6,36.1%,218) CanReceiv(6,nWait 1,0.0%,940) CanSender(5,nWait 7,0.0%,334) CanClock(7,delaying,0.2%,334) TMC(4,nWait 6,186.1%,54) MAIN(1,running,222.1%,103) IDLE(0,ready,1.1%,30), total 950.9% Owned mutexes: LwipCore(NETWORK) === Platform === Last reset 03:22:06 ago, cause: software Last software reset at 2024-02-02 12:11, reason: User, Gcodes spinning, available RAM 65356, slot 2 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x04 Aux0 errors 0,0,0 MCU temperature: min 31.8, current 34.0, max 34.6 Supply voltage: min 23.9, current 24.1, max 24.2, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 11.7, current 12.0, max 12.7, under voltage events: 0 Heap OK, handles allocated/used 99/1, heap memory allocated/used/recyclable 2048/56/32, gc cycles 0 Events: 0 queued, 0 completed Driver 0: ok, SG min 0, mspos 918, reads 13068, writes 19 timeouts 0 Driver 1: standstill, SG min 0, mspos 888, reads 13069, writes 19 timeouts 0 Driver 2: ok, SG min 0, mspos 386, reads 13069, writes 19 timeouts 0 Driver 3: standstill, SG min 0, mspos 952, reads 13065, writes 23 timeouts 0 Driver 4: standstill, SG min 0, mspos 952, reads 13065, writes 23 timeouts 0 Driver 5: standstill, SG min 0, mspos 952, reads 13066, writes 23 timeouts 0 Date/time: 2024-02-02 15:33:55 Slowest loop: 234.18ms; fastest: 0.05ms === Storage === Free file entries: 18 SD card 0 detected, interface speed: 25.0MBytes/sec SD card longest read time 21.9ms, write time 0.0ms, max retries 0 === Move === DMs created 125, segments created 33, maxWait 1632841ms, bed compensation in use: mesh, height map offset 0.000, max steps late 1, min interval -6296, bad calcs 0, ebfmin -1.00, ebfmax 1.00 next step interrupt due in 156 ticks, disabled Moves shaped first try 14497, on retry 14831, too short 42037, wrong shape 89748, maybepossible 5393 === DDARing 0 === Scheduled moves 188118, completed 188083, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state 3 === 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 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters 2 -1 -1 -1, ordering errs 0 Heater 0 is on, I-accum = 0.2 Heater 1 is on, I-accum = 0.3 Heater 2 is on, I-accum = 0.0 === GCodes === Movement locks held by null, null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is doing "G1 F12000" 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, sync state 1 Queue2 is idle in state(s) 0 Q0 segments left 1, axes/extruders owned 0x80000007 Code queue 0 is empty Q1 segments left 0, axes/extruders owned 0x0000000 Code queue 1 is empty === CAN === Messages queued 109136, received 0, lost 0, errs 57612837, boc 0 Longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 50 (min 50), ts 60632/0/0 Tx timeouts 0,0,60631,0,0,48503 last cancelled message type 30 dest 127 === Network === Slowest loop: 219.37ms; fastest: 0.03ms Responder states: MQTT(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0) HTTP sessions: 3 of 8 = Ethernet = Interface state: active Error counts: 0 0 8 1 0 0 Socket states: 5 2 2 2 2 0 0 0 === WiFi === Interface state: disabled Module is disabled Failed messages: pending 0, notrdy 0, noresp 0 Socket states: 0 0 0 0 0 0 0 0 === Multicast handler === Responder is inactive, messages received 0, responses 0 2/2/2024, 3:33:55 PM M122 === Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.5.0-rc.3+ (2024-02-01 12:47:37) running on Duet 3 MB6HC v1.02 or later (standalone mode) Board ID: 08DJM-956BA-NA3TJ-6J1F8-3S06Q-1U86S Used output buffers: 7 of 40 (40 max) === RTOS === Static ram: 155208 Dynamic ram: 124836 of which 592 recycled Never used RAM 61708, free system stack 134 words Tasks: NETWORK(1,ready,504.0%,156) ETHERNET(5,nWait 7,0.6%,117) ACCEL(6,nWait 6,0.0%,344) HEAT(3,nWait 6,0.7%,321) Move(4,nWait 6,36.1%,218) CanReceiv(6,nWait 1,0.0%,940) CanSender(5,nWait 7,0.0%,334) CanClock(7,delaying,0.2%,334) TMC(4,nWait 6,186.1%,54) MAIN(1,running,222.1%,103) IDLE(0,ready,1.1%,30), total 950.9% Owned mutexes: LwipCore(NETWORK) === Platform === Last reset 03:22:06 ago, cause: software Last software reset at 2024-02-02 12:11, reason: User, Gcodes spinning, available RAM 65356, slot 2 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x04 Aux0 errors 0,0,0 MCU temperature: min 31.8, current 34.0, max 34.6 Supply voltage: min 23.9, current 24.1, max 24.2, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 11.7, current 12.0, max 12.7, under voltage events: 0 Heap OK, handles allocated/used 99/1, heap memory allocated/used/recyclable 2048/56/32, gc cycles 0 Events: 0 queued, 0 completed Driver 0: ok, SG min 0, mspos 918, reads 13068, writes 19 timeouts 0 Driver 1: standstill, SG min 0, mspos 888, reads 13069, writes 19 timeouts 0 Driver 2: ok, SG min 0, mspos 386, reads 13069, writes 19 timeouts 0 Driver 3: standstill, SG min 0, mspos 952, reads 13065, writes 23 timeouts 0 Driver 4: standstill, SG min 0, mspos 952, reads 13065, writes 23 timeouts 0 Driver 5: standstill, SG min 0, mspos 952, reads 13066, writes 23 timeouts 0 Date/time: 2024-02-02 15:33:55 Slowest loop: 234.18ms; fastest: 0.05ms === Storage === Free file entries: 18 SD card 0 detected, interface speed: 25.0MBytes/sec SD card longest read time 21.9ms, write time 0.0ms, max retries 0 === Move === DMs created 125, segments created 33, maxWait 1632841ms, bed compensation in use: mesh, height map offset 0.000, max steps late 1, min interval -6296, bad calcs 0, ebfmin -1.00, ebfmax 1.00 next step interrupt due in 156 ticks, disabled Moves shaped first try 14497, on retry 14831, too short 42037, wrong shape 89748, maybepossible 5393 === DDARing 0 === Scheduled moves 188118, completed 188083, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state 3 === 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 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters 2 -1 -1 -1, ordering errs 0 Heater 0 is on, I-accum = 0.2 Heater 1 is on, I-accum = 0.3 Heater 2 is on, I-accum = 0.0 === GCodes === Movement locks held by null, null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is doing "G1 F12000" 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, sync state 1 Queue2 is idle in state(s) 0 Q0 segments left 1, axes/extruders owned 0x80000007 Code queue 0 is empty Q1 segments left 0, axes/extruders owned 0x0000000 Code queue 1 is empty === CAN === Messages queued 109136, received 0, lost 0, errs 57612837, boc 0 Longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 50 (min 50), ts 60632/0/0 Tx timeouts 0,0,60631,0,0,48503 last cancelled message type 30 dest 127 === Network === Slowest loop: 219.37ms; fastest: 0.03ms Responder states: MQTT(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0) HTTP sessions: 3 of 8 = Ethernet = Interface state: active Error counts: 0 0 8 1 0 0 Socket states: 5 2 2 2 2 0 0 0 === WiFi === Interface state: disabled Module is disabled Failed messages: pending 0, notrdy 0, noresp 0 Socket states: 0 0 0 0 0 0 0 0 === Multicast handler === Responder is inactive, messages received 0, responses 0