Open jweiss2 opened 2 years ago
The following is not a solution for existing gcode that includes variables, but it can serve as a workaround (or even a more powerful alternative) for those who are willing to learn Python basics to write new scripts: Use printcore (comes with printrun) as described at https://github.com/kliment/Printrun#using-printcore or use the python package mecode to generate/send gcode. pronterface and pronsole have their own macrosystem. It is obviously just a workaround because the format is not standarized internationally.
I would also love to see this feature added for use in Marlin gcode... I'm really quite surprised it's not there.
Thanks, Steve
Also interesting: a library that can be used by G-code senders to post-process LinuxCNC G-code and expand variables and o-codes: https://github.com/NRSoft/GSharp
And there is an old pull request which is work in progress: https://github.com/MarlinFirmware/Marlin/pull/24654
Is your feature request related to a problem? Please describe.
I am relatively new with Marlin and GCode, but I tried incorporating variables in my GCode (as described here: https://gcodetutor.com/cnc-macro-programming/cnc-variables.html) without success. I searched in the forums and found a post asking for this feature about 10 years ago with no update. I am just trying to optimize a value for a very repetitive movement, and being able to define a variable would save a lot of time when troubleshooting.
Thanks!
Are you looking for hardware support?
No response
Describe the feature you want
Support for defining and using variables in GCode as described here: https://gcodetutor.com/cnc-macro-programming/cnc-variables.html
Additional context
No response