svenhb / GRBL-Plotter

A GCode sender (not only for lasers or plotters) for up to two GRBL controller. SVG, DXF, HPGL import. 6 axis DRO.
https://grbl-plotter.de/
GNU General Public License v3.0
696 stars 176 forks source link

Problem with feed slow down on large gcode file #289

Closed anbello closed 2 years ago

anbello commented 2 years ago

Describe the bug The problem is with my coreXY pen plotter with grbl-coreXY 0.9i on Arduino nano. With a gcode of near 100000 lines (produced by many tiny circle) when the plotting is near half complete all the gcode lines has been read by the program and the plotter continue to plot (I think using some sort of buffer) but at a very low speed.

svenhb commented 2 years ago

Can you show the output of the COM-window? What do you mean with "...and the plotter continue to plot", did it stop before because of tool-change?

anbello commented 2 years ago

It is a single color plot, no tool change. On the left panel I see all the lines has been read but the plot is near the half, it continues to plot but at low speed. Now I can't post the output, I will do asap.

svenhb commented 2 years ago

Perhaps you can post the gcode from the left panel?

anbello commented 2 years ago

Here the gcode file: boids2d-red_.nc.zip

svenhb commented 2 years ago

With my Arduino nano on the desk, with grbl 1.1 I could also notice the slow down... After pressing pause, the speed came back... No idea for the moment...

I would use different import settings: For circles I would use G2/G3 commands and the N-line numbers are not needed....

Uncheck: image image

anbello commented 2 years ago

Thanks, I will try and will let you know.

anbello commented 2 years ago

A curiosity: did you try the suggested setting? did they solve the slow down problem?

svenhb commented 2 years ago

I don't have your original SVG or DXF to import it with other settings...

anbello commented 2 years ago

Sorry, here it is. boids2d-red.svg.zip

svenhb commented 2 years ago

Ok, too bad, the SVG contains paths in circle shapes, but not real circles, no way to reduce code-size here. But you could avoid tiny moves, which reduces line-count from 95424 to 38408: image In 2D view it looks now a bit angular, but I'm sure the real output looks still good: image

anbello commented 2 years ago

Thanks a lot, I didn't yet tried because the pen plotter is not here with me, I will try today and let you know.

anbello commented 2 years ago

Sorry, another question: Is it normal this behavior with long gcode files or is it something that will be addressed in the future?

svenhb commented 2 years ago

I'm working on it

svenhb commented 2 years ago

Please check new version: https://github.com/svenhb/GRBL-Plotter/releases

anbello commented 2 years ago

I have tested new version, with 'Remove very short moves' < 0.1 it has random slow down and return to normal speed during the plotting, with < 0.5 all OK from start to finish and circles don't seems segmented to the eyes.

Thanks

svenhb commented 2 years ago

Thanks for the feedback. So the main problem: "after finish sending the code from left panel the plotter slows down" is solved.

with 'Remove very short moves' < 0.1 it has random slow down and return to normal speed

Probably too much commands per seconds needed, to keep the grbl-firmware buffer filled... At feedrate 1000 mm/min ca. 167 command-lines with ca. 15 chars each needs to be send per second and visulized in GRBL-Plotter.

svenhb commented 2 years ago

Probably too much commands per seconds needed

You could reduce command length by use of less decimals (just 1 instead of 3): image

By use of "compress" and / or "Relative movements": image