@lael
PLAOffset:
; M-MAX (printer's name, I have two)
M291 P"PLA Offset" S0 T5 ; Show which one called
G31 P500 X25 Y45 Z1 ; set threshold and offsets - z offset is last one - increase to get closer to the bed
M207 S1.5 F6000 R0 Z0.03 ; firmware retraction
Firmware retraction may need changing for different filaments, so far they don't. I have another one for PETG, it needs a different Z offset. I call this in the start gcode in PrusaSlicer. Editing a macro is faster than rebooting the Duet.