; Wait for planner queue to finish %Wait ; Set machine specific vars, values are in millimeters %BLOCK_X_POS = 767.48 ; X position of block in machine coordinates %BLOCK_Y_POS = 165.33 ; Y position of block in machine coordinates %BLOCK_Z_OFFSET = 0.0 ; Blocks distance above or below spoil board %MAX_Z_TRAVEL = 104 ; Your $132 Z Max Travel %MAX_STICKOUT = 58 ; The stickout of your longest bit ; Computed vars %MAX_SAFE_Z_DOWN = [MAX_Z_TRAVEL] - [MAX_STICKOUT] %PROBE_DISTANCE = [MAX_Z_TRAVEL] - [MAX_SAFE_Z_DOWN] %wait ; Save modal state %WCS = modal.wcs %PLANE = modal.plane %UNITS = modal.units %DISTANCE = modal.distance %FEEDRATE = modal.feedrate %SPINDLE = modal.spindle %COOLANT = modal.coolant G21 ; Metric G90 ; Absolute positioning G53 G0 Z0 G53 X[BLOCK_X_POS] Y[BLOCK_Y_POS] G91 G0 Z-[MAX_SAFE_Z_DOWN] G38.2 Z-[PROBE_DISTANCE] F200 G0 Z1 G38.2 Z-2 F10 G4 P.25 G38.4 Z10 F5 G4 P.25 %wait G10 L20 Z[BLOCK_Z_OFFSET] %wait G53 G0 Z0 G90 G0 X0 Y0 ; Restore modal state [WCS] [PLANE] [UNITS] [DISTANCE] [FEEDRATE] [SPINDLE] [COOLANT]