Plasma CNC and THC with PlanetCNC TNG

Plasma CNC cutting machine is one of the most commonly used types of CNC machine.

It’s used mostly for cutting Steel, aluminium and other conductive materials.

Like any other type of CNC machine, plasma machine has it own specifics. Machine should be properly designed for such type of machining, considering slag, steel dust, high temperatures, moisture, grease etc..

For plasma CNC machine we recommend using Mk3 controller for its Ethernet support. Ethernet protocol is more robust than USB and therefore more suitable for industrious environments.

Plasma cutter is a great source of electromagnetic interference. So special care should be taken into account when wiring machine electronics.
Be sure to use shielded cables for motors, limit switches. External power supply for motion controller is very recommended. Plasma cutters itself sometimes do not satisfy standards of electromagnetic compatibility (EMC), so make sure that your plasma cutter is within EMC regulations.

Special approach should be considered when designing toolpath program for plasma CNC machines. The reason for this is when plasma ignites and arc pierces trough material, this leaves a mark on material. So your work-piece could be well off from specified dimensions. For this purpose toolpath should include lead in and lead out moves. User should also pay attention to ignition delays, pierce heights etc..
You can use special CAM software intended exclusively for plasma cutting. SheetCAM software offers wide range of plasma toolpath options and it is very user friendly. PlanetCNC post processor is available.

Heat emitted from plasma could deform workpiece material, usually metal sheet, in such case plasma cutter would not cut at constant height which could result as a faulty workpiece or could damage plasma cutter in the process. This is usually solved with THC device. THC stands for Torch Height Control.

THC device measures arc voltage. Bigger the distance between the plasma torch and material higher the voltage and vice versa. So based on the voltage value we can maintain constant height of plasma torch above the material. THC device sends control signals to motion controller which then dynamically compensates Z axis and thus maintains constant cutting height.

Parameters related to THC are located in: File/Settings/Control/THC

Select Machine axis that would perform THC compensation moves. Usually this is Z axis

Dec Pin:
Select decrease input pin of controller. Pin is located at Input header. This pin will receive compensation signal for axis movement in negative direction.
Inc Pin:
Select increase input pin of controller. Pin is located at Input header. This pin will receive compensation signal for axis movement in positive direction.
OK Pin:
Select OK Arc input pin of controllers. Pin is located at Input header.
Range Min:
Minimal height compensation value oppose to relative Z0.
Range Max:
Maximal height compensation value oppose to relative Z0.
Speed is step/cycle time. This should be set by testing, try finding value that suits your machine. Recommended values are from 1-10.


PlanetCNC TNG software uses dedicated g-code to enable and disable THC device. G-code M54 P1 enables THC, M54 P0 disables it.

M3 (turn plasma on)
G04 P.2 (delay for 0.2 seconds)
M54 P1 (turn THC on)
G01 X10 Y10
M54 P0 (turn THC off)
M5 (turn plasma off)

Floating Z axis

Sometimes we need to modify our CNC machine in order to achieve our machining goals as quickly and as efficiently as possible. CNC machines such as plasma, plotter cutters, lasers need mechanism that helps with measuring of material surface.

Good example of such modification is Floating Z axis.

The concept is pretty straight forward:  Z axis has its own movable unit which is able to move when tool encounters with material surface.

Floating Z axis on a plasma machine is a safety feature that prevents any serious damage of your plasma torch, in case of hitting any obstacles on located on machine table.

For plotters and drag knife cutters,   floating effect comes handy because it is much easier to apply pressure of the pen or  knife onto material surface (paper, carton, vinyl etc) without the frustrating trial and error procedure.

Floating Z axis can also be used for measuring material top surface. In such case, floating z axis unit uses limit switch. When Z axis moves down towards the material, activated switch signals controller that surface of material was detected and zero work position of Z axis can be set.

This procedure is similar to movable tool sensor, except that thickness value is negative. See bottom of this page for more details.


Example of floating Z axis:


Example of floating Z axis on plasma machine using limit switch:


Obtaining thickness value on plasma machine with floating Z axis:

Full tutorial about movable tool sensor can be found here:

Slowly jog Z axis towards the material surface, so that the nozzle of plasma torch is just barely touching the surface of material. You can help yourself by adding a sheet of paper between torch nozzle and the surface of material. Start moving the paper and when you are not able to move paper anymore, set work position Z to Zero.


