I’ve been cutting metal but am still having to manually add M08/9 commands to the gcode manually to control the THC.

I’m using the newest GRBL with scriber post and other than it duplicating a lot of lines, it’s working well.

On holes smaller than 0.500" radius and lines shorter than six inches, I don’t need the THC. If I leave it on for small holes, it dives into the work. I also need to issue a move to safe Z command after every M05 because if the THC was running and the plate is warping, the system doesn’t know where z is until the next touch off. 0.500" is plenty to make up for the warping and to clear the dross on the way to the next touch off point.

Here’s an example of code that I’ve modified that works:

N8580 G38.2 z-1.969 F7.874

N8590 G92 Z0.0

N8600 G00 Z0.0866

N8610 G92 Z0.0

N8620 G00 Z0.2500

N8630 M03 S1000

N8640 G04 P0.5

N8650 G01 X49.9814 Y31.8338 Z0.1000 F4.0

N8655 M08

N8660 G02 X50.0774 Y31.9298 Z0.1000 I0.0960 J0.0000 F130.0

N8670 G03 X50.6390 Y32.4409 Z0.1000 I-0.0000 J0.5641

N8680 G02 X50.8543 Y32.6369 Z0.1000 I0.2153 J-0.0203

N8690 G01 X70.3336 Y32.6406 Z0.1000

N8700 G02 X70.5489 Y32.4447 Z0.1000 I-0.0000 J-0.2163

N8710 G03 X71.6720 Y32.4447 Z0.1000 I0.5616 J0.0529

N8720 G02 X71.8873 Y32.6406 Z0.1000 I0.2153 J-0.0203

N8730 G01 X91.3666 Y32.6369 Z0.1000

N8740 G02 X91.5819 Y32.4409 Z0.1000 I-0.0000 J-0.2163

N8750 G03 X92.7051 Y32.4409 Z0.1000 I0.5616 J0.0529

N8760 G01 X92.7052 Y32.4441 Z0.1000

N8770 X92.7052 Y38.7472 Z0.1000

N8780 X92.7051 Y38.7504 Z0.1000

N8790 G03 X91.5819 Y38.7504 Z0.1000 I-0.5616 J-0.0529

N8800 G02 X91.3666 Y38.5544 Z0.1000 I-0.2153 J0.0203

N8810 G01 X71.8873 Y38.5544 Z0.1000

N8820 G02 X71.6720 Y38.7504 Z0.1000 I-0.0000 J0.2162

N8830 G03 X70.5489 Y38.7504 Z0.1000 I-0.5616 J-0.0529

N8840 G02 X70.3336 Y38.5544 Z0.1000 I-0.2153 J0.0203

N8850 G01 X50.8543 Y38.5544 Z0.1000

N8860 G02 X50.6390 Y38.7504 Z0.1000 I0.0000 J0.2163

N8870 G03 X49.5159 Y38.7504 Z0.1000 I-0.5616 J-0.0529

N8880 G01 X49.5157 Y38.7472 Z0.1000

N8890 X49.5157 Y32.4441 Z0.1000

N8900 X49.5159 Y32.4409 Z0.1000

N8910 G03 X50.0774 Y31.9298 Z0.1000 I0.5616 J0.0529

N8915 M09

N8920 M05

N8925 G00 Z0.5000

Here’s the code as currently produced:

N8580 G38.2 z-1.969 F7.874

N8590 G92 Z0.0

N8600 G00 Z0.0866

N8610 G92 Z0.0

N8620 G00 Z0.2500

N8630 M03 S1000

N8640 G04 P0.5

N8650 G01 X49.9814 Y31.8338 Z0.1000 F4.0

N8660 G02 X50.0774 Y31.9298 Z0.1000 I0.0960 J0.0000 F130.0

N8670 G03 X50.6390 Y32.4409 Z0.1000 I-0.0000 J0.5641

N8680 G02 X50.8543 Y32.6369 Z0.1000 I0.2153 J-0.0203

N8690 G01 X70.3336 Y32.6406 Z0.1000

N8700 G02 X70.5489 Y32.4447 Z0.1000 I-0.0000 J-0.2163

N8710 G03 X71.6720 Y32.4447 Z0.1000 I0.5616 J0.0529

N8720 G02 X71.8873 Y32.6406 Z0.1000 I0.2153 J-0.0203

N8730 G01 X91.3666 Y32.6369 Z0.1000

N8740 G02 X91.5819 Y32.4409 Z0.1000 I-0.0000 J-0.2163

N8750 G03 X92.7051 Y32.4409 Z0.1000 I0.5616 J0.0529

N8760 G01 X92.7052 Y32.4441 Z0.1000

N8770 X92.7052 Y38.7472 Z0.1000

N8780 X92.7051 Y38.7504 Z0.1000

N8790 G03 X91.5819 Y38.7504 Z0.1000 I-0.5616 J-0.0529

N8800 G02 X91.3666 Y38.5544 Z0.1000 I-0.2153 J0.0203

N8810 G01 X71.8873 Y38.5544 Z0.1000

N8820 G02 X71.6720 Y38.7504 Z0.1000 I-0.0000 J0.2162

N8830 G03 X70.5489 Y38.7504 Z0.1000 I-0.5616 J-0.0529

N8840 G02 X70.3336 Y38.5544 Z0.1000 I-0.2153 J0.0203

N8850 G01 X50.8543 Y38.5544 Z0.1000

N8860 G02 X50.6390 Y38.7504 Z0.1000 I0.0000 J0.2163

N8870 G03 X49.5159 Y38.7504 Z0.1000 I-0.5616 J-0.0529

N8880 G01 X49.5157 Y38.7472 Z0.1000

N8890 X49.5157 Y32.4441 Z0.1000

N8900 X49.5159 Y32.4409 Z0.1000

N8910 G03 X50.0774 Y31.9298 Z0.1000 I0.5616 J0.0529

N8920 M05

This is what I’m talking about regarding duplicate lines:

N0170 G00 X50.0774 Y32.4026 Z0.5000

N0180 X50.0986 Y38.7127

N0190 X50.0986 Y38.7127

N0200 Z0.2500

N0210 M03 S1000

I’ve probably spent 40 hours studying LUA, attempting to mod the post processor myself, and just trying to add the commands in different places in the code but the M08/09’s just don’t show up in the right place and I can’t figure out the correct syntax. The guys who’s machine this is for bought a sheetcam license about a month ago so we’re not using the trial version. Any help would be greatly appreciated.