Example G-code macro?

Do you have an example of a G-code macro?

1 Like

The first and most simple macro I can think its


automatically unloads the filament and waits to the user to change the filament, then loads the filament and extrudes a little to purge any remaining in the nozzle

But can be any combinations of gcode
another example I use (on my prusa) its:

G28 W ; home all without mesh bed level
G80 ; mesh bed leveling
G81 ; check mesh leveling results

this last with
G28 W moves to home all the axis, then G80 performs the mesh leveling procedure checking the height of all 9 points in the bed (on prusa mk3 configurable to 49 points too) and saves the results to the EEPROM and finally with G81 the printer via serial, and hope via W-IFI too prints the heights of all the points of the bed.

these values can be copied directly from the terminal to a utility like http://lokspace.eu/3d-printer-auto-bed-leveling-mesh-visualizer/ to see if the bed its bended or someting like that