Now jog Z axis further more in -Z direction. When floating Z axis limit switch will activate, write down position value of Z axis. This is your thickness value.


You can make your own floating Z axis unit. 3D and STL files are published here:




Spindle synchronisation with PlanetCNC TNG

CNC lathe thread cutting requires spindle RPM’s to be synchronised with machines linear movement, we call this spindle synchronisation.

To achieve this, controller needs to read feedback signal from machines spindle to obtain information at which RPM spindle rotates.

For this purpose we can use incremental (with quadrature A and B signals ) encoder or some sort of sensor that would read spindle RPM’s.

If we would use only sensor, we could use optical or magnetic sensor.

But since encoders already use index signal, choosing encoder would satisfy all our needs.

Encoder should rotate at same rotational speed as spindle. Normally it is mounted directly on spindle shaft or connected to spindle shaft via pullyes and timing belt. In such case make sure that transmission rate is at 1:1.

Encoder uses two quadrature signals, A and B and  Index signal. For our purposes 100PPR(parts per revolution) encoder would do just fine.

Encoder is connected to controller via its CTRL header:


Encoder wiring  for Mk3 controller:

Signal A from encoder is connected to EN4A  pin and signal B from encoder to EN4B pin of CTRL header.

Index signal from encoder is connected to IDX pin of CTRL header.


Encoder wiring for Mk3/4:

Signal A from encoder is connected to ENC A  pin and signal B from encoder to ENC B pin of CTRL screw type terminal.

Index signal from encoder is connected to IDX pin of CTRL screw type terminal.

PlanetCNC TNG encoder settings:

Encoder settings are located in: File/Settings/Input/Output/Spindle -> Encoder

PPR: PPR value of your encoder.

Index PPR: Number of index signals per one revolution of encoder.
Invert: Inverts Index signal.

Debounce: Debounce time period for index signal.


Video of thread cutting using lathe CNC machine and PlanetCNC TNG software and motion controller:

Guidelines when submitting your problem to PlanetCNC support

Some users face an obstacle during their time learning and using PlanetCNC software.
While we always try to give fast and effective support, sometimes we need more info about the problem user is facing in order to come up with solution as fast as possible.

So when you post e-mail or ticket regarding your problem we ask you to provide the following:

1. Clear and in-depth description of your problem.
Please use English language if possible. Please understand that you know your machine and we don’t.

2. Attach files:
.settings(File/Export Settings)
.gcode (.dxf, .gerber)
.Scripts folder (zipped)
.var(located in your installation folder)
log text (Menu Help/Show Log then copy/paste)
.tbl(located in your installation folder)
.keys(located in your installation folder)
.state(State 1-5)
.btn(.btnbottom, .btnleft, .btnright, .btntop)

3. Past experience has shown that video recordings can be very helpful.
Sometimes things do not go smoothly and error occurs during machine operation. In such case it is best to post two video files:

a.) Video of your machine during operation. Video should show machine operation and the exact moment when it comes to an error.
b.) Video of complete PlanetCNC sw user interface during the machine operation mentioned in point a.

This way we can compare both videos and see if anything unusual is happening in software and how software behaviour reflects on machine performance.
It is necessary that for this you use program and settings files that you sent us.

4. If any error message is displayed in PlanetCNC sw please make screenshot of it and post it.

These of course do not apply to each possible scenario, but you should be able to recognise what is applicable in your case.

Using “Warp” with PlanetCNC TNG software

Since PCB milling is a very delicate and precise procedure (distance between two pads can be only few mils), already smallest PCB surface height irregularities can create bad results.

So it is very important that depth of milling is constant over the whole PCB surface throughout the whole milling process. We can achieve this by using “Warp” procedure.

‘Warp’ feature helps apply generated toolpath over bended, curved or uneven surfaces.

The most important step of ‘Warp’ procedure obtaining surface points. We can  either capture each point single-handedly  or we can use “Measure Surface” procedure. We recommend the latter.

Step 1:
Place your workpiece material (in future text ‘copper board’) to machines table. Mount it properly, so that you avoid any inconveniences later such as vibration, dislocation etc…also make sure that copper board is not in contact with the machine table.

Step 2:

Since copper board itself is conductive material,  it can already be used as sensor. You can solder wire to it or you could just use mounting screw to attach connection wire to copper board.

Now connect wire from your copper board to controllers ‘sensor’ input.

Other wire should be connected to controllers GND terminal. Other end of this wire can be clamped to engraving tool:

While Mk3/4 controller has a designated sensor input, Mk3 controller uses assignable inputs, so you can connect copper board wire at any input of Input header and configure it in settings later.


Step 3:

Now open IO tab and check if correct input is activated under “Input” panel. This is just to be sure that everything is working correctly. Image below shows that Input 1 is activated.

Step 4:

Jog your machine to desired initial origin point of your copper board, usually its corner, and click: “Machine/Work Position/Axis to Zero/XY” or click “Work Position Axis to Zero XY” button from toolbar.

With work position XY set to zero, you have initial point of your workpiece material from which you will start your ‘Warp’ measuring as also your g-code program.

Step 5:

To measure Z axis zero work position, click: “Machine/Work Position/Measure”  or click “Work Position Measure” button from toolbar.


Step 6:

Now that we set zero XY and Z axis work positions, we can start with surface point measuring.

Click “Machine/Measure/Measure Surface”:

“Measure surface” user dialogue will appear:

Position X: X axis initial point of surface measuring.

Position Y: Y axis initial point of  surface measuring.

Size X: X axis dimension of measuring area surface.

Size Y: Y axis dimension of measuring area surface.

Step: Distance between to neighbourly measuring points 



Step 7:

After you click OK, machine will begin measuring surface points of copper board.


Step 8:

When surface measuring procedure is finished,  measured points are saved in PlanetCNC TNG main installation folder as “MeasureSurface.txt” file.

Step 9:

Now open your Gerber file using “File/Import Gerber”:


Step 10:

Set Z axis work position to zero, click: “Machine/Work Position/Measure”  or click “Work Position Measure” button from toolbar.

Step 11:

To apply “Warp” click: “Program/Warp” and click “Load…” button. Locate file “MeasureSurface.txt” and click Open.

Table will be populated with coordinates of measured points:

Click OK.


Step 12:

You will notice that the displayed toolpath has changed in order to compensate for boards curved surface. This is much more evident if you set parameter “Alpha” in settings(File/Settings/User Interface/Colors/Alpha).

These are all steps required to apply Warp with your program. Machine will mill at constant depth no matter of the surface curvature.




“Measure surface” script file is available for edit.

You can open and edit script file if you click: “File/Settings/Program Options/Scripts/Measure” and select “Measure/Measure Surface” from drop down menu. Click: “Edit Script” and script file will open in your default text editor.

Alternatively you can open surface measure script file “Machine.Measure.Measure_Surface.gcode” located in “PlanetCNC64.Scripts” folder with your text editor.


How to configure limit switch inputs of controller in PlanetCNC TNG software

Limit switches are used to reference your machine(homing procedure) as also for safety reasons.

If you use only one limit switch for axis X motor (positive direction), connected to controllers limit input 1:


If you have two limit switches for axis X motor (negative and positive direction), connected to same limit input of controller:


If you have two limit switches on X axis(negative and positive direction), connected to separate limit inputs of controller:


Same principles that were shown above for X axis can be used for all other axes.

Limit switch test:

When your limit switches are connected to limit inputs of controller, you can test if PlanetCNC TNG software senses the limit switch activation. On main screen click the “IO” tab and observe controllers Limit status bar behaviour:



Invert option:
If you use normally closed type of limit switches then you can invert controller limit input in settings: File/Settings/Limit


Click round button next to limit pin that you wish to invert:


How to set Steps Per Unit values in PlanetCNC TNG software

Steps per unit value (in further text SPU) defines how many step pulses controller needs to generate in order that axis moves for distance of one unit. Units can be in millimeters or in inches.

SPU value depends on few factors: stepper motor, stepper drivers micro-step configuration, lead screw pitch:

Stepper motors usually have 200 or 400 full steps per one rotation of its shaft.
One rotation of shaft in degrees is 360°. For motors with 200 steps per revolution this means
one step is equal to 1.8°. For motors with 400 steps per revolution this means one step is equal to 0.9°.

In equation below, we will name this parameter M

With micro-stepping we improve motors resolution, accuracy, smoother movements, we reduce
resonance problems etc. The real compromise is that as you increase the number of micro-steps per
full step the incremental torque per micro-step drops off drastically. Resolution increases but
accuracy will actually suffer.

With micro-step number we define, how many smaller steps is one full step divided into.
Most common values are ½ , ¼ , ⅛… but it is really up to you which micro-step value you will use.

In equation below, we will name this parameter S

Usually CNC machines operate with the help of lead screws and nuts. They can be trapezoidal or
ball screw leads. The pitch of a screw thread is the distance between adjacent threads. When lead
screw is rotated for one revolution, this reflects as linear motion of axis. Distance traveled is equal
to lead screw’s pitch.

In equation below, we will name this parameter P

(Some CNC machines use rack and pinion instead. Distance traveled when pinion makes one
revolution can also be considered as pinion pitch. Similar is also true for toothed belt drive.)

Setting SPU values of your machine in PlanetCNC TNG software

StepsPerUnit tab can be found in settings under Motors section: File/Settings/Motors

We can calculate SPU values for our machine by starting from two different conditions:

If we know all variable values:
Calculating correct SPU value is easy: SPU value = (M*S)/P

If we don’t know all variable values:
We will have to do some measuring and provide ourselves with some numbers. Then we will be able to calculate correct SPU value.

We use metric units so our unit is millimeter. If you use imperial units (inches) then values are different.

1) In Settings/Axes/Setup we set our SPU value to some “normal” number, say 200 steps per unit.


2) Jog machine to a suitable location, and set: Machine/Work Position/Axis to Zero/XY offsetXY.

3) Now let’s say that we want to move X axis from our offset zero position to X=10 position and measure the actual distance for which machine will move. To measure the distance of machines travel, we can use ruler, caliper or measuring tape which we place under machines tool.

Tool should start at 0 of the ruler:

In MDI window write X10:

Machine should move from X=0 to X=10, therefore travel for 10mm, but when we execute MDI command we can see that machine travelled for 2.5mm instead of 10mm:

Meaning, our current SPU value moves machine axis for wrong distance.

4) We can ask ourselves a question:

If ‘Current SPU’ value moves X axis for ‘Measured distance’ value, what is the ‘Correct SPU’ value that will move X axis for ‘Entered distance’ value?

Equation looks like this:
Correct SPU value = ( Current SPU value * Entered distance value ) / Measured distance value

Current SPU = 200
Entered Distance = 10
Measured distance = 2.5

Correct SPU value= (200*10)/2,5 = 800 SPU

Now we enter correct value for SPU in Settings/Axes/Setup, Enter X10 in MDI window and measure the new distance value.

Measured distance value is now correct. Our steps per unit are correctly set.

It is recommended to repeat this procedure several times and use largest possible travel. Using 10mm travel is good for first pass but if you use maximum possible distance machine can travel, you will obtain much better results.

Basic PlanetCNC TNG connection settings

PlanetCNC TNG software recognises all PlanetCNC controllers that are connected to your PC trough USB or Network ports. You would need to select controller that will serve as primary controller.

Basic connection settings:


Lets start by going trough connection parameters in settings: File/Settings/Connection

Select the type of connection that you wish to use with your controller:
-Network(Only Mk3 controller)
“Adapter IP” setting allows you to insert your network adapter IP address.

When you select type of connection, you will notice that window with connected devices will add new controller(s) to the list(beside Simulation). If you have multiple controllers connected via USB to your computer, software will display them. In case of enabling Ethernet option, software will display also controllers connected to you network:

To select your primary controller from device list, you double click on it. “Primary controller” window will display type of connection, type of controller and its serial number.
Primary controller

Now that your primary controller is selected click OK and then you can observe its communication status.

Connection light colour description:

If you look closely at the bottom right corner of PlanetCNC TNG software you will notice that there is a round light.
This light can be lit in various colours and each colour indicates different connection state.

Green light indicates that controller is updated to correct firmware version and controller is activated meaning license is found by software. connected_license

Green light with X indicates that software does not find proper license for connected controller. connected_NO_license

Orange light indicates that controllers firmware version is not correct. Update firmware of controller. Firmware_not_correct

