How to use THC codes

I’m trying to set a rule for small circles which will reduce speed and issue an M101 (thc off) command at the start but what I am getting is that the code will make the pierce then the lead-in then it will insert the THC off command.

Due to the vagaries of Mach3 this introduces a stutter or pause in the motion making the lead-in pointless as the torch is on when it pauses. This is only an issue with cheap THC controls as they are controlled via Mach3 not directly.

Is there a way to create a rule for small circles where the THC is put off before the pierce and on at the end of the cut??

Obviously THC is not needed for small area cuts like this but when it’s part of a bigger job, control needs to be built into the code.

I’m sure there is a way, I’ve just not hit it yet :slight_smile:

You are using the cutting rules?
If yes, in the cutting rules editor,
select: on small circle, choose a size
start code: thc off
end code:thc on

if you still dont like this, try:
select: on lead-in ,
type 0.003 for distance
end code:thc off

select:before end
type .005 for distance (include lead-out)
end code: thc on

This will output thc off 0.005" after you start cutting, so waaay still in your lead-in, and will output thc on just before it stops.

I would try the "on small circle ’ way first, the simpler, the better.

On lead in gives this result…
N0090 G00 X113.5370 Y174.3800
N0100 G28.1 Z3.00 F800.0
N0110 G92 Z0.0
N0120 G00 Z3.9000
N0130 G92 Z0.0
N0140 G00 Z3.0000
N0150 M03
N0160 G04 P0.3
N0170 G01 Z1.0000
N0180 M101 (THC Off) (On lead in)
N0190 Y168.3800 F700.0
N0200 X113.5470
N0210 G03 X113.5370 I-0.0100 J5.1000 F350.0
N0220 M05
N0230 G00 Z10.0000
N0240 X0.0000 Y0.0000
N0250 M05 M30

On small circles gives this…
N0090 G00 X113.5370 Y174.3800
N0100 G28.1 Z3.00 F800.0
N0110 G92 Z0.0
N0120 G00 Z3.9000
N0130 G92 Z0.0
N0140 G00 Z3.0000
N0150 M03
N0160 G04 P0.3
N0170 G01 Z1.0000
N0180 M101 (THC Off) (On small circles)
N0190 Y168.3800 F350.0
N0200 G03 I0.0000 J5.1000
N0210 M05
N0220 G00 Z10.0000
N0230 X0.0000 Y0.0000
N0240 M05 M30

Near-Pierce will give this…
N0090 G00 X113.5370 Y174.3800
N0100 G28.1 Z3.00 F800.0
N0110 G92 Z0.0
N0120 G00 Z3.9000
N0130 G92 Z0.0
N0140 G00 Z3.0000
N0150 M03
N0160 G04 P0.3
N0170 G01 Z1.0000
N0180 M101 (THC Off) (Near pierce)
N0190 Y174.2800 F700.0
N0200 Y168.3800 F350.0
N0210 G03 I0.0000 J5.1000
N0220 M05
N0230 G00 Z10.0000
N0240 X0.0000 Y0.0000
N0250 M05 M30

As you can see they are pretty much identical and both insert the THC off after the pierce. This will still stall the torch after piercing while the M code runs in Mach.

What is really needed is a BEFORE PIERCE rule set so we get this…
N0090 G00 X113.5370 Y174.3800
N0100 M101 (THC Off) (Before pierce)
N0110 G28.1 Z3.00 F800.0
N0120 G92 Z0.0
N0130 G00 Z3.9000
N0140 G92 Z0.0
N0150 G00 Z3.0000
N0160 M03
N0170 G04 P0.3
N0180 G01 Z1.0000
N0200 Y168.3800 F350.0
N0210 G03 I0.0000 J5.1000
N0220 M05
N0230 G00 Z10.0000
N0240 X0.0000 Y0.0000
N0250 M05 M30

Then it will switch off before doing anything and the stutter will not matter.

Not sure if that can be done???

OK, it can be done, just have to think about it.
Using the “Operations” list and having the circle or whatever on a separate layer, use the insert code snippet to put THC on and off where its needed…

N1400 (Operation: Insert code snippet Code: THC Off)
N1410 M05
N1420 G00 Z10.0000
N1430 M101 (THC Off)
N1440 (Operation: Inside Offset, Circles, T3: 6.35mm Steel, 30A, Std Tip, 112v)
N1450 G00 X113.5370 Y174.3800
N1460 G28.1 Z3.00 F800.0
N1470 G92 Z0.0
N1480 G00 Z3.9000
N1490 G92 Z0.0
N1500 G00 Z3.0000
N1510 M03
N1520 G04 P0.3
N1530 G01 Z1.0000
N1540 Y168.3800 F350.0
N1550 G03 I0.0000 J5.1000
N1560 (Operation: Insert code snippet Code: THC On)
N1570 M05
N1580 G00 Z10.0000
N1590 M102 (THC On)
N1600 G00 X113.5370 Y168.3800
N1610 X0.0000 Y0.0000
N1620 M05 M30

That way I get exactly what I think I need and also full control over where it goes. Odd that it puts the instruction two lines before the insert but makes no difference.

I don’t think there is an automatic way of doing this.