Using MPG pendant with PlanetCNC controller

With Mk3 controller you can use MPG pendant. MPG is connected with MK3 controller via MPG adapter board.


First connect MPG adapter board with controller using controllers CTRL header. Then connect MPG to adapters DB25 connector:

Please read this tutorial on how to use MPG with PanetCNC TNG software:

Updating to new PlanetCNC USB driver

PlanetCNC TNG software uses new and optimised USB driver.

In order to update and use your PlanetCNC Mk3 series controller with PlanetCNC TNG software, you would need to use latest PlanetCNC USB driver.

To check your USB driver version click: Win Key/Control Panel/Device Manager

Under connected devices you will notice CNC USB controller:

Right click on it and choose Properties, and under Driver tab you will see USB driver version:

You will notice that USB driver version is and that it is not digitally signed.

You can get latest PlanetCNC USB driver here: PlanetCNC software download page

After you download file double click on the .exe file and follow installation wizard.

After installation is complete, it would be best to restart your computer.

Now check if your USB driver has been updated to latest version, click: Win Key/Control Panel/Device Manager

You will notice that PlanetCNC device has a new name: PlanetCNC controller

If you check properties of this device you will see that under Driver tab driver version is now and is digitally signed by PlanetCNC d.o.o.:

Disabling Driver Signature on Windows 8

PlanetCNC Drivers are now signed. This tutorial no longer applies!



Invoke the Charms bar and click on Settings. Open control panel by clicking on “Change PC Settings”:



Select “General” and then “Advanced Startup”:

For Windows 8.1: Select “Update and Recovery” and then “Recovery”

Click “Restart now”. Now the system will restart and might take some minutes to show up the boot menu. Wait for It patiently.

After some time you will be prompted with a menu with following options:

– Continue
– Troubleshoot
– Turn off

Choose “Troubleshoot”:


Then the following menu appears:

– Refresh your PC
– Reset your PC
– Advanced Options

Choose “Advanced Options”:


Then the following menu appears:

– System Restore
– System Image Recovery
– Automatic Repair
– Command Prompt
– Windows Startup settings

Choose “Windows Startup Settings”, then Click Restart:


Now the computer will restart and the boot menu appears.
Choose “Disable Driver signature Enforcement” from the menu.


When Windows start, you will be able install PlanetCNC USB driver.

Disabling Driver Signature on Windows 10

PlanetCNC Drivers are now signed. This tutorial no longer applies!



Select “Settings” from the Start Menu:



Select the “Update & recovery” option:
Update and Recovery

Then click on the Recovery option on the left hand side, and once selected, you will see an advanced startup section appear on the right hand side. You will need to click on the “Restart now” button.


Once your Computer has rebooted you will need to choose the Troubleshoot option:


Click Advanced options:


Click Startup Settings:

Since we are modifying boot time configuration settings, you will need to restart your computer one last time:


You will be given a list of startup settings that you can change. The one we are looking for is “Disable driver signature enforcement”. To choose the setting, you will need to press the F7 key:


When Windows start, you will be able to install PlanetCNC USB driver.

How to setup CNC machine using PlanetCNC software and controller?

I will try to show you how to setup your CNC using PlanetCNC software. I will use my router machine as an example but you can do it similar way on all machine types. I use metric (millimeter) units but everything is same with imperial (inches) units except numbers are different (1mm is apporximately 0.03937in).


“Steps per unit” settings are already calculated and set. You should verify that distances in all directions are correct when machine moves. If position display changes for 100mm then machine should move 100mm.
If your SPU is not yet set please read SPU tutorial: How to set Steps Per Unit values?

First we need to set offsets to zero. Working offset should be set to zero with command “Machine/Offset/Zero”. “Empty” tool should be selected with with “Machine/Tools/Select/Empty” and tool offset should be set to zero with with “Machine/Tools/Zero Tool Offset” command. These commands will be explained later. For now it is important that everything is set to zero.

Limit switches

Machine that I will use has 5 limit switches. Two limit switches on X, two on Y and one on Z axis. To verify that all limit switches are working, trigger switch with hand and position display will become red or purple.


Triggered limit switch should stop machine. Machine should go to e-stop mode. To do this “Limit Switches Stop” checkboxes should be checked.


To verify that limit switches stop the machine, jog in direction of limit switch and trigger it with hand. Machine should stop. Be careful not to hurt yourself. Your hand near moving machine in usually not good idea so keep safe distance.


When machine stops you should be able to jog in opposite direction. All 5 limit switches should be verified like this.

Limit switches can be used as reference switches. This means that we will use them to set machine absolute coordinates. This is known as homing.


We need to choose where machine absolute zero position is. Usually machine works in relative coordinates and it is not really important where absolute zero is. What is important is, that it is always at same position. I will put some tape to mark it so that you will see it better on image.


Tool is put in spindle and machine is jogged to this position. Be careful not to crush tool into machine table when you descent Z axis. You can just loosely tighten tool in spindle and if accident happens nothing will be damaged.


This position should be machine absolute zero. Commands for changing machine absolute position are in menu “Machine/Set Position”. Because it is usually not good idea to change absolute position make sure that “Machine/Set Position/Enable” is checked to enable these commands. Later we will uncheck this to prevent unwanted absolute position change. Now we can execute “Machine/Set Position/Zero” command and set absolute position to zero.


You will notice that position display now shows all zeros.


Slowly jog Z axis up until Z+ limit switch is hit and machine stops. Position display will be purple.

9 10

Write down Z position (253.8375mm in this case). Jog in opposite direction so that limit switch is released.

Repeat this for X axis.
Slowly jog in X- direction until limit switch is hit and machine stops. Position display will be red.

11 12

Write down X position (-127.6833mm in this case). Jog in opposite direction so that limit switch is released.

And again for Y axis.
Slowly jog in Y- direction until limit switch is hit and machine stops. Position display will be red.

13 14

Write down Y position (-223.6188mm in this case). Jog in opposite direction so that limit switch is released.

We now have limit switch positions for all 3 axes and we can set homing.

Open settings, section “Axes/Homing” and check “Enable”.

Usually we want to home Z axis first so we set “Sequence” for Z axis to be “1”. Then we will home X and Y at same time so we set “Sequence” for X and Y to be “2”.

When machine triggers limit switch during homing it stops in a moment. That is why we need to approach limit switch with slow speed. In this tutorial we will set “Speed” to 500mm/min but each machine is different and you should find what works on yours.

We used Z+, X- and Y- limit switches in this tutorial. This is set with “Direction” setting.

Perhaps you noticed that when switch is triggered you need to move back short distance to release it. Some switches need longer distance, some very small, but all switches need this. For switches on this machine 3mm is good value. This is set as “Return Distance”. Switch actually requires a lot less but this is good safe value. Don’t use 0!

For “Set Position” value we will use limit switch positions that we measured earlier. We will add/subtract 3mm that we used for “Return Distance”.

With “Go To” we set where we want machine to go after limit switch is hit. Machine will be at this position be after homing. Usually it is X0 Y0 and Z at some safe height. We know now that machine highest Z position is 250.84 (we measured this few steps back) so Z200 seems like a good value.

Normally machine first moves to all limit switches first and goes to “Go To” position at the end. If we want to change this order and move to final position as soon as axis triggers limit switch we can check “Go To First”. Some machines need this to avoid clamps. This machine does not need this.

Here are all these settings:


We can close settings and “Machine/Home” command will be enabled (if it is not then press E-stop twice to force display refresh).

We are ready to execute “Machine/Home” for first time. There is also button on toolbar for this. As always, be ready to hit e-stop is something goes wrong.

After homing machine is at X0 Y0 Z200. This is exactly 200mm over marking that we made.

16 17

Machine is homed and now we can use absolute coordinates. We can move machine anywhere we want and we will know exactly where it is. It is important not to change absolute position. We will uncheck “Machine/Set Position/Enable” now.


If your machine losses steps for any reason you’ll need to do homing again.

Table size

Now that we can move machine anywhere we want and we know exactly where it is we can use this to measure machine table. We will slowly jog machine to X+ and Y+ direction until limit switch is hit and then back a little so that switch is released. Write down position. It is X813.8000mm and Y460.4208mm.

19 20

Table is measured and we will use this data to set machine limits and enable soft limits. Orange box on 3D display is now accurately representing machine working space.


Soft limits

Soft limits are used to decelerate machine to stop before machine is stopped hard way at limit switch or before it crashes. I recommend “Soft Limits Decelerate” and “Soft Limits Strict” settings are also checked. Sometimes we need to disable soft limits and there is a command for this in menu “Machine/Soft Limits”. When soft limit is triggered position display will be yellow.

Measuring tool offset with fixed tool sensor

We can now set fixed tool sensor. Fixed tool sensor is usually used to measure tool length offset. We need to have machine homed so that we can use absolute positions. On machine used for this tutorial, fixed tool sensor is located in corner and connected to INPUT5 pin. In this tutorial I use switch with lever which is good for tutorial but should not be used on real machine. Switch lever is not horizontal and it will not give accurate results.


First we will enable tool sensor in settings. This will enable sensor related menus and commands. Then we need to test if it works. Trigger sensor with hand. Word “Sensor” should appear on software status bar. Now we need to test if sensor stops machine. Jog machine away from sensor and to high Z position. Then slowly jog down and trigger fixed sensor with hand. Machine should stop.

Jog machine so that tool is directly above sensor. Slowly jog down until tool triggers sensor and stops. Write down position. In this case it is X-111.6854mm, Y453.2417mm, Z34.8979mm.


Open setting again, section “Tool Sensor”, group “Tool Sensor Fixed”. We set X and Y “Location” of our sensor. We could also set lead-in “Move” but for most machines this is zero. We need to set “Speed” which should be small because of momentary stop when tool triggers sensor. “Direction” is usually set to -. Because of long lever on my sensor switch “Return Distance” is quite large. I will set it to 5mm. We also have Z position of sensor and we can set “Set Position Z” value. Usually we want to move machine around at maximum possible Z height. This machine has Z+ limit is slightly above 250mm. 250mm will be good value for “Safe Height”. “Return” checkbox enables automatic return to position before tool length measurement.


Now we can test if tool offset measuring with fixed tool sensor works.

Jog machine somewhere in the middle and execute “Machine/Tools/Measure Tool Offset”. There is also button on toolbar for this. As always when you do something for first time – be ready to hit e-stop.

If everything is correct machine should go rapidly up tu safe height, then traverse to fixed sensor location. Then it will descend at low speed until sensor is triggered. Machine will return back a distance to release sensor and use its Z position to calculate tool offset. Then it will rapidly move up to safe height, traverse back to original position and then move down until tip of your tool is at same Z height as it was before.

When tool offset is active small checkbox labeled “T”, just above position display, will be enabled. If this “T” checkbox is checked then position display will include tool offset.

It is important to get familiar with “Machine/Tools/Measure Tool Offset” command. See my video where I change tool length and it always returns to same position. Note how I’m doing this so that even if something goes wrong I still have time to press e-stop.

How to set Steps Per Unit values?

This is a short tutorial on how to correctly set Steps Per Unit values for your CNC machine.

Steps per unit value (in further text as SPU) defines how many steps will stepper motor have to
make in order to move the axis for distance of one unit. Units can be in millimeters or in inches.


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.)


When we are defining correct SPU values for our machine, we can start from two different initial conditions.

If we know all variable values it’s no problem to calculate correct SPU value.
Correct 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) We jog our machine to suitable location, and set Offset-Current XY2 . We want to move
X axis from our offset zero position to X=10 position. To measure the distance of machines travel, we can use ruler,
caliper or measuring tape which we place under machines tool.

3) Tool should start at 0 on the ruler.


In MDI window, we enter X10.


Machine should now move from X=0 to X=10, therefore travel for 10mm.

When we execute MDI command we can see that machine travled for 2.5mm instead of 10mm:


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

We can ask ourselves:

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?

4) 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.

How to machine your first workpiece

In tutorial How to setup CNC machine using PlanetCNC Software and controller was described how to use limit switches and software settings, so that our machine will be properly calibrated and set, therefore ready for everyday use, giving us correct and satisfying results.

Please read this tutorial before continuing: How to setup CNC machine using PlanetCNC Software and controller

Important lessons from that tutorial:

Homing procedure gives machine absolute coordinates. Only now machine becomes “self aware” and therefore is capable of knowing where its position is at any given moment. (video, step 1)

– We defined machine Table size i.e. workspace in all three coordinates. Visualization in software helps us with better sense of orientation. It helps us locate current machine tool position and imported program (g-code) position.

Soft Limits are used to decelerate machine when certain axis is coming close to its limit, and prevents it from crashing.

Tool Offset is measured by using Fixed Tool sensor.
Proper installment of Fixed Tool Sensor and its software settings configuration is necessary.  When we measure Tool Offset tip of our tool activates Fixed Tool Sensor. This sends exact information about height at which tool tip is located in machine absolute coordinates.  (video, step 2)


This tutorial will help you getting started with the use of your CNC machine using PlanetCNC software and PlanetCNC controllers. Tutorial will focus on main points when setting Offset features.
Certain steps are also described in video below.

Importing program

We usually design our program in CAD software and define machine operations in CAM software. Programs can be saved in many different file formats. PlanetCNC software is capable of importing most of the popular file formats.

To import your program click File/Import or File/Open.

For tutorial purposes we imported program (file) in G-code format, which was generated with popular CAM software.

Apart from actual toolpath, G-code also contains all feed rates (speed) parameters, spindle commands (if spindle is controlled with controller) and other things. G-code used in this tutorial, assumes material top position is at Z zero. ‘Safe Height’ is 10mm above the material.

Setting Offset – Current XY

We set our Working Offset to zero before importing our program. This can be done by clicking Offset-Zero button in Offset Toolbar or through Machine/Offset/Zero menu.

Offset-Zero button 1

Imported programs origin is at machines zero position (in our case this is Home position).


Since our actual work piece is at other, more suitable location on machines table, we simply jog our machine to location where our piece is attached and where we want to machine it.(video, step 3)


When we find location on the table that suits us the most, we use Offset – Current XY feature, which allows us to set XY coordinates for starting point of machining.(video, step 4) You can set Current XY Offset anywhere on the table (as long as dimensions of program are within borders of the table size). We apply offset by clicking Offset – Current XY button. This can also be done through Machine menu.

Button is located in Offset Toolbar:


Machine Menu: Machine/Offset/Current XY


When we applied Offset-Current XY, our programs (G-code) origin aligned with machine.


XY coordinates of starting point are now set.

You can observe and switch between absolute and relative coordinates with the help of W checkbox
at Position panel.

XY Offset position in absolute coordinates


XY Offset position in relative coordinates



Setting Offset-Current Z

With XY offset coordinates of starting point already set, we must now define Z offset coordinate of starting point.
Top surface of working piece material is usually Z zero.

Setting Offset – Current Z can be done in many different ways. In our example we will do this most basic way (without movable sensor) by jogging machine over work piece, and then by step jogging of Z axis, slowly descending our tool onto the material surface.


We can help ourselves by adding a piece of paper between tool and the surface of material. When we are not able to move paper anymore, that indicates that tool is almost completely touching the
surface of material and we can apply Offset-Current Z. (video, step 5)


We apply offset by clicking Offset – Current Z button, or through Machine menu.

