Buffer problem?



  • Re: Output buffers running out

    Hi All. Im expereiencing something that looks related to a buffer size problem. I have a vase mode print, big, basically a rounded shape. Movements is not continuous. It made like in chunks. Fells like a buffer problem. Where can I increase the buffer size to check if this is the problem or not?


  • Moderator

    After you've seen the stuttering send M122 in the gcode console and copy and paste the results here.

    Also post your config.g.



  • I repeated the print. Something not mentioned is that this sttutering is like all the time in this print. The result of a M122 was this:

    Recv: === Diagnostics ===
    Recv: RepRapFirmware for Duet 3 MB6HC version 3.01-RC9 running on Duet 3 MB6HC v1.01 or later
    Recv: Board ID: 08DJM-956L2-G43S8-6JKD8-3SJ6P-9B0YGUsed output buffers: 1 of 40 (22 max)
    Recv: === RTOS ===
    Recv: Static ram: 154572
    Recv: Dynamic ram: 162428 of which 84 recycled
    Recv: Exception stack ram used: 580
    Recv: Never used ram: 75552
    Recv: Tasks: NETWORK(ready,2076) HEAT(blocked,1084) CanReceiv(suspended,3824) CanSender(suspended,1432) CanClock(blocked,1428) TMC(blocked,80) MAIN(running,4396) IDLE(ready,80)
    Recv: Owned mutexes:
    Recv: === Platform ===
    Recv: Last reset 12:44:11 ago, cause: power up
    Recv: Last software reset time unknown, reason: User, spinning module GCodes, available RAM 75432 bytes (slot 1)
    Recv: Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x04432000 BFAR 0x00000000 SP 0xffffffff Task 0x4e49414d
    Recv: Error status: 0
    Recv: Free file entries: 10
    Recv: SD card 0 detected, interface speed: 25.0MBytes/sec
    Recv: SD card longest block write time: 0.0ms, max retries 0
    Recv: MCU temperature: min 45.0, current 45.3, max 45.4
    Recv: Supply voltage: min 23.8, current 23.8, max 24.0, under voltage events: 0, over voltage events: 0, power good: yes
    Recv: 12V rail voltage: min 12.1, current 12.2, max 12.3, under voltage events: 0
    Recv: Driver 0: ok, reads 4292, writes 0 timeouts 0, SG min/max 0/245
    Recv: Driver 1: ok, reads 4293, writes 0 timeouts 0, SG min/max 0/251
    Recv: Driver 2: ok, reads 4293, writes 0 timeouts 0, SG min/max 0/233
    Recv: Driver 3: ok, reads 4292, writes 0 timeouts 0, SG min/max 0/261
    Recv: Driver 4: ok, reads 4292, writes 0 timeouts 0, SG min/max 0/254
    Recv: Driver 5: standstill, reads 4292, writes 0 timeouts 0, SG min/max not available
    Recv: Date/time: 1970-01-01 00:00:00
    Recv: Slowest loop: 46.56ms; fastest: 0.26ms
    Recv: === Move ===
    Recv: Hiccups: 2902(0), FreeDm: 363, MinFreeDm: 321, MaxWait: 0ms
    Recv: Bed compensation in use: mesh, comp offset 0.000
    Recv: === MainDDARing ===
    Recv: Scheduled moves: 377742, completed moves: 377740, StepErrors: 0, LaErrors: 0, Underruns: 0, 0 CDDA state: 3
    Recv: === AuxDDARing ===
    Recv: Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0 CDDA state: -1
    Recv: === Heat ===
    Recv: Bed heaters = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = 0 -1 -1 -1
    Recv: Heater 0 is on, I-accum = 0.0
    Recv: Heater 1 is on, I-accum = 0.3
    Recv: === GCodes ===
    Recv: Segments left: 0
    Recv: Movement lock held by null
    Recv: HTTP is idle in state(s) 0
    Recv: Telnet is idle in state(s) 0
    Recv: File is idle in state(s) 0
    Recv: USB is ready with "M122" in state(s) 0
    Recv: Aux is idle in state(s) 0
    Recv: Trigger is idle in state(s) 0
    Recv: Queue is idle in state(s) 0
    Recv: LCD is idle in state(s) 0
    Recv: SBC is idle in state(s) 0
    Recv: Daemon is idle in state(s) 0
    Recv: Autopause is idle in state(s) 0
    Recv: Code queue is empty.
    Recv: === Network ===
    Recv: Slowest loop: 2.96ms; fastest: 0.01ms
    Recv: Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
    Recv: HTTP sessions: 0 of 8
    Recv: - Ethernet -
    Recv: State: disabled
    Recv: Error counts: 0 0 0 0 0
    Recv: Socket states: 0 0 0 0 0 0 0 0
    Recv: === CAN ===
    Recv: Messages sent 623, longest wait 0ms for type 0
    Recv: === Linux interface ===
    Recv: State: 0, failed transfers: 0
    Recv: Last transfer: 45851940ms ago
    Recv: RX/TX seq numbers: 0/1
    Recv: SPI underruns 0, overruns 0
    Recv: Number of disconnects: 0
    Recv: Buffer RX/TX: 0/0-0

    My config:

    Config.g

    ; General preferences
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"Printer" ; set printer name
    M669 K1 ; select CoreXY mode

    ; Network
    M552 S0 ; disable network

    ; Drives
    M569 P0.0 S0 D3 ; physical drive 0.0 goes forwards X Se invirtieron los cables tambien. Se agrego D3 para stealhtchop3
    M569 P0.1 S1 D3 ; physical drive 0.1 goes forwards Y Ultimo cambio: de S0 a S1. Se agrego D3 para stealhtchop3
    M569 P0.2 S1 D3 ; physical drive 0.2 goes forwards
    M569 P0.3 S1 D3 ; physical drive 0.3 goes reverse
    M569 P0.4 S0 D3 ; physical drive 0.4 goes forwards
    M569 P0.5 S0 D3 ; physical drive 0.5 goes forwards

    M584 X0.0 Y0.1 Z0.2:0.3 E0.4:0.5 ; set drive mapping
    M350 X256 Y256 Z32:32 E32:32 I1 ; configure microstepping with interpolation
    ; M92 X160.32 Y160.32 Z3200.00:3200.00 E827.22 set steps per mm
    M92 X1285.13 Y1285.13 Z3200.00:3200.00 E827.22 ; set steps per mm
    M566 X900.00 Y900.00 Z300.00:300.00 E2400.00 ; set maximum instantaneous speed changes (mm/min)
    M203 X18000.00 Y18000.00 Z240.00:240.00 E1200.00 ; set maximum speeds (mm/min)
    M201 X1000.00 Y1000.00 Z20.00:20.00 E500.00 ; set accelerations (mm/s^2)
    M906 X1500 Y1500 Z900:900 E1000:1000 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z0 S1 ; set axis minima
    M208 X350 Y350 Z400 S0 ; set axis maxima

    ; Endstops
    M574 X1 S3 ; configure sensorless endstop for low end on X
    M574 Y1 S3 ; configure sensorless endstop for low end on Y
    M574 Z2 S2 ; configure Z-probe endstop for low end on Z

    ; Z-Probe
    M558 P5 C"^!io3.in" H5 F120 T18000 ; set Z probe type to switch and the dive height + speeds
    G31 P500 X0 Y28.5 Z0.245 ; set Z probe trigger value, offset and trigger height
    M557 X25:310 Y27:312 S57:57 ; define mesh grid

    ; Heaters
    ; 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 D30 S1.00 ; enable PID para camara, deadtime en 30 segundos
    M307 H0 B1 S1.00 ; enable bang-bang mode for the chamber heater and set PWM limit
    ;M140 H0 ; map heated bed to heater 0
    M141 H0 ; map chamber to heater 0
    M143 H0 S130 ; set temperature limit for heater 0 to 130C
    M308 S1 P"temp1" Y"thermistor" T500000 B4723 C1.19622e-7 ; 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
    M308 S2 P"temp2" Y"thermistor" T500000 B4723 C1.19622e-7 ; configure sensor 2 as thermistor on pin temp2
    M950 H2 C"out2" T2 ; create nozzle heater output on out2 and map it to sensor 2
    M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit

    ; 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

    ; 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
    M563 P1 D1 H2 F-1 ; define tool 1
    G10 P1 X0 Y0 Z0 ; set tool 1 axis offsets
    G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C

    ; Custom settings are not defined
    M915 X Y S2 R0 F0 ; sensroless sensitivity

    ; movments without homing
    M564 H0

    ; Miscellaneous
    M501 ; load saved parameters from non-volatile memory
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
    M950 S0 C"0.out9" ; servo "0" in pin out9
    M280 P0 S95 ; move servo to rest position
    M376 H30 ; cancell mesh levelling
    M143 S450 ; set max temp to 450 degrees for T0
    M143 H2 S450 ; set max temp to 450 for T1
    T0 ; select first tool

    Thanks in advance for the help



  • you're getting a large number of hiccups as a result of running at 256 interpolation on X and Y.
    Reduce this to 16 as you're not really gaining anything from running directly at 256



  • @Tinchus said in Buffer problem?:

    M350 X256 Y256 Z32:32 E32:32 I1 ; configure microstepping with interpolation

    there is your problem. you are overloading the cpu.

    change this to x16 with interpolation for all axis.



  • Ok, will try that change. What Im losing by using 16, and not 32 for example? I was running on 32 before, but I had some ringing wich disappeared when I switched to 256



  • You are not loosing anything.
    When microstepping on the Duet is configured to x16, then the TMC-driver will do the interpolation to x256 from there. In this case, you are outsourcing the calculation to the TMC.

    Vague knowledge (please correct, if wrong):
    When using x32 on the Duet, the interpolation on the TMC is disabled.
    So the movement would be "rougher" on this setting -> possible Ringing on a certain frequency?

    /Julien


  • administrators

    Also, you should upgrade the firmware on your Duet 3 to 3.1.1.



  • @ZipZap said in Buffer problem?:

    When using x32 on the Duet, the interpolation on the TMC is disabled.

    Thats only true for the duet 2 wifi/ethernet.
    The Duet3 can do interpolation at all settings.



  • @Veti said in Buffer problem?:

    The Duet3 can ...

    My bad, didnt check his hardware.
    So to be clear: When microstepping on the Duet 3 is set to anything higher than x16, the TMC will still do the interpolation to x256?



  • @ZipZap said in Buffer problem?:

    So to be clear: When microstepping on the Duet 3 is set to anything higher than x16, the TMC will still do the interpolation to x256?

    yes. the duet maestro can do this as well.



  • thanks everyone for the help. Going down to 16 for my microstepping, eliminated completly the sttuttering. After that, I also upgraded to 3.1.1
    My problem now is that I ran the same gcode, and now I have ghosting all over the print and it is very very constant.
    Im looking now into acceleration settings but Im wondering why this ghosting was not present at all with the previous setting of 256 microstepping.
    Ideas?


  • administrators

    Do you have interpolation enabled in your M350 command?



  • Yes interpolation eis there:

    M350 X16 Y16 Z32:32 E16:16 I1


  • Moderator

    Can you post an image of your ghosting artifacts?

    Ghosting is usually caused by an interaction of print speed, acceleration, and jerk, assuming there is no excessive mechanical slop to blame in the first place.

    How fast are you trying to print?
    Is the slicer adding its own acceleration and jerk values?
    Have you tried tuning your acceleration and jerk values?

    When using x256 microstepping you were likely not hitting your requested print speeds, so now that you're printing faster your jerk and acceleration values may need to be tuned again.

    You may also want to consider tuning Dynamic Acceleration Adjustment

    https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M593_Configure_Dynamic_Acceleration_Adjustment



  • @Phaedrux
    Mecanical slop should not be a problem, axis movements are super smooth.
    The tests prints were done at 100 mm/s
    Slicer is not adding any accel or jerk settings (I have that feature desabled)

    The test prints were done using very conservative values: kerk is arounf 15mm/s and acceleration I have tried even 600 mm/s.
    My build a corexy, 40X40mm aluminium extrusions, the frame is super strong. I have hiwin linear guides on top of them. It is a very strong frame, it should tolerate acceration higher than this. Even so, I have print the pictures with 1000 mm/s2 accell, you reccomend less than that?
    If you see in the pictures, the problem is that ringing goes all the way the print, is not just at the beginning or ending the corners.

    Before switching to 16 (256 microstepping), no ringing:
    ringing_no.jpg

    After the switch:
    ringing.jpg

    Regarding reaching the speed: of course it is a posibility, but to my eye, the speed is the same , just that the sttuttering is not present now.

    Question: it is not very clear in the picture, but the ringing you see, that ringing goes from the very begining of each curved path till its end, and those paths are like 80/100 mm long. All the way there is this waivy artifact. Could this be caused by something wrong with my motor extruder configuration? acceleration/jerk of my extruder?

    Thanks in advance


  • Moderator

    That definitely doesn't look like traditional ringing which would occur on a sharp direction change like a corner.

    You may be right about it being extruder related.

    Is that a single wall print? If the speed is higher and more consistent now, it could be related to insufficient cooling.

    How many extruders do you have? Your config has a mix of single and dual extruder values. If you only have a single extruder, remove the double values for E.

    M584 X0.0 Y0.1 Z0.2:0.3 E0.4:0.5 ; set drive mapping
    M350 X256 Y256 Z32:32 E32:32 I1 ; configure microstepping with interpolation
    ; M92 X160.32 Y160.32 Z3200.00:3200.00 E827.22 set steps per mm
    M92 X1285.13 Y1285.13 Z3200.00:3200.00 E827.22 ; set steps per mm
    M566 X900.00 Y900.00 Z300.00:300.00 E2400.00 ; set maximum instantaneous speed changes (mm/min)
    M203 X18000.00 Y18000.00 Z240.00:240.00 E1200.00 ; set maximum speeds (mm/min)
    M201 X1000.00 Y1000.00 Z20.00:20.00 E500.00 ; set accelerations (mm/s^2)
    

    Are you still using x32 micro steps on the extruder? Use x16 to establish a baseline. It looks like you're already using a geared extruder, so increasing the steps per mm beyond ~400ish isn't going to gain you anything.

    For the extruder speed values try

    M566 E3000
    M203 E6000
    M201 E3000

    I'd also experiment with slower print speeds.

    Have you PID tuned your heaters yet?
    Are you sure your thermistor values are correct?

    Take a look at this extruder calibration guide to find your volumetric extrusion limit which you can use to optimize your print speed.

    https://duet3d.dozuki.com/Guide/Ender+3+Pro+and+Duet+Maestro+Guide+Part+4:+Calibration/40



  • @Phaedrux , no, I followed the forum recommendatios and changed all my steppers to 16 microstepping, interpolation activated. The only thing I left in 32 is the Z axis only because the calibration took me a lot of effort and I dont want to calibrate those steps again if possible. But extruder s are with 1/16 and that is the microstepping used for the print test in the pictures.
    The pictures: yes, it is a single wall, vase mode print.
    I have 2 extruders

    My config in that section is this since I changed the microstepping:
    M584 X0.0 Y0.1 Z0.2:0.3 E0.4:0.5 ; set drive mapping
    M350 X16 Y16 Z32:32 E16:16 I1 ; configure microstepping with interpolation
    ; M92 X160.32 Y160.32 Z3200.00:3200.00 E827.22 set steps per mm
    M92 X80.16 Y80.16 Z3200.00:3200.00 E428.25 ; set steps per mm
    M566 X900.00 Y900.00 Z300.00:300.00 E450 ; set maximum instantaneous speed changes (mm/min)
    M203 X18000.00 Y18000.00 Z240.00:240.00 E1200.00 ; set maximum speeds (mm/min)
    M201 X1000.00 Y1000.00 Z20.00:20.00 E500.00 ; set accelerations (mm/s^2)
    M906 X1500 Y1500 Z900:900 E1000:1000 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    My extruder steps are now half than before.
    Regarding PID: yes, I did an autotunning precedure. I have ? mark there because I have a mosquito hotend with a hight temp thermistor from sliceenginnerin. At ambient temperature my reading is 35 degrees, when actually room temeperature is 24/25 degrees celsius. So that initial reading is not ok. The values I used for the thermistors are the ones the online duet configuration toll gave me (I used that configuration tool as startin point for the rest of my config).
    Could be a cooling problem and not really be a ghosting problem?
    I will repeat the print with lower temperatures.
    Question: the high temp thermistor curve is tested and approved by duet already or it is somehow still "to be tested?
    Thanks in advance for the help


  • Moderator

    @Tinchus said in Buffer problem?:

    M92 X80.16 Y80.16 Z3200.00:3200.00 E428.25 ; set steps per mm
    M566 X900.00 Y900.00 Z300.00:300.00 E450 ; set maximum instantaneous speed changes (mm/min)
    M203 X18000.00 Y18000.00 Z240.00:240.00 E1200.00 ; set maximum speeds (mm/min)
    M201 X1000.00 Y1000.00 Z20.00:20.00 E500.00 ; set accelerations (mm/s^2)

    If you have 2 extruders then you are missing the second E value for these commands.

    By contract, your Z axis only needs a single value since both motors MUST be the same. This isn't the case for extruders since they aren't acting in concert for a single E axis, they are independent axis by nature.

    So, remove the double Z axis values, you only need 1, and add a second value for the E axis because you need both.

    Just to be totally clear

    M92 X80.16 Y80.16 Z3200.00:3200.00 E428.25

    would become

    M92 X80.16 Y80.16 Z3200.00 E428.25:430

    @Tinchus said in Buffer problem?:

    ambient temperature my reading is 35 degrees, when actually room temeperature is 24/25 degrees celsius. So that initial reading is not ok

    That's to be expected with a high temp thermistor. Since you're using the values provided by the config tool for the slice thermistor you should be fine and your printing temps should be accurate.

    It will be interesting seeing your results from slower print speed and different temperatures after finding your maximum volumetric flow rate.



  • Ok, I did the max flow test, I have a solid 7mm/s of ABS extrusion at 240 degrees celsius. Doing the maths, that gives me 16.8 mm3/s


  • Moderator

    Alright, so using 16mm3/s you can find a max print speed based on your chosen height and width.

    Max Suggested Speed = Volumetric Limit / ( Layer Height * Extrusion Width)

    So assuming 0.4 width and 0.2 height you could print at 200mm/s and maintain the flow rate. However, it's going to depend on the part being printed whether you're able to cool it fast enough or print the details at that speed.


Log in to reply