New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*updated* Graphical LCD refresh makes the motors to stutter (Arduino2 and SKR1.3, all 32bit boards?) #12461
Comments
You may have the display controller configured in such a way that it takes a very long time to update the display, in which case the planner could experience starvation. However, Marlin times the duration of display updates and throttles back the frequency if it detects that planner starvation is imminent. So the display update time would have to be pretty extreme for planner starvation to occur. |
It would help to have your configuration files, as requested in the issue template. Please put them into a ZIP file and drop them on your next reply. |
Would also be interesting to know if moving slow stutters more than moving fast - much faster. |
My suspicion is you are moving slow. Solution would be to limit the shortness of the sub-moves to about Even when you switch off the display you currently get lots of to short unconnected moves, but the valid ones will be evenly distributed in time, without the breaks for the display update. Just a theory!
|
edited: added picture + video, look at the bottom! Hi, @thinkyhead: What's not standard is the way I make the lcd work. Then, when I change this in the ultralcd_DOGM.h file:
the lcd starts to work but the movements start to stutter! @AnHardt I am available for any test or solution you suggest me. Here the "quality" of the print with the stutter: ... and a video showing THE stutter :-) |
A little big step in the right direction (I suppose): I tried more or less 30 different versions going back in the past and Marlin-604b804125571782a11ff819b29a062b23879ba0 (27sept2017) doesn't show the issue! I'm going to find out when excatly the problem was introduced! |
@mignolo4: Usually if you can find the commit in which something started going bad, it's a great first step. However, over a year ago.... that's a lot of commits to look through! |
It's definitely something happened from 27th sept to 7th oct 2017! |
Interesting. If you can narrow it down to a specific day, even better! |
I’m glad to hear you found a point in time that works. The referenced commit would not have had any effect, so we’ll have to look at the general timeframe. |
Does it help if I check one by one all of the commits of that day to see if some of them work well? EDIT: To check my theory I went back compiling some versions of 26th and 24th Sept expecting smooth movements: |
After a lot of time I'm here again to add some information. |
This Issue Queue is for Marlin bug reports and development-related issues, and we prefer not to handle user-support questions here. (As noted on this page.) For best results getting help with configuration and troubleshooting, please use the following resources:
After seeking help from the community, if the consensus points to to a bug in Marlin, then you should post a bug report. |
@boelle |
uppps... i just saw the question label but is the bug still there in latest bugfix 2.0? |
:-) |
mabe close this one and open a new when you have tested? |
Just tested with no good news :-( |
nope, we just keep this one open |
I bought a new SKR v1.3 board (LPC1768 32bit board) and the stutter is still there (again: with a delta config). edit: Here is a video with the slowmotion function because it was the only way to see it in a video :-) |
@mignolo4 Are you still using a modification to get the display to work? If so did you try it with just the standard configuration? If you are still using that modified config, please post the details of the display you are using. Please don't just say it is a FULL_GRAPHIC_SMART_CONTROLLER because we need to know exactly which one it is, there are many different manufacturers of these displays. Please post pictures of the boards and a link to the supplier if possible. Many, many people are using the SKR board with a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with no problems (I have two sitting here in front of me working fine), so we need to identify why yours is different. |
@gloomyandy Before I write the info about the lcd board... are you using a delta configuration? |
So just to be clear your display works fine with the standard configuration with the SKR board and a recent build of Marlin? You are not making any changes to the U8GLIB settings (as you reported you had made before). The only display related change you have made is to define the display type? What have you got it set to? When did you download the version of Marlin you are using on the SKR board? I assume you are using standard Marlin not the version from Bigtreetech? You should probably upload your current configuration files for this new board. |
Already tried that and it's not my case :-( |
@hobiseven regarding high level code architecture. I made a very rough code overview for my own purposes a year ago. It's probably not what you need, but here is the link anyway: https://github.com/DerAndere1/Marlin/tree/Marlin2ForPipetBot/docs |
@mignolo — You can get less demanding status screen drawing code by switching off all the fancy additions to the status screen and using the single header image instead of the individual nozzle and bed bitmaps. If you are using 32x micro-stepping on any of your axes, go down to 16x micro-stepping. The general problem is not that the screen drawing blocks the stepper ISR. It doesn’t interfere with it. However, screen drawing temporarily blocks the G-code queue from feeding the planner fast enough, and when the queue starves we get stuttering movement as the machine stops and starts. There are various other things you can also try:
That’s all I can think of off the top of my head…. |
The good news is: On the 32-bit boards the time used for 'drawing' the screen becomes less and less important. |
Yes, this is not something we can do much about with the current u8g library, since each SPI bit requires a small delay, and the transfer is bound to the main loop. If it were possible to rewrite all of Marlin's SPI code and all the external libraries, then we could perhaps do all the SPI transfers in a coordinated interrupt. This would allow us to get back to managing the queues more quickly. Someday, perhaps… |
Also... As a brute force fix to give the main Marlin code more processing cycles... You can change
to 250 ms. The LCD encoder wheel will feel a tiny bit 'sluggish'. |
That's definitely going on the Troubleshooting > LCD / Controller section of the site. The amount of cycles freed up is going to depend on what's happening in the LCD code. There are some general housekeeping tasks and I'm sure the time adds up when doing them 10 |
Of course. But it's every 100ms (1 |
see https://github.com/MarlinFirmware/Marlin/pull/14595/files#diff-54ada0858fc4ed0c0dfc06aa12378c1dR834 its doable to improve the menu refresh while scrolling... and let the status screen as is... while printing |
At one point @AnHardt worked out a very good throttling mechanism that would prevent the screen from updating if it looked like the planner could starve. As far as I know that is still in place. So I wonder if it might just need to be more aggressive. |
It's still in place. A bit of debug output in line 950, printing |
Just wanted to add this observation : When using the Fysetc 12864 mini display routines in Marlin (all builds I tested so far, no exceptions) and a Fysetc 2.1 12864 RGB display, the issue does NOT exist and movement is 100% smooth regardless of the state/menu the LCD is in. Just to confirm : yes, on a Delta (Anycubic Predator with an SKR 1.3 and Marlin 2.0) This makes me wonder : So whatever is affecting the code routines in the full graphic smart controller and the discount variation, it's not affecting the Fysetc 12864's. (tested the 2.1 and 2.0, not sure about the 1.2 .... but as the only difference between those is the backlight color selection system so I wouldn't presume there's much difference there and the 1.2 will probably work the same way). Maybe this can help a bit to try and trace the issue. As the issue doesn't show up using the Fysetc display code, it would seem logical to presume the problem should be found in the full graph routines ? Would it be possible to use the code for the Fysetcs and kinda backtrack from there, or even use that code as base to redo a test build for the full graph LCD code ? Also, Bigtreetech has a "hybrid" TFT these days which allows TFT and 12864 emulation (TFT function run over the internal serial port like all other TFT's do, the 12864 emulation runs over the EXP1/EXP2 ports like a "real" 12864 would.) This screen also shows the "stutter" issue when Marlin is configured to use the 12864 reprap full graph routines (and the discount version too ... obviously). But I find it interesting the Fysetc 12864 mini's do not show the same stutter issue using the same machine, board and Marlin build, and I don't think anyone has mentioned this so far. Hope this can help people way smarter than me to have a new look at the issue and try to solve it. |
The Fysetc 12864 mini display uses a completely different display driver chip (ST7567). Probably you have to transfer only half the amount of data and can do that at a much higher speed then with the ST7920 of the RRDFGDC. The ST7920 is really bad! I was a bit shocked when i discovered the new shiny color displays try to emulate exactly that crap. |
Time for a 1/4 screen update on a BBT SKR PRO 1.1 (F407 168MHz) The processor is at least 10 times faster than a AVR, but the time for updating the RRDFGDC is about the same. |
So... something has definitely changed in these last weeks... I downloaded today's version (22 august 2019) and made my usual modification:
Now the movements are super smooth but... because the lcd doesn't react at all if it is printing:
I suppose this is a bug but everything considered I would say I'd prefer a display not showing the coordinates during the movements instead of the stutter... but I know, this is not a request thread ;-) |
I repaired the display throttling last week. (Repair display throttling #14960) |
@AnHardt with a test gcode sent with repetier host (it moves from x-140 to x+140) the display didn't update or react for the whole lenght, about 4 minutes. p.s. 32bit board (arduino 2 +radds), DELTA_SEGMENTS_PER_SECOND 160 |
4 minutes for 280mm? Yes, for the character displays the update is done in one big block and can last about 30 ms (if i correctly remember) -> so update can be delayed by about 30 seconds. Planner buffer needs to contain at least 2*30ms/6.25ms/segments = ~10 segments to be in time. |
oh sorry, I meant "it moves from x-140 to x+140" repeatedly for about 4 minutes edit: the odd thing is that the reaction is proportional to the speed I set: |
So guys I think we are close to a solution here!!! 👍 Have a look here: #15045 To summarize: ...a value of 64 instead the default 16 one; not even with 32 it works |
Very interesting, really must try this too. See if the BTT Hybrid agrees with these values too (pretty sure it does, as the issue even happened without an LCD connected in my case). |
There isn't room on the 8-bit AVR's to have this value set that high. It would need to be something like:
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi,
after I found the way to make the LCD work (see issue #12294 )
I 'm experiencing some stutters whem moving x-y axes on my self-made Delta-style 3dprinter (RADDS +FULL_GRAPHIC_SMART_CONTROLLER).
If I send a simple movement like
G1 X-140
I can clearly see that the movement in not smooth.edit: video added - you can find it after the picture I posted below
I tried to narrow down the problem and I found that the movement is smooth if:
I change DELTA_SEGMENTS_PER_SECOND to something lower than 40
I deactivate the LCD (the movement are smooth even with DELTA_SEGMENTS_PER_SECOND 300)
the movement is only in the Z direction
Already tried:
to restart from a fresh installation with default values and modifying only 4 essential parameters: board, endstops, thermistors, and obviously the lcd
old releases of bugfix 2.0 (I stopped trying with the 30 september release)
MEGA shutdown...Solved - Delta Segments Per Second Issue #6703
Issue with large prints, firmware locks up and skips gcode #7677
No problem at all with other firmwares!
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: