m98 pretract_Z.g g91 ; relative mode G1 H1 Y350 F10000; move up to 350mm in the Y direction, stopping if the homing switch is triggered G1 H2 Y-2 ; move slowly 4mm in the -Y direction G1 H1 Y10 F400; move slowly 10mm in the +Y direction, stopping at the homing switch m98 punretract_Z.g