G91 ; relative positioning G1 H2 Z25 F6000 ; lift Z relative to current position ; X Axis G1 H1 X350 F4000 ; move quickly to X endstop and stop there (first pass) G1 X-5 F6000 ; go back a few mm G1 H1 X350 F360 ; move slowly to X axis endstop once more (second pass) G1 H1 X350 ; then move slowly to X axis endstop ; Y Axis G1 H1 Y350 F4000 ; move quickly to Y axis endstop and stop there (first pass) G1 Y-5 F6000 ; go back a few mm G1 H1 Y350 F360 ; move slowly to Y axis endstop once more (second pass) G1 H1 Y350 ; then move slowly to Y axis endstop ; Z Axis ;G91 ; relative positioning ;G1 H1 Z25 F1000 ; lift Z relative to current position G90 ; absolute positioning G1 X150 Y150 F6000 ; Go to the bed centre & probe point and home the Z axis G1 H1 Z-99999 F1000 ; move Z down until the endstop is triggered G1 H0 Z25 F1000 ; lift Z 25mm G1 H1 Z-100 F400 ; G30 ; Calibrate Z-axis ; G92 Z0 ; set Z position to axis minimum (you may want to adjust this) G1 H0 Z25 F6000 ; lift nozzle ;G28 ; Start by homing all axis ;G29 ; disable any existing compensation ; Loop 1 ; G32 ; run bed.g macro G90 G1 Z25 F6000 G30 P0 X10 Y10 Z-99999 H0 S1 G1 Z25 F6000 G30 P1 X10 Y290 Z-99999 H0 S1 G1 Z25 F6000 G30 P2 X290 Y290 Z-99999 H0 S1 G1 Z25 F6000 G30 P3 X290 Y10 Z-99999 H0 S4 G29 S0 ; create height map 1 G29 S3 P"Map1.csv" ; rename to map 1 ; Loop 2 ; G32 ; run bed.g macro G90 G1 Z25 F6000 G30 P0 X10 Y10 Z-99999 H0 S1 G1 Z25 F6000 G30 P1 X10 Y290 Z-99999 H0 S1 G1 Z25 F6000 G30 P2 X290 Y290 Z-99999 H0 S1 G1 Z25 F6000 G30 P3 X290 Y10 Z-99999 H0 S4 G29 S0 ; create height map 2 G29 S3 P"Map2.csv" ; create height map 2 ; Loop 3 ; G32 ; run bed.g macro G90 G1 Z25 F6000 G30 P0 X10 Y10 Z-99999 H0 S1 G1 Z25 F6000 G30 P1 X10 Y290 Z-99999 H0 S1 G1 Z25 F6000 G30 P2 X290 Y290 Z-99999 H0 S1 G1 Z25 F6000 G30 P3 X290 Y10 Z-99999 H0 S4 G29 S0 ; create height map 3 G29 S3 P"Map3.csv" ; create height map 3 ; Loop 4 ; G32 ; run bed.g macro G90 G1 Z25 F6000 G30 P0 X10 Y10 Z-99999 H0 S1 G1 Z25 F6000 G30 P1 X10 Y290 Z-99999 H0 S1 G1 Z25 F6000 G30 P2 X290 Y290 Z-99999 H0 S1 G1 Z25 F6000 G30 P3 X290 Y10 Z-99999 H0 S4 G29 S0 ; create height map 4 G29 S3 P"Map4.csv" ; create height map 4 ; Loop 1 ; G32 ; run bed.g macro G90 G1 Z25 F6000 G30 P0 X10 Y10 Z-99999 H0 S1 G1 Z25 F6000 G30 P1 X10 Y290 Z-99999 H0 S1 G1 Z25 F6000 G30 P2 X290 Y290 Z-99999 H0 S1 G1 Z25 F6000 G30 P3 X290 Y10 Z-99999 H0 S4 G29 S0 ; create height map 5 G29 S3 P"Map5.csv" ; create height map 5