Gray light indicates no communication between controller and software. Click “Machine/Controller/Reconnect” and make sure that correct controller is set as Primary controller in settings. Not connected_No license

Red light indicates that software is processing commands and is sending them to controller. ProgramRunning

Communication status can also be indicated by observing on-board Link LED. If this LED is blinking in pattern of approximately 500ms, controller is communicating with software. When software is processing commands and is sending them to controller, this LED will be blinking even faster.

If Link LED is not blinking, this indicates communication has dropped.

PlanetCNC TNG software overview and performance guidelines


PlanetCNC TNG is a high performance CNC system. It is designed with flexibility in mind and it can be used for mills, routers, lathes, plasma or laser machines as well as any other machine or system where coordinated movement of servo or stepper motors is needed.

PlanetCNC TNG software works with Mk3 series of motion controllers and PC running windows 7, 8, 8.1, 10 or Linux.

Further in this post we will describe few guidelines that you can follow in order to achieve better performance of PlanetCNC TNG software and more stable communication with PlanetCNC controllers.

  • For best performance of PlanetCNC TNG software, PC with 4 virtual processors(cores) CPU is recommended. However, PC’s with 2 virtual processors will do just fine. Various services running in the background, antivirus software and program updates can interfere with PlanetCNC TNG performance and that is why dedicated computer is recommended.
  • Controller should be connected directly to computers root USB port. We recommend that you connect controller to computer root USB port via USB HUB device. Note that controller should be the only USB device connected on this HUB.
    You see, all devices connected to the same HUB device share available bandwidth. Because data traffic is prioritised by the OS, it would not be uncommon if another device connected to same HUB would interfere with controller and therefore compromise the communication between controller and PC.

    You can check which devices are connected to your PC USB ports with “UsbTreeView” software. You can get it here:UsbTreeView

  • Images below describe bad and good type of USB connection with PC:

    Example of bad USB connection with PC as seen in UsbTreeView software:
    You can notice that PlanetCNC Controller is connected with PC trough various USB HUB devices(3 in total). Also, if you look closely at the USB HUB device to which PlanetCNC controller is connected, you can see that other connected devices to this USB HUB, are mass storage device and USB camera, both known as devices with huge data flow. The data flow of camera or storage device could interfere with communication of controller which as result would not perform at its best performance.

    Example of good USB connection with PC as seen in UsbTreeView software:
    You can see that PlanetCNC controller is connected directly to one of computers root USB ports. There are no other devices connected to root hub.

  • Use double shielded USB cable. If cable longer than 1.5m is needed then it should be one with active repeater.
  • If Ethernet connection is used then dedicated network card just for controller is recommended. This prevents that high network utilisation interfering with communication.
  • Controller should have its own separate external power supply.
    If controllers voltage is supplied only trough USB, than there is a possibility that voltage fluctuations on the USB power line could interfere with USB communication and as a result communication would drop.
    For Mk3 and Mk3/4 controllers you can use 8-24VDC, 200mA power supply.
    IMPORTANT!!! For Mk3ECO controller power supply must be +5V VDC.
  • Use shielded cables for wiring of limits switches, motors…

Please note that these are not minimum requirements for controller and software to function. PlanetCNC controller can easily function on Celeron based PC’s as also controller can be connected to HUB device which serves as source for multiple other devices.



Using Adapter for 16 pin header with PlanetCNC controllers

If you need to connect your external electrical equipment such as sensors, switches, buttons, encoders with controller using single wires, you can use adapter for 16pin header.


Adapter pinout when connected to CTRL header of Mk3 controller:


Adapter pinout when connected to JOG header of Mk3 controller:


Adapter pinout when connected to LIMIT header of Mk3 controller:


Using Adapter for 10 pin header with PlanetCNC controllers

If you need to connect your external electrical equipment such as sensors, switches, buttons, encoders with controller using single wires, you can use adapter for 10pin header.


Adapter pinout when connected to AUX header of Mk3 controller:


Adapter pinout when connected to AXIS header of Mk3 controller:


Adapter pinout when connected to INPUT header of Mk3 controller:


Adapter pinout when connected to IOEXT header of Mk3 controller:


Adapter pinout when connected to OUTPUT header of Mk3 controller:


Adapter pinout when connected to SDI2C header of Mk3 controller: