Updated Macro (Probe FRONT LEFT TOP with $# PRB. Position probe up to 15mm inland and above corner - JO 9/2-alpha) ; Set user-defined variables %PROBE_TIP_DIA = 2.0 ; Diameter in mm %PROBE_INERTIA_Z = 0.00 ; Machine overshoot Z due to inertia %PROBE_INERTIA_XY = 0.00 ; Machine overshoot XY due to inertia %PROBE_BLOCK_X = 0 ; Probe/puck thickness, X %PROBE_BLOCK_Y = 0 ; Probe/puck thickness, Y %PROBE_BLOCK_Z = 0 ; Probe/puck thickness, Z %PROBE_PROBE_RANGE = 10.0 ; Range that G38.x will use %PROBE_CLOSE_RANGE = 2.0 ; Distance to retreat before slow probe %PROBE_PROBE_SLOW = 50.0 ; Slow probe rate for G38.x %PROBE_PROBE_FAST = 125.0 ; Fast probe rate for G38.x %PROBE_DROP_BY = 5.0 ; Distance Z drops before probing (typ double WITHDRAW) JO: Was 7 now 5 %PROBE_WITHDRAW = 3.0 ; Distance axes pull back after probing ; Wait until the planner queue is empty %wait ; *** FRONT LEFT 'TO and AWAY' PROBE XYZ *** G21 ; Make sure we’re in mm M5 ; Just to be sure, ensure spindle is stopped G91 ; Incremental mode ; *** Z Probe *** Downwards is -ve G38.2 Z[-PROBE_PROBE_RANGE] F[PROBE_PROBE_FAST] ; First probe quickly to find Z G0 Z[PROBE_CLOSE_RANGE] ; Withdraw now Z roughly located, raise Z a little %wait G38.2 Z[-PROBE_PROBE_RANGE] F[PROBE_PROBE_SLOW] ; Now probe TO slowly to reduce inertia $# ; Ask for PRB report %wait ; Let Reports catch up %PROBE_Z=(params.PRB.z) ; Retrieve Z from PRB ([PROBE_Z]) ;([JSON.stringify(params.PRB.z)]) G10 L20 P1 Z[PROBE_Z +PROBE_BLOCK_Z -PROBE_INERTIA_Z] ; Set Z0 with PRB compensations G0 Z[PROBE_WITHDRAW] ; Pull up Z to clear puck/workpiece ; *** X Probe *** Rightwards is +ve G0 X[-PROBE_PROBE_RANGE] ; Move left G0 Z[-PROBE_DROP_BY] ; Drop Z below top of puck/workpiece G38.2 X[PROBE_PROBE_RANGE] F[PROBE_PROBE_FAST] ; Probe TO X to the right quickly G0 X[-PROBE_CLOSE_RANGE] ; Withdraw a little %wait G38.2 X[PROBE_PROBE_RANGE] F[PROBE_PROBE_SLOW] ; Now probe TO slowly to reduce inertia $# ; Ask for PRB report %wait ; Let Reports catch up %PROBE_X=params.PRB.x ; Retrieve X from PRB ([PROBE_X]) G10 L20 P1 X[PROBE_X -PROBE_TIP_DIA/2.0 +PROBE_BLOCK_X -PROBE_INERTIA_XY] ; Set X0 with compensations G0 X[-PROBE_WITHDRAW] ; Move left by retract distance to clear block G0 Z[PROBE_DROP_BY] ; Raise Z to avoid conflict when moving ; *** Y Probe *** Backwards is +ve G0 Y[-PROBE_PROBE_RANGE] ; Move forward towards front of machine G0 X[PROBE_PROBE_RANGE] ; Move right G0 Z[-PROBE_DROP_BY] ; Drop Z below top of puck/workpiece G38.2 Y[PROBE_PROBE_RANGE] F[PROBE_PROBE_FAST] ; Probe TO Y rearwards quickly G0 Y[-PROBE_CLOSE_RANGE] ; Withdraw a little forwards G38.2 Y[PROBE_PROBE_RANGE] F[PROBE_PROBE_SLOW] ; Probe TO Y slowly $# ; Ask for PRB report %wait ; Let Reports catch up %PROBE_Y=params.PRB.y ; Retrieve Y from PRB ([PROBE_Y]) ; G10 L20 P1 Y[-PROBE_Y -PROBE_TIP_DIA/2.0 -PROBE_BLOCK_Y +PROBE_INERTIA_XY] ; Set Y0 with compensations G10 L20 P1 Y[PROBE_Y -PROBE_TIP_DIA/2.0 +PROBE_BLOCK_Y -PROBE_INERTIA_XY] ; Set Y0 with compensations - JO test for Y 0 on left side %wait G0 Y[-PROBE_WITHDRAW] ; Move forward to clear puck/workpiece G0 Z[PROBE_DROP_BY] ; Raise Z to avoid conflict when moving ; *** Wrap-up *** G90 ; Back into Absolute mode G0 X0Y0 ; Go to this new X0Y0 ; *** All Done ***