synman / Octoprint-Bettergrblsupport

Better Grbl Support Plugin for Octoprint based (loosely) on the original Grbl Support plugin developed by mic159
https://github.com/synman/Octoprint-Bettergrblsupport/wiki
64 stars 19 forks source link

Buffer Overflow #7

Closed thothloki closed 2 years ago

thothloki commented 4 years ago

Hey, I have this installed and am using an EleksMana board to control a laser engraver.

The issue I am having is that octopi with Better GRBL Support is feeding the gcode file way to fast and causing a buffer overflow. I am looking around to see if this is something I can fix myself. If so, I would fork it and make one dedicated to EleksMaker style machines. Most other softwares I use wait for a carriage return from grbl before sending another gcode line.

Any help is appreciated.

synman commented 4 years ago

This plugin was developed using an ekeksmaker laser engraver as it's reference device.

Have you changed any of its defaults?

What software are you using to generate your gcode? We may find the answer there.

thothloki commented 4 years ago

I have not changed any defaults yet. I am using T2Laser for gcode generation. I think I found what might be an issue that I am going to test later today. T2 slims down the gcode to be as efficient as possible as shown below. I can can uncheck this method to add all the G01 commands back in G21 G90 F500 M05 G00X0Y0F500 G92X101.5Y77.5 G90 M03 S0 G01 X99 Y155 M03 S0 X99.2 M03 S255 X100.4 Y155 M03 S255 X100.6 M03 S0 X100.4 Y154.8 M03 S0 X100.2 M03 S255 X99 Y154.8 M03 S255 X98.8 M03 S0 X99 Y154.6 M03 S0 X99.2 M03 S255 X100.4 Y154.6 M03 S255 X100.6 M03 S0 X100.4 Y154.4 M03 S0 X100.2 M03 S255

synman commented 4 years ago

Thank you for posting the "optimized" T2 code. Let me know how it goes with that option unselected. I've been waiting to see what the T2 generated gcode looks like (see the invalid ticket opened previously).

thothloki commented 4 years ago

I dealt with this issue with the GRBL support plugin years ago and gave up in frustration. That is when i found out about the optimized code. When I posted this question, i was looking at the code and it came to me after I had posted, that the optimized code was an issue. What programs have you tested with? Lightburn? EleksCAM? BCL?

synman commented 4 years ago

Lightburn is all I use. I'm more than happy to add additional gcode style support (where feasible) but need sample gcode to feed my own machine to figure it out.

thothloki commented 4 years ago

here is a sample of T2Laser gcode

snoopy3.zip

synman commented 4 years ago

Thank you! Guess I'm ready to hop back in and clear the backlog.

thothloki commented 4 years ago

Ok. So i got machine code out of T2. When I send it, here is the error error here is the gcode snoops3.zip

Is there a way you could send me a Lightburn gcode file for me to compare?

synman commented 4 years ago

I'll send you back Snoopy if you want to share the source (assuming it is not copyrighted).

synman commented 4 years ago

Is snoops3 without Optimization enabled? And snoopy3 is with optimization?

thothloki commented 4 years ago

snoopy-clipart-dancing-coloring-2

it is just a line are drawing of snoopy from the Peanuts Yes, it is the one without optimization

synman commented 4 years ago

Very cool. Thanks for all the details. This is sufficient for me to engage. Going to classify this as a bug once I'm at my PC.

thothloki commented 4 years ago

Thank you. Please let me know. I am excited to get my 2 laser engravers and my little homemade cnc mill using this

thothloki commented 4 years ago

Please let me know if there is any way I can help

thothloki commented 4 years ago

Lightburn is all I use. I'm more than happy to add additional gcode style support (where feasible) but need sample gcode to feed my own machine to figure it out.

so I tried using a lightburn gcode file and am getting the same error

thothloki commented 4 years ago

Ok. I figured out what was causing the overflow in the gcode. I can manually edit them (eventually building a script to auto edit them for me) to make them work. I have another problem that i will open a new issue for.

synman commented 4 years ago

Sorry for the delay... here's snoopy gcode generated from light burn

snoopy-LB.gcode.zip

FWIW, I'm working on getting the optimized T2 Laser gcode to work.

synman commented 2 years ago

reopening this as it has remanifested in other post processors and is not limited to just the X coordinate plane.