G91 ; relative positioning G1 H1 X-600 F1800 ; move up to 600mm in the -X direction, stopping if the homing switch is triggered (first pass) G1 H2 X5 F6000 ; go back a few mm G1 H1 X-600 F360 ; move slowly to X axis endstop once more (second pass) G90 ; absolute positioning