Welcome! Log In Create A New Profile

Advanced

How to detect line buffer underrun

Posted by ax2013 
How to detect line buffer underrun
June 10, 2017 11:25AM
Hello,

Trying to debug my delta and trying to understand what is causing occasionally stuttering. Is there a way to detect line buffer underrun in SW? I can occasionally notice stuttering-like behavior while shelling circles. Don't know if the source for that is the part itself, slicing or buffer underrun. I suspect buffer underrun because in some layer shelling run does not stutter.
Also I'm curios if anyone has done MCU utilization meter to Marlin? That is pretty much the same question but from different point of view. It would be nice for debugging purposes to see whether Arduino is running in decent level or barely can manage calculation of movements.

Axel.
Re: How to detect line buffer underrun
June 11, 2017 03:38AM
Stuttering delta while printing arcs is a classic problem with 8-bit cpu.
You can reduce the "segments per second" parameter and also the refresh rate for the LCD to free some cpu cycles. ( graphic LCD makes it worse )

Re: MCU utilization. A year or so back, I read a remark in Marlins github where a guy said the MCU was 90% of the time busy with refreshing the LCD.
Don't know how serious it was and if the programmers changed that in the later versions.
Re: How to detect line buffer underrun
June 11, 2017 01:55PM
Yep, exactly. I've been tweaking "segments per second" value, but I like to move on to have actual facts. Also determine how much LCD actually affects to this. I'm pretty sure I'm not the only one...

Axel
Re: How to detect line buffer underrun
June 11, 2017 03:50PM
If you are running a Delta Printer... You should consider using a 20x4 LCD Panel instead of the Graphics panels. The Graphical Panels eat up a lot of CPU cycles. The 20x4 is pretty tame on what it requires.
Re: How to detect line buffer underrun
June 12, 2017 01:23AM
Yep. I consider matrix LCD the only option for delta controller with 8-bit Atmel. If even that one is possible.
Re: How to detect line buffer underrun
June 12, 2017 05:51AM
MKS TFT28 and MKS TFT32 displays are also good. Since they don’t put any load on the controller.
Re: How to detect line buffer underrun
June 13, 2017 02:31AM
I made buffer logging and yes, buffer level hits to bottom pretty easily on arc moves. Even without LCD or SD. When it is human noticeable (stuttering) the situation is very bad. Some help can obtain by tweaking parameters but 8-bit Atmel is just too slow for delta calculations (when there are lot of arc moves). Increasing buffer I can get rid of the worst stuttering but in log I can see underruns.

Axel.
Re: How to detect line buffer underrun
June 13, 2017 05:26AM
care to share how you added this logging? Just curious

Edited 1 time(s). Last edit at 06/13/2017 05:26AM by Dust.
Re: How to detect line buffer underrun
June 13, 2017 04:02PM
I added buffer level checking in planner subroutine. There is a function available. It monitors planner buffer in 1000ms cycles and records the lowest buffer level. These results are transmitted to host when mcu has spare time to do that (tried to avoid mcu load as much possible).
In my test print segments per second did not actually help much. By increasing planner buffer to 64 human noticeable stuttering does not happen but underruns still occurs during multiple arc moves. I don't see that they have quality impact even when my delta is very sensitive of stuttering in that sense.

Axel
Sorry, only registered users may post in this forum.

Click here to login