Does Marlin on the SKR-PRO-V1.2 board support g-code macros and subroutines?

The title kinda says it all. Subroutines and macros are extremely handy when writing routines by hand, or even modifying code generated by Carbide Create and Estlcam. I tried using the codes to call and return from subroutines, but it didn’t work. It’s also worth noting that I’m driving the SKR-PRO-V1.2 with a Raspberry Pi running CNC.js. It appears that it feeds g-codes one line at a time to the controller, which makes me wonder if Marlin is the issue or if CNC.js is.

I’ve attempted to find an answer to this question here and on the Internet. I’ll admit I probably know just enough not to be able to pose the question in a why that would return a response answer that would make sense. IF, Marlin is capable of g-code subroutines and/or macros, can the SKR be updated. IF, the SKR is capable, but only from an SD card, that would be good to know as well.

Any suggestions are welcome, I’m always learning new stuff here.

Marlin gcode command reference might help you figure out if the specific commands you’re looking for are supported.

It is based on Marlin I remember some posts about trying to add them (for the belt printer). But I am not sure if they are in the released branch yet.

1 Like

Thanks for that info. Do you know if the SKR-PRO-V1.2 board can even be updated with the new Marlin G-Code set? What I’m afraid of is that some or all of the code may be recognized, but won’t be able to use it because of some hardware limitation with the board design. Although what I’m looking for doesn’t really have anything to do with hardware ( subroutines and macros).

Another question I have is, when using js.CNC on a Raspberry Pi, is it the engine in js.CNC that’s doing the execution of code and simply sending the current G-Code, being pointed to by the program counter, to the SKR-PRO-V1.2 board? If so, can js.CNC be update to recognize subroutines and macros? Or, is there some similar engine that can process subroutines and macros that already exists.

I’ve got to say that I really like having the Pi serving up the js.CNC and allowing remote control of my router through a standard web browser. Gets rid of a lot of dangling wires! Thanks for that!!!

The SKR Pro can be updated with new versions of the Marlin firmware. If you purchased your board V1 or if your drivers on your SKR Pro match the drivers they support on the Pro, then you don’t even have to compile. You just need to drop the binary on the SD card. Assuming the subroutine/macro code makes it into the official Marlin build as Jeff suggests, then eventually it will make it into an V1 maintained build. According to posts by Jeff on this forum, they update their firmware every time Marlin released a major version, and sometimes more frequently to get specific bug fixes.

Understood, thanks for the update!