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
gcode optimization rules for grbl #279
Comments
|
Most if not all of the modal commands are standard among interpreters/controllers, but there may be some differences. The NIST RS274 NGC is the standard that Grbl started with. That standard is also what LinuxCNC uses at its core, but LinuxCNC has some differences from NIST to incorporate more functionality. Grbl has been following the LinuxCNC model for several years and the definition of commands that LinuxCNC has can be found in the linuxCNC documentation http://linuxcnc.org/docs/ The Grbl supported commands closely follow the LinuxCNC methods of implementation. As for G0 F1000, in this line the F1000 will be ignored. G0 is a rapid traverse move and by its definition will move the machine at the maximum rate the machine is capable of regardless of the F word setting. For G0 the F-word is meaningless. However, the F word would be read and then would change the feedrate for subsequent commands that use the F word (G1, G2, G3...) There is only one F-word definition. If you change the F-word value you change it for all commands that use it. This is standard across all g-code interpreters/controllers I am aware of. As for your project, I assume that this is an attempt to speed up Grbl's processing of lines of g-code. @chamnit can probably be more specific, but I have also done some testing in this regard with my GUI and have come to the conclusion that it doesn't help much unless the g-code is littered with redundant commands and those commands are very small movements. Most are not bad enough to see any type of significant gain. |
Some particular sections which I found useful for getting my bearings when working on this problem: Format of a line |
thanks to all of you |
Hi @chamnit, hello everybody
I am going to write a function to parse a gcode file and strip out all the redundant commands and parameters.
I know that some commands and params are modal: if you send S120 you dont need to send it again unless you want to change power, if you send G1 you can send a sequence of XYZ movement without sending G1 again etc
My questions are:
Thanks a lot, Diego
The text was updated successfully, but these errors were encountered: