" macro template to replace M3, M4, M5 with plasma torch probe " use vim find and replace command... " TPT + PH - ToITH = ITH " TPT + 3.2 - 1.7 = 1.5 " TPT + 3.4 - 1.9 = 1.5 " TPT + 3.6 - 2.1 = 1.5 " TPT + 3.8 - 2.3 = 1.5 %s/\(M3\|M4\)/\r;begin probe for Pierce Height (PH) and Initial Torch Height (ITH)\r; Torch Probe Travel TPT=9.2mm\rG21 G91 (metric and relative)\rG38.2 Z-30 F800 (probe fast from safe retract, 20mm+TPT rnd)\rG1 Z8 (fast retract off probe switch)\rG38.2 Z-10 F400 (slow probe -2mm+retract)\rG1 Z9.2 F800 (fast retract to TPT)\rG1 Z3.2 (retract to Pierce Height PH, 150%-225% of ITH)\rM3 (light it up)\rG4 P1.0 (pierce delay, make THC delay => this+2.0)\rG1 Z-1.7 (transition from PH to ITH)\rG1 LDCrestore (restore feed rate, move mode, and units as needed)\r;end probe ITH\r/gc %s/M5/\r;begin safe retract and ready for probing next cut ITH\rM5 (put it out)\rG4 P0.75 (wait for THC to give Z control back to CNC)\rG21 G91\rG1 Z10 F800 (fast retract to safe height)\rG1 LDCrestore (restore feed rate, move mode, and units as needed)\r;end safe retract and ready ITH\r/gc promptrepl LDCrestore