; this script compensates for what the Z offset is
; so if G31 P500 X-30 Y-15 Z1.7 then first probe will be at
; X30 Y20 (when G30 P0 X0 Y5)


M561 ; clear any bed transform

G30 P0 X5 Y5 Z-99999      ; probe near a leadscrew
G30 P1 X5 Y20 Z-99999     ; probe near a leadscrew
G30 P2 X20 Y5 Z-99999     ; probe near a leadscrew
G30 P3 X230 Y470 Z-99999  ; probe near a leadscrew
G30 P4 X250 Y470 Z-99999  ; probe near a leadscrew
G30 P5 X250 Y450 Z-99999  ; probe near a leadscrew
G30 P6 X270 Y470 Z-99999  ; probe near a leadscrew
G30 P7 X470 Y20 Z-99999   ; probe near a leadscrew
G30 P8 X470 Y5 Z-99999    ; probe near a leadscrew
G30 P9 X450 Y5 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors

M280 P0 S160              ; clear and reset BL touch
G29 S1                    ; probe the bed and enable compensation
