Welcome! Log In Create A New Profile

Advanced

G-code macros

Posted by ben.dani1997 
G-code macros
June 06, 2021 03:44PM
Hello everybody!

Is there a way to create g-code macros in the firmware?
I know I can create macros with M810-M819, but I want to set it up in firmware. I also know that I can set the M810-M819 in STARTUP_COMMANDS but that is messy with a long list of g-codes for me.

I would really appreciate the help, thank you!
VDX
Re: G-code macros
June 06, 2021 04:01PM
... yes, you can -- you have to create a new G-code in the list and corresponding methodes in the code-grouping files (some g-codes are "grouped" for better handling).

It's not this hard, if you look into the sources, how other codes were intrepreted and executed ...

Edited 1 time(s). Last edit at 06/06/2021 04:02PM by VDX.


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: G-code macros
June 06, 2021 04:12PM
Yes, that would be the best, but I'm not that experienced in C++ at this level. I found guides on how to create custom g-codes that change a pin state or move the printhead, but couldn't find one on how to call already existing g-codes.
I have some ideas that I could try, but I'm not exactly sure what I'm doing...
Sorry, only registered users may post in this forum.

Click here to login