Button is located in Offset Toolbar:


Machine menu: Machine/Offset/Current Z


Z coordinate of starting point is now also set. We provided all three coordinates of starting point.  With the help of Position panel we can see that all three relative offset coordinates are now set to zero:


If we now jog our machine at any position on the table, and we click Go To – Zero XY button 14 ,
then machine will move back to position that was set as Current XY offset.


How to use moveable sensor?

In ‘Machining your first work piece’ tutorial we described how to set Current XYZ offsets.
Offset – Current XY gives us relative coordinates. We can set Offset XY position
coordinates anywhere on the machines table. This way we can adjust our imported
program (G-code) to our table size and therefore set position that is most suitable
for machining our work piece.- Offset – Current Z gives us relative coordinates. We can set Offset Z Zero position of our work piece.
This is usually top surface of work material.Before we continue:Offset- Measure Offset Z feature is used for measuring Offset Current Z with movable tool sensor.

Difference between Offset-Current Z Current Z button_edit and Offset -Measure Offset Z Offset_Toolbarfeature:
– When we use Offset-Current Z feature, we must jog Z axis by hand until we set current
Z offset value (top surface).

-When we use Offset-Measure Offset Z, software automatically sets current Z Offset,
by detecting the surface of movable sensor with machines tool. Height of movable sensor is
already compensated since we have set parameters of sensor in Tool Sensor Settings.


This tutorial will explain how to correctly use Offset – Measure Offset Z feature with movable
sensor using PlanetCNC software and controllers.

Movable Sensor

Movable sensor is basically a switch that sends signal to controllers input pin.
When tool touches sensors surface (it’s the same as normal switch would be activated),
controllers input goes ‘Low’ and therefore software is able to set Current Offset Z.

The most basic type of movable sensor is usually copper-clad laminate, that has wire soldered onto it,
which is connected to controller sensor input. GND signal is attached to tool via crocodile clip.


Connecting Movable Tool Sensor to PlanetCNC controllers


Tool Sensor is connected to LIMIT 5 (Z-) input pin of MK1 LIMIT Connector.

conn16-limitMk1 LIMIT connector

Mk2/4 and Mk2:

Tool Sensor is connected to INPUT 5 (Tool Sensor) pin of Mk2/4 and Mk2 INPUT connector.

conn10Mk2-inputMk2 INPUT connector
connMk24-inputMk2/4 INPUT connector
MK24 Settings


Mk3 provides inputs for user-assigned functions. Tool sensor can be connected to any input pin of
INPUT connector, and assigned in software as Sensor.
conn10Mk3-inputMk2 INPUT connector

MK3 Settings

Software Settings for Movable Tool Sensor

Tool sensor option in File/Settings/Tool Sensor must be enabled for tool measuring procedures.
You can also set Speed, at which tool will descend when doing measurement.

MK1 Settings_enable

We must set Sensors parameters:

Size: If we use sensor or touching probe to measure X and Y coordinates then this value
represent radius of stylus ball at the point of touching probe. This is the same as
Height parameter for measuring Z coordinates.

Retract: Value represents distance for which tool retracts once it has touched the surface of sensor.

Height: Thickness of material that is used for sensor.

Return Distance: Value represents distance for which machine ascends (from height to which previously retracted to).

MK1 Settings_Parameters

Setting Offset – Measure Offset Z


Measurement of current Z offset is semi-automatic procedure for Mk1. We set movable sensor on top surface of our work material. Make sure that tool is above the sensor.

1) Click “Measure Offset Z” button:


2) When tool touches the sensor, “Measure Offset Z” button will turn orange:


3) Now click “Offset-Current Z” button

Current Z button_edit

4) Click again on the orange “Measure Offset Z” button.
This will turn “Measure Offset Z” button back in normal color.


Mk2/4, Mk2, Mk3:

The measurement is atomatic procedure.
We set movable sensor on the top surface of our work material. Make sure that tool is above the sensor.

Offset Z measure up

Now click Measure- Offset Z Offset_Toolbar button, or set offset through Machine menu: Machine/Offset/Measure offset Z.

Machine will descend until tool touches our sensor. Then it will immediately move up to specified position.

Offset Z measure touch

Value of relative Z coordinate when machine finishes with measurement, is sum of sensors parameter values.

Retract + Height + Return Distance = Current Z value

Z value settings

Z value

Retract + Height + Return Distance = 1+ 1,6 + 5 = 7,6

How to use tool change?

Difference between Fixed Tool sensor and Movable sensor:

Fixed Tool Sensor: Used for measuring ‘Tool Offset’. Gives us position of the tool tip in absolute coordinates. Always at fixed position.

Movable Sensor: For setting ‘Offset Current Z’ at the top surface of work material. Gives us relative coordinates. You can move it around
the table, it doesn’t have fixed position.

Through whole machining process, we can machine our work piece with just one tool or we can machine it with many tools. Meaning, we can generate G-code,
that will include tool change operations.

Tool Change procedure with Fixed Tool Sensor tutorial

The purpose of this tutorial is to clear out some facts about tool change, and to demonstrate tool change procedure during machining of an actual workpiece using Planet CNC software and Planet CNC controller.

In the beginning we will determine how we want to machine our workpiece, and base our settings configuration on it.

But first we will describe and clarify Tool Change feature settings.


If you click File/Settings you can see there are four feature settings using word tool. Tool table, Tool change, Tool change ATC and Tool sensor.


Tool Change ATC feature will not be described and used in this tutorial. This will be learning content in upcoming tutorial.

In this tutorial we will focus mainly on Tool Change settings.

Tool Change settings are located in File/Settings/Tool Table/Tool Change.


Tool Change settings are divided into three setting groups: Tool change, Tool offset and Position. We will describe individual settings of each group.

Tool Change settings group:

Here we set how we want our machine to “behave” during Tool change.


Enable: This enables tool change procedure.

Z Axis First: Usually you want to move Z axis first, before X and Y.

Stop: Machine will stop at tool change position and will not resume. In this example we don’t want this.

Pause: Machine will pause at tool change position. During this pause we will manually change tool.

Pause For Spindle: Machine will pause after cutting (before tool change). During this pause we can turn off spindle manually. Second pause is before cutting (after tool change). During this pause we can turn spindle on manually.
If spindle is controlled through controller then this pause is not needed.

Skip Already Active Tool: If tool with number N is already mounted then TN M6 g-code will be ignored and tool change will not occur.

Reset Active Tool: Resets currently active tool at beginning of program. This will set active tool number to 0.

Use Default Tool: If G-Code tool numbers are not in the tool table an error is reported. This option avoids this
error. Default values from tool with number 0 are used instead. When tool 0 is not available, all 0
parameters are used. This option is useful, to load G-Code from another machine without error.

Auto Return: This depends on your g-code. By g-code standard g-code return moves should be in g-code program but are often not.
Here is example:

This is correct g-code:

G01 X0 Y0(start position)
G01 X10 Y0(cut to X10 Y0with first tool)
T2 M6 (change tool tool with auto return off)
G01 X10 Y0(return to last position)
G01 X20 Y0
G01 X30 Y0

This is wrong but often used:

G01 X0 Y0(start position)
G01 X10 Y0 (cut to X10 Y0 with first tool)
T2 M6 (change tool with with auto return on)
(no need for G01 X10 Y0 line because of auto return)
G01 X20 Y0
G01 X30 Y0

Auto Compensate: By g-code standard G43 offset will not change if tool is changed. If this option is enabled and G43 is active then it will automatically adjust to changed tool.

Tool Offset settings group:

We define if Tool Offset will be set or measured for each newly changed tool.


Not Used: Tool offset will not be measured.

Measure Tool Length: After tool change, tool length offset is measured using fixed tool length sensor.

Tool Offset From Tool Table: After tool change, tool length offset value is “taken” from tool table. This is often used with ATC where tool length offset is known in advance.

Position settings group:

We define position coordinates of tool change.


Not set: Position of tool change will not be set, machine will pause when tool change occurs.
Machine waits at position where certain tools tool-path ends.

From Tool Table: Position defined in Tool Table under Tool Change. Each tool in tool table has its own position. This is often used with ATC where each tool has its own position in tool magazine.

At Park 1 Position defined at Park 1 coordinates.

At Park 2 Position defined at Park 2 coordinates.

At G28 Position defined at G28 coordinates.

At G30 Position defined at G30 coordinates.

User defined: User defines position coordinates. With ‘Abs’ option we select if this coordinates are absolute or relative.

Z Axis only: If any of previous tool change positions is set and ‘Z Axis Only’ is enabled, machine stops at position where certain tools tool-path ends and ascends to Z coordinate value of tool change position previously selected.
(Z coordinate value of Park1, Park 2, G28….)

Tool sensor feature settings

After each tool change, we need to measure tool offset. For this purpose we use fixed tool sensor. It was already explained how to set sensor, however there is a feature that comes handy when we try
to avoid and prevent the tool from crashing into fixtures on table.

Move feature has two values. XY values are offset coordinates that “tell” the machine from which initial point machine moves further to Fixed Tool Sensor location.

This helps us to determine machines travel path when moving to Fixed sensor position.


NOTE: We will use two tools throughout the whole machining process. One for rough mill (T1) and one for finish mill (T2). We will start with T1.
Because we have tool T1 already mounted in spindle, we don’t need the tool-change procedure in the beginning of our program. Therefore we enable Skip Already Active Tool feature that does exactly that.

Now we click Tools-Select button in toolbar and click Tool 1.

In left bottom corner can now be seen which tool is currently active.

Controller is now aware that Tool 1 is our active tool and that there is no need for T1 tool change in the beginning of the program.

If you did not create tool list in Tool Table, then you can use MDI. Type M61 Q1, and your active selected tool is T1.

These steps are in the same order as in video:

1. Homing.

2. Measure Tool offset with fixed tool sensor.

3. Set Current XY offset.

4. Measure Current Z offset with Movable sensor.

5. Start Spindle and begin cutting.

6. Pause to turn spindle OFF.

7. Pause to change tool.

8. Measure tool offset for second tool.

9. Pause to turn spindle ON.

10. Turn spindle off when cutting is finished.

This is the final configuration of Tool Change settings which reflects our desired machining process:


How to use tool change with ATC?

Automatic tool change – ATC tutorial with PlanetCNC software and controller

This tutorial will guide you through ATC hardware equipment installation, software settings configuration and final use of ATC with PlanetCNC software and PlanetCNC motion controller.
We will start by installing ATC hardware equipment on our machine and later on continue with software settings configuration.

In the beginning we will determine how we want to machine our workpiece, and base our settings configuration on it.

But first we will describe and clarify Tool Change feature settings.


ATC stands for Automatic Tool Change. For successful implementation of ATC procedure into your machining process special hardware equipment is required.

This equipment typically consists of pneumatic tool changer, tool holders and tool table. We know many different approaches and concepts, from simple low-cost to expensive professional solutions.

First check that every piece of equipment is working as it should.

Equipment used for purposes of this tutorial is simple and not very complex, however, it fully serves its purpose.

Pneumatic tool-changer and tool-holders:



Tool Table:

Two solenoid pneumatic valves:




Settings referring to Tool Change and Tool Change ATC are located at File/Settings/Tool Table/Tool Change and Tool Change ATC.


No setting referring to ATC is standalone. Meaning, any of these three settings are co- dependent on each other at some point.
For example in Tool Table we set everything about tool specification, but their use is enabled in Tool Change settings. To control the ATC equipment
you need to assign output pins, and you do that in Tool Change ATC settings.

Tool Table settings

Tool table is where all tools are at “rest ”. How many tools is in tool table is up to each user. We will use three tools.
Because each tool is different in its shape and form, you can say that is unique. Therefore we must fill in each tools “personal data” and save it in the tool list.
This is done in General tab.


Every tool has it “resting” place over the tool table. So we have to save each tools position coordinates.
We will obtain them by jogging machine over populated tools, and then write down the coordinates of each tool. It is necessary that you execute Homing procedure,
because all tool position coordinates use absolute values and you can’t really afford any lost steps. This is done in Tool Change tab.


Tool Change settings

In Position settings group, we can define position coordinates of tool change, Tool offset measurement and Tool change procedure machine “behavior”.


Tool change ATC software settings

Since ATC if fully automated procedure, controller must control some external device (solenoid pneumatic valves on our example) via output pins from Output connector.
We assign pins for Lock and Blow actions here. What kind of move sequences machine makes when it changes tools from tool table is also set here.



Note: Hardware equipment and installment procedure is unique for each users equipment and machine.

Step 1: Installing ATC hardware equipment on our CNC machine

Our tool Table should be mounted somewhere safe and remote so that it doesn’t block machines movement and unnecessarily reduces machines working area.

Step 2: Writing down position coordinates

When we populate our tool table with tools, we can jog our machine to tool table and start fine tuning positions of machine, so that we can get precise position coordinates of each tool in tool table.

Step 3: Settings configuration

1.) Tool Table settings

1.1.)General Tab

Each tool used, must be specified in a tool list with name and number.
To add tool in tool table list we click Add button. When tool number and name are assigned we click Update.
We repeat this for every tool.

Tool_Table 4_tools

All other parameters are really not that important for this tutorial.

1.2.) Tool change tab

Here we insert tool position coordinates that we have obtained earlier in Step 2. After we insert tool XYZ position coordinates, we must click Update button.
We repeat this for all three tools.


3.) Tool change settings

These settings were explained in previous tutorial, you can read it >here link<.

4.) Tool change ATC settings


4.1) Lock and blow pin assignment


Here we assign output pins that will control ATC equipment for locking and unlocking tool. We use solenoid pneumatic valves on our ATC.
Lock output pin will activate/deactivate pneumatic tool-holder. In this example we will select Output pin 2.
Delay value is amount of seconds that machine waits after Lock output is activated.
Hold leaves Lock output activated when machine changes between two tools.

Blow output pin will activate/deactivate blowing of tool-holder between tool changes.
This is used to avoid any impurities attaching on tool-holder and to assist removing tool-holder from its socket.
In this example we will select Output pin 3.

Delay value is amount of seconds that machine waits after Blow output is activated.
Hold leaves Blow output activated when machine changes between two tools.

Safe Height value is height to/from which machine ascends/descends when its in tool change procedure.
Speed at which machine descends/ascends to lock or unlock tool is defined with Speed value.

4.2.) Move configuration

Move Unloaded :
We can set sequence of moves when machine doesn’t have any tool loaded in the tool-holder.
First coordinate column represents first move and second column represents second move. These are offset coordinates.

Example: Move_Unloaded

This coordinate setup will do the following:

When machine unlocks tool, it ascends for 20mm in Z+ and then moves 30mm in X+ direction. Then continues at default traverse rate.

Move Loaded :
We can set sequence of moves when machine does have tool loaded in the tool-holder.
First coordinate column represents first move and second column represents second move. These are offset coordinates.

Example: Move_loaded

This coordinate setup will do the following:

After machine locks tool, it ascends for 10mm in Z+ and then moves for 30mm in Y+ direction at Speed value. Then continues at default traverse rate.

Step 4: Example program

These steps are in the same order as in video:

“Homing”, “Set Current XY offset” and “Measure Current Z offset with Movable sensor” steps are not shown in video. They were done before.

Active tool number in beggining is 2.


How to use “Warp” feature?


‘Warp’ feature is used when applying generated toolpath over bended, curved or uneven surfaces.

This feature comes in great help to users that mill their own PCB’s. Since the PCB milling procedure itself is very delicate and precise (distance between two pads can be only xx mils), already smallest PCB surface height irregularities can create bad results.
Precision of milling and the distances between pads depend on the milling tools used. In many cases conical or D-bit tools are used. So it is very important that the depth of milling is constant over the whole milling procedure.

The most important step of the ‘Warp’ procedure is how we measure the surface. In case of non-conductive material we can use touching probe to measure the surface of material.

In case of PCB milling, where workpiece material itself is already conductive, we only need to connect PCB board to controller ‘Sensor’ input and tool itself can be already used as probe.

This tutorial will show you how to measure surface height points over workpiece surface whether you are using conductive or non-conductive workpiece material.

‘ Warp’ step by step guide for conductive materials (PCB’s):

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 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 your workpiece.

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

Mk2/4 and Mk2 controller have designated tool sensor inputs, while Mk3 controller has software assignable inputs, so you can connect your board at any input.

Sensor wiring for Mk2 and Mk2/4:

Mk2/4: Designated sensor input is input 5.


Mk2: Designated sensor input is input 5.


Sensor wiring for Mk3:

Mk3: Has 8 assignable inputs. In settings set selected input as “Sensor”.

As a safety precaution, connect the tool and the copper plane with some wire to make a contact. In left corner of CNC USB controller interface, word ‘Sensor’ should appear for every contact between the tool and the copper plane. Also jog Z axis down very slowly so that tool will touch the surface of the cooper board, so you can be sure that everything is working as it should.


Step 3:

Jog your machine to initial starting point of your copper board, usually its corner, and click: “Machine/Offset/Current XY” to set X0 Y0 offset.

With offset XY now being set, you have initial point of your workpiece material from which you will start your ‘Warp’ measuring as also your g-code program.
So no matter where you jog your machine or wherever your machine will park after ‘Warp’ measuring procedure, you will be able to return to your initial point with “Go To – Zero XY” feature.

Step 4:

Click: “Capture & Measure Points/Measure/Measure Grid Z Offset” to set Z0.
Surface of the board is set as Z0 and is now stored in the table with other captured points.

Step 5:

Dimensions (extents) of your g-code program basically represent the size of your ‘Warp’ measuring grid (keep that in mind when setting “Grid size – Size XY”).

For best milling results, it is recommended that the surface is measured with good point density. High point density can extend the time of measuring and compromise should be made between measuring time and number of measuring points.

So, click “Capture & Measure Points/Measure/Set Grid …” to set grid size and point density.


In case of using copper board, this parameter should be set to 0, because cooper plane is also milling surface.

Value represents distance for which machine ascends to safe height. This parameter can be value 0, if parameter ‘Return Distance’ already is set at proper value.

Size XY:
Here you enter values for XY dimensions of measuring area surface.

This number is desirable distance between two adjacent points.

Alternatively you can enter number of measuring points that you wish to have over the length of selected axis. If you click the arrow button, then ‘Length’ value calculation will be based on this value.

Return distance: Value represents distance for which tool returns once it has touched the surface of copper board to release contact.

Step 6: Start measuring procedure

Make sure that your current position is at X=0, Y=0.

Click “Capture & Measure Points/Measure/Measure Grid Z” to start measuring.

Automatic measuring procedure will start. Machine will descend at current machine position (your XY offset) and when tool touches copper board it ascends and moves in X+ directions to the next point etc..
Speed at which machine descends can be set in “Settings/Tool Senor/Speed”.

Machine will stop at the position of last measured point. If you now open ‘Measure’ menu you will be able to see your measured points number in brackets. These points can also be saved and used again if something goes wrong.

Now use “Go To – Zero XY” button to move machine to current offset XY position, to have a nice “clean” start.

Step 7: Load g-code

Import your g-code program in CNCUSB controller software and make sure that is placed over the measured surface of your material.

Step 8: Warping your g-code

Now click “Program/Advanced/Warp” to apply “Warp”. Dialog will appear which displays the number of captured points. There is also an option to load points if you have saved points in a file.

Z coordinate values of your g-code program will be changed according to the measured surface.

During milling process, machine will be adjusting Z axis so that depth of milling will be constant over workpiece surface no matter on the unevenness of the surface.

How to mill and drill PCBs from Gerber and NC Drill files?


This tutorial is intended to help you with production of one-sided PCBs with your CNC machine.
Before any work is done with machine you must be sure that the ‘Gerber’ files you intend to import in CNC USB controller software are correct and are generated with correct parameters.

Some Gerber files have all parameter configuration already written in the comment section at the beginning of the file.
You could however figure it out from the format of the coordinates but this is not exactly trivial (trial and error) thing to do.

The steps for milling a PCB are as follows:

1.) Mounting copper board to machine table
2.) Set “Current XY” offset
3.) Measuring the surface of the board (“Warp”)
4.) Import “NC drill” file
5.) Drill holes
6.) Import “Gerber” file
7.) Apply “Warp”
8.) Mill PCB

For the purposes of this tutorial we will be using “NC drill” and “Gerber” files of our Mk1 controller.

1.) Mounting copper board to machines table

2.) Set “Current XY” offset

3.) Measuring the surface of the board (“Warp”)

These first three steps are described in “Warp” tutorial.

4.) Import “NC drill” file

You import your drill files if you click: “File/Import NC drill”.

Import dialog will appear, where you can configure the drilling parameters. You will probably leave most of them intact, while others will maybe need some fine tuning.


Description of parameters:

Feed Speed:
‘Feed Speed’ is usually the speed that is used for cutting or milling, and since there will be no cutting involved in the drilling procedure, you can set this value the same as your ‘Traverse Speed’ in settings.

‘Feed speed’ is the speed at which machine will descend from ‘Safe height’ to ‘Zero height’.

Plunge Speed:
‘Plunge speed’ is the speed at which machine will actually drill. Drilling depth will be from ‘Zero height’ to ‘Depth’ height.

Values depend on the RPM of your spindle and the diameter of drilling bit. With higher RPM number you can “afford” greater Plunge Speed values.

Safe Height:
Machine will move up to ‘Safe Height’ in between drilling holes.

If your board is not too curved, then 2mm would be reasonable value.

Zero Height:
Zero height is at PCB’s surface. Machine moves down to this height from ‘Safe Height’ at ‘Feed Speed’.
Value is 0.

Holes should be drilled in its entirety, meaning no hole should be drilled half way. So Depth value is basically the thickness of your PCB board with some added safe distance just to be sure that the holes will be drilled “clean”.

For example: 1.6mm + 1mm = 2.6mm

Use Tool Change:
If enabled, g-code program will include tool changes for tools with different diameters. Usually we leave this setting disabled since we drill holes with only one diameter.

You can leave it disabled.

Sorts holes to optimize the toolpath to shorten working time.

Mirrors program in XY. If drill path is mirrored you can enable ‘Mirror’ feature in the import dialog, which places toolpath in the right order.

PCB size:
This is approximate size of the PCB and it is important that this value is the same when importing corresponding gerber file.


Specify millimeter or inch units. Software will try to auto-detect correct settings but if imported file looks strange then you should change these values.


Specify number decimal digit format. Software will try to auto-detect correct settings but if imported file looks strange then you should change these values

Leading / Trailing Zeroes

Specify leading and trailing zeroes. Software will try to auto-detect correct settings but if imported file looks strange then you should change these values.
This is how drilling toolpath looks like when import settings configuration is done:

5.) Drill holes

Now that everything is set for drilling holes, you press ‘Start’ button and let the machine do the work.

6.) Import “Gerber” file

To import your “Gerber” files you can click: “File/Import Gerber”. Import dialog will appear where milling parameters can be configured.

Description of parameters

Feed Speed:
This is the feed rate at which PCB will be milled. It’s probably best for you to “dry” test the various speeds so you make sure machine will not loose steps at certain speeds during the milling process.

Plunge Speed:
‘Plunge speed’ is the speed at which machine descends from ‘Zero Height’ to ‘Depth’ when it starts to mill PCB layout.

Safe Height:
Machine will move up to ‘Safe Height’ in between milling the PCB layout. Also when drilling holes or marking pads.

Zero Height:
This is the the PCB surface. Machine moves down to this height from ‘Safe Height’ at ‘Feed Speed’.

Depth of isolation, engraving,marking or drilling holes, depending on the selected option. Machine moves down to this height at ‘Plunge Speed’.

Tool diameter:
Diameter of tool used for milling.

Mirrors program in XY. If PCB layout is mirrored you can enable ‘Mirror’ setting which places toolpath in the right order.

PCB Size: Dimensions of PCB board. This is approximate size of the PCB and it is important that this value is the same when importing corresponding “NC drill” file.


Gerber files can contain different elements such as polygons, tracks and pads.
Use ‘Polygons’ in toolpath calculation.

Use ‘Tracks’ in toolpath calculation.
Shape of toolpath when only ‘Tracks’ is used:


Use ‘Pads’ in toolpath calculation.
Shape of toolpath when only ‘Pads’ is used:


Toolpath when all three options are selected:


Mark Pads: You don’t need to set this, all holes are already drilled.

Drill Pads: You don’t need to set this, all holes are already drilled.


Toolpath calculation mode.
Enable to mill electrical isolation toolpath.

Shape of toolpath when only ‘Isolation’ is used:

Enable to mill only center line (for example silkscreen or cutout).

Shape of toolpath when only ‘Engrave’ is used:

Enable if you want just mark or drill pads.

‘Pause’ (M00) G-Code will be inserted at the end of selected toolpath calculation mode.

Tool number:
Number of the tool that will be used for selected toolpath calculation mode.

Usually only ‘Isolation’ option is selected.

Clear copper

Enable to generate toolpath that will clear unused copper.

Toolpath with “Clear copper” enabled and with “Boarder” set to 0:


and with “Boarder” set to 5:

Distance from PCB outline where copper will still be cleared.

Inserts ‘Pause’ (M00) G-Code at the end of clearing copper.

Tool Number:
Number of the tool that will be used for clearing copper.

7.)Apply “Warp

See “Warp” tutorial, Step 9.

8.) Mill PCB