Skip to content

Latest commit

 

History

History
72 lines (42 loc) · 2.41 KB

macros.md

File metadata and controls

72 lines (42 loc) · 2.41 KB

Macros

Macros are an essential tool for configuring and managing Klipper. A number of macros are pre-defined in the example configurations but a lot more is possible.

Klipper macros are always in the following format:

[gcode_macro <macro_name>]
gcode:
    <gcode>
    <gcode>

Important: The tab / spaces before the gcode is required.

Required / Pre-built

To see examples of the macros themselves, look at the standard printer.cfg for the printer.

Homing Override / Safe Z Home

By default, all printers are setup with a [homing_override] configuration section that includes a gcode macro for the home process. This macro is updating during thee setup process to define the Z endstop location. However the homing override method always homes X and Y before homing Z.

The [safe_z_home] configuration allows for a Z homing process without requiring a repeat home of X and Y. To enable safe z homing disable homing override and provide a X,Y coordinate of your Z endstop pin. Be aware that enabling safe Z home will likely require a change in other processes / macros.

[safe_z_home]
home_xy_position: 175.5,253
z_hop: 5.0

G32

The G32 macro is included with the stock configuration for most printers. This is typically used as a "full home" process that will home and perform leveling / tilt adjustments.

PRINT_START

The PRINT_START macro is called at the start of every print by slicers that are confgured to be aware of it.

PRINT_END

The PRINT_END macro is called at the end of every print by slicers that are configured to be aware of it.

Extra Macros

The following macros are not included by default. Please download and look at the additional macros file for examples. To include the complete set of additional macros into the configuration, add the following line into the printer.cfg:

include [macros_extra.cfg]

CG28

A conditional G28. This can save time in a startup sequence if the system has been activated and homed already. Commonly used as the part of the G32 sequence.

G32

An updated G32 to include the CG28.

M141

Used to set exhaust fan threshold temperature based on chamber temperature sensor.

User Macros

Creator Macros Bed Size
120decibell G32, PURGE_BUCKET, TEST_SPEED_FAST 350mm

Contributors - please make sure your macros are well documented!