Hi All,

I have just completed the build of a plasma tube cutter utilising a PlanetCNC Mk3/4 controller card. It has a normal X-axis feed, the rotary axis is set up as a Y-axis, not as an A-axis. It is calibrated to turn exactly 360 degrees for 360mm of Y-axis command. A JYKB-100-NEMA23 Torch Height Lifter is set up as the Z-Axis. It has limit switches on the travel extremes, as well as a touch sensor switch that detects when the torch touches the workpiece. This touch sense is connected as an input switch, not as another limit switch. It is in addition to the normal limits 1, 2 and 3 for X,Y and Z.. I also have the Polabs PlasmaSenseOut torch height controller fitted, but not yet activated in the TNG v2 software, I need to first sort out my touch-off G-Code syntax.

I have it running fine, but no Z-axis commands implemented yet. I am currently setting the torch height manually before starting the cut. It cuts pretty darn good, I can cut complex scallops in seconds which would otherwise have required printed templates to be manually marked onto the tubes, then the ends scalloped by hand. It does both sides of the tube, and can process multiple tubes cut from a full 12ft length in one go.

I need to add some fixed G-Code syntax to my post-processor, just before the cut initialises to set up the initial torch height, and just after the cut has ended to retract the torch fully. The idea is to at the start, have the Z-axis extend down until it senses the touch input switch, and to then retract a pre-set amount. From there, when the plasma starts, the THC will maintain the correct torch height gap. After the cut is completed, the torch should retract until it hits the Z-limit switch, then extend down 10mm. This state then leaves the torch well clear of the workpiece, it would allow me to easily remove and insert any diameter tube to be cut, without having to dodge the torch tip being in the way.

Could anyone assist me with some ideas of standard G-Code syntax that should work to achieve the touch-off sensed by Input 4, and to then retract Z-axis by 5mm? Also, some ideas of standard G-Code syntax to retract the Z-axis until it triggers Limit Switch 3, and to then extend by 10mm.

Thanks in advance,