Extruder drive lag with toolboard



  • I am building an idex printer with two toolboards, I have now everything set up but I have a weird issue.

    When printing with tool 0, all extruder move have some lag, like 2-3 seconds.

    So for example, if I run the test gcode below, (which is the start of my print), the tool will do all the X/Y/Z movements and after doing the last Z move, I see the extruder doing all the moves (retract, unretract, feeding a bit and then retract).

    If I replace T0 with T1, I do not have this issue.

    G21 ; set units to millimeters
    G90 ; use absolute coordinates
    M83 ; use relative distances for extrusion
    T0
    ; Filament gcode
    ;LAYER_CHANGE
    ;Z:0.3
    ;HEIGHT:0.3
    G1 Z0.300 F9000.000
    G10 ; retract
    G1 Z0.800
    G1 X111.276 Y117.787
    G1 Z0.300
    G11 ; unretract
    ;TYPE:Skirt
    G1 F1800.000
    G1 X114.222 Y115.172 E0.13072
    G1 X116.684 Y113.399 E0.10068
    G1 X119.501 Y111.731 E0.10864
    G1 X122.722 Y110.176 E0.11868
    G1 X125.913 Y108.942 E0.11354
    G1 X129.968 Y107.738 E0.14036
    G1 X134.167 Y106.909 E0.14205
    G1 X137.743 Y106.511 E0.11941
    G1 X141.366 Y106.421 E0.12026
    G1 X145.785 Y106.741 E0.14703
    G1 X149.199 Y107.315 E0.11486
    G1 X152.765 Y108.257 E0.12241
    G1 X156.707 Y109.746 E0.13983
    G1 X159.682 Y111.213 E0.11007
    G1 X162.488 Y112.952 E0.10954
    G1 X165.726 Y115.482 E0.13636
    G1 X166.857 Y116.551 E0.05165
    G1 X169.026 Y118.918 E0.10655
    G10
    G1 Z5.00 F9000.000
    
    

    Here is my config:

    ; General preferences
    ; use millimeters
    G21
    ; send absolute coordinates
    G90                                                   
    ; but relative extruder moves
    M83                                                   
    ; set printer name
    M550 P"Lili"   
    M551 P"print-secret-564738"                                     
    
    ; ######################################
    ; Drives
    ; Y and two Z go forward
    M569 P0.0 S1      
    M569 P0.1 S1       
    M569 P0.2 S1        
    
    ; X and U go backward
    M569 P0.3 S0    
    M569 P0.4 S0   
    
    ; extruders go forward
    M569 P20.0 S1
    M569 P21.0 S1
    
    
    M584 Y0.0 Z0.1:0.2 X0.3 U0.4 E20.0:21.0                     ; Drive mapping U is second extruder X (IDEX)
    
    M350 X16 U16 Y16 Z16 E16:16 I1                              ; configure microstepping with interpolation
    
    M92 X80.00 U80.0 Y80.60 Z403.02 E830.00:830.00              ; set steps per mm
    
    M566 X420.00 U420.00 Y420.00 Z12.00 E60:60                  ; set maximum instantaneous speed changes (mm/min)
    
    M203 X12000.00 U12000.00 Y12000.00 Z1800.00 E3600:3600      ; set maximum speeds (mm/min)
    
    M201 X500.00 U500.00 Y500.00 Z30.00 E250:250                ; set accelerations (mm/s^2)
    
    M906 X2000 U2000 Y2000 Z2000 E800:800 I30                   ; set motor currents (mA) and motor idle factor in per cent
    
    
    M84 S30                                                     ; Set idle timeout
    
    ; Axis Limits
    M208 X-70 U0 Y0 Z0 S1                                       ; set axis minima
    M208 X260 U330 Y300 Z260 S0                                 ; set axis maxima
    
    ; ######################################
    ; Endstops
    M574 Y1 S1 P"io3.in"
    ;M574 Y2 S1 P"io2.in"                                 ; multiple endspot on single axis not possible
    M574 Z2 S1 P"io0.in+io1.in"
    M574 X1 S1 P"20.io1.in"
    M574 U2 S1 P"21.io1.in"
    
    ; Z-Probe
    M558 P9 C"^20.io0.in" H5 F120 T6000 A10 R0.75 S0.02
    M950 S0 C"20.io0.out"
    G31 P500 X-34.8 Y-15.9 Z3.95
    
    ; Probe grid
    M557 X-20:220 Y0:280 P4
    
    ; Bed Heaters
    M308 S0 P"temp0" Y"thermistor" T100000 B3950          ; 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 A299.4 C395.3 D4.4 S1.0 V24.3 B0              ; configure bed heater (values from auto tune)
    M140 H0                                               ; map heated bed to heater 0
    M143 H0 S120                                          ; set temperature limit for heater 0 to 120C
    
    ; ######################################
    ; Tool head 0 (board address 20)
    ; thermistor and heater
    M308 S1 P"20.temp0" Y"thermistor" T100000 B4725 C7.06e-8 
    M950 H1 C"20.out0" T1                                    
    M307 H1 B0 S1.00                                         
    M143 H1 S280                                          
    
    ; part fan
    M950 F0 C"20.out1+out1.tach" Q50                         
    M106 P0 S0 H-1
    
    ; hot end fan
    M950 F1 C"20.out2+out2.tach" Q50                       
    M106 P1 S220 T45 H1
    
    ; tool
    M563 P0 D0 H1 F0
    G10 P0 X0 Y0 Z0 U0 E0 S0 R0
    
    
    ; ######################################
    ; Tool head 1 (board address 21)
    ; thermistor and heater
    M308 S2 P"21.temp0" Y"thermistor" T100000 B4725 C7.06e-8 
    M950 H2 C"21.out0" T2                                    
    M307 H2 B0 S1.00                                         
    M143 H2 S280                                          
    
    ; part fan
    M950 F2 C"21.out1+out1.tach" Q50                         
    M106 P2 S0 H-1
    
    ; hot end fan
    M950 F3 C"21.out2+out2.tach" Q50                       
    M106 P3 S220 T45 H2
    
    ; tool
    M563 P1 D1 H2 F2 X3
    G10 P1 X0 Y0 Z0.1 U0 E0 S0 R0
    
    
    ; Load bed compensation
    G29 S1
    
    M207 P0 S1.0 F2400 Z0.5  ; Retraction configuration tool 0
    M207 P1 S1.0 F2400 Z0.5  ; Retraction configuration tool 1
    
    T0 ; Select default tool
    
    
    M122 B20
    Diagnostics for board 20:
    Board TOOL1LC firmware 3.1.0 (2020-05-15b1)
    Never used RAM 8.2Kb, max stack 652b
    HEAT 1040 CanAsync 1420 CanRecv 1384 TMC 188 AIN 524 MAIN 2284
    Last reset 00:32:29 ago, cause: software
    Driver 0: standstill, SG min/max 0/496, read errors 0, write errors 0, ifcount 66, reads 29556, writes 2, timeouts 0, DMA errors 0, failedOp 0xff
    Moves scheduled 578, completed 578, hiccups 0
    VIN: 24.3V
    MCU temperature: min 45.1C, current 48.0C, max 50.4C
    Ticks since heat task active 37, ADC conversions started 1949470, completed 1949469, timed out 0
    Last sensors broadcast 00000002 found 1 57 ticks ago
    Free CAN buffers: 36
    NVM user row b1d088a9 fffff8bb f9fef123 caebd74d
    TSENS 0012b9 GAIN 0148b6 OFFS 0021f7 CAL 1f25
    

  • administrators

    That seems odd! Are both tool boards running the same firmware version? Do the red status LEDs on both of them blink in sync?



  • @dc42 Yes and yes.


  • administrators

    You have T0 at the end of config.g, so tool 0 is already selected when you run the file. If after booting you send command T1 and then run the file, does that make a difference?



  • Ok, after tinkering and trying to understand what was causing the issue, I found it. It's the hot end fan.

    I did more tests and realized that under some conditions, I did not have the issue with either carriage. And finally, I pin pointed it to fan.

    If the temperature is above 45° on the carriage and fan on -> issue
    If below and fan off -> no issue. (45° is what I configured with M106).


  • administrators

    Are you quite sure it is the fan causing the trouble, not the heater?



  • @dc42 Yes, because if I put the temp at 50, no issue until the fan is on (I ran the macro two times between 30 and 45°). Then I turned the heater off, and let it cool. Issue was present until fan turned off.


  • administrators

    What sort of fan is it? Does the other tool use the same type of fan?



  • I made a video, it is not very good because it is hard to film, but we can clearly see the extruder drive turning at the end of the moves.

    https://imgur.com/a/JqvbmAP



  • @dc42 https://www.digikey.ch/product-detail/en/delta-electronics/AUB0412VD-00/603-2091-ND/8680959

    Both tools have the same fan, and the problem is present on BOTH tools with the fan on. I was just doing my test with one hot and one cold when I was trying to understand the initial issue.



  • I just realized I have another issue (which is surely totally unrelated but as I just noticed it, I put it here), is that when I move the X carriage all the way with a single G0 or G1 (like G0 X250 F12000), the carriage will slow down around the middle. https://imgur.com/a/z1gqYpY

    If I do the same command with the U axis, I do not have the issue, but if I change to the second tool (the one using U axis), and do it on the mapped X axis (so the second carriage moves), the issue is also present with the second carriage. This issue is always present regardless of fan states.



  • @kuon said in Extruder drive lag with toolboard:

    I just realized I have another issue (which is surely totally unrelated but as I just noticed it, I put it here), is that when I move the X carriage all the way with a single G0 or G1 (like G0 X250 F12000), the carriage will slow down around the middle. https://imgur.com/a/z1gqYpY

    If I do the same command with the U axis, I do not have the issue, but if I change to the second tool (the one using U axis), and do it on the mapped X axis (so the second carriage moves), the issue is also present with the second carriage. This issue is always present regardless of fan states.

    Just realized this issue is present only if I load bed compensation with G29 S1 (might not be a bug).



  • @kuon You need to increase the set maximum instantaneous speed change or jerk for the Z axis.



  • @Stephen6309 Ok that makes sense, thanks.



  • Just to confirm the fans are the issue, I configured them as manual with M106, and when everything is cold, I can clearly "turn the issue on/off" with the fans, but only if it is being PWMed, at 0 or 100% the issue is not here.



  • @kuon
    some fans do not like to run with pwm.

    you can try changing the frequency, but it might not work.


  • administrators

    @kuon, please can you update both main and tool board firmware to 3.2beta4.1 and check whether the problem still exists.



  • It took me a while to update everything, but I got everything on latest version.

    Just a note, while updating I got two issues:

    When doing apt-get upgrade I had this error, but it seems the update went through:

    Sending update request to DCS... Error: Failed to send update request
    Unhandled exception. System.Threading.Tasks.TaskCanceledException: A task was canceled.
       at DuetAPIClient.BaseConnection.PerformCommand[T](BaseCommand command, CancellationToken cancellationToken) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetAPIClient/BaseConnection.cs:line 188
       at DuetControlServer.Program.CheckForAnotherInstance() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Program.cs:line 306
       at DuetControlServer.Program.Main(String[] args) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Program.cs:line 84
       at DuetControlServer.Program.<Main>(String[] args)
    Aborted
    Process
    

    Duet3Bootloader-SAMC21.bin was not present after apt-get upgrade (on unstable) and I had to CURL it.

    Anyway, now with this version I don't see the issue anymore. I will do some more tests and keep you updated.



  • Ok, while it made the problem less obvious, the issue is till here.

    I thought things where OK, but when printing, I see some oozing https://imgur.com/a/hHgzC6X . If I put the fans at 100% without PWM, the issue is fixed.

    The oozing is caused because the extrusion is slightly "late". When watching closely, I can clearly hear the filament retraction sound about 300ms after the z-hop sound.

    For now I will run my fans at 100%. But I am very curious at what is causing the issue. I will certainly replace them for noctua fans that have proper PWM.


  • administrators

    That's very strange. As on all Duet boards, the PWM is generated by hardware, so the load on the processor is the same whether the PWM is zero or 100% or anything in between.



  • @dc42 said in Extruder drive lag with toolboard:

    That's very strange. As on all Duet boards, the PWM is generated by hardware, so the load on the processor is the same whether the PWM is zero or 100% or anything in between.

    If you want me to run some tests just let me know. I fixed it by running my fans at 100% all the time, but it's noisy, so if I can PWM them a bit, I'd be happy.


Log in to reply