Macros
This section describes how to add a START_PRINT and END_PRINT macro in Klipper which will replace the gcode that is usually set in your Slicer software. I see moving the Start/End Print gcode from the Slicer to Klipper as an advantage, as you can update the gcode in your printer.cfg in Klipper directly, instead of having to open your Slicer, change the settings and then re-slicing the file you want to print.
These steps are optional, you can leave Start/End gcode in your slicer and still be able to print a file successfully in Klipper. If you will not be doing these Macros, you can continue to the First Print section.
Adding
[gcode_macro START_PRINT]and[gcodemacro END_PRINT]to yourprinter.cfg;From the MainsailOS web interface, click
Machine, then click onprinter.cfg;

Scroll down until you see the
[pause_resume]section;Copy all of the text from the
Start_Print_and_End_Print.txtfile above and paste it just after the[pause_resume]section in theprinter.cfgfile;
You can add this macro anywhere in the printer.cfg file, but to keep things clean I added it just above the existing macros already present in the printer.cfg file.

Click the
Save & Restartbutton near the top right of the window;This will save the
printer.cfgfile and and restart Klipper;
Last updated