SettingsSPU200

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:

Motor
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

Micro-Stepping
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

Pitch
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
SettingsSPU

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.

SettingsSPU200

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:
X0TNG

In MDI window write X10:
MDIx10

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:
X3.5TNG

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

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

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.

10

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:

USB_Devices

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:
-USB
-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:
USB_Devices_NET_devices

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.

UbuntuMate 64-bit-2017_DownloadTNG-SelectLinux_03

List of essential PlanetCNC TNG tutorials

New to PlanetCNC TNG software? Don’t worry, here you can find list of tutorials that explain how to start using PlanetCNC TNG software as fastest and as effectively as possible.

It is very recommended to follow these tutorials in chronological order:

1. PlanetCNC TNG software overview and performance guidelines
Short description of PlanetCNC TNG software and few guidelines for better perfomance.

2. Updating to new PlanetCNC USB driver
PlanetCNC TNG software uses new digitaly signed PlanetCNC USB driver. See how to install it on you computer.

3. Updating PlanetCNC controller with PlanetCNC TNG software
To update your PlanetCNC controller with PlanetCNC TNG software you need to follow sequence of steps.

4. PlanetCNC TNG Linux installation guide
PlanetCNC TNG software works also with Linux OS. See how it is installed on Ubuntu MATE.

5. Obtaining and activating license for PlanetCNC controller with TNG software

UbuntuMate 64-bit-2017_UBuntuMATE_Start_01

PlanetCNC TNG Linux installation guide

We used freshly installed Linux – Ubuntu MATE distribution for this guide. Please note that distributions differ one from another so these steps may not be suitable for all distributions and installation methods may vary.

1.) Start your Ubuntu MATE system.
UbuntuMate 64-bit-2017_UBuntuMATE_Start_01

2.) Using your web browser, download PlanetCNC TNG version from PlanetCNC download page: PlanetCNC TNG download page

UbuntuMate 64-bit-2017_DownloadTNG_02

Under download options choose “PlanetCNC TNG preview-Linux” and click
“Download” button:
UbuntuMate 64-bit-2017_DownloadTNG-SelectLinux_03

3.When download dialogue appears, select “Save File” and hit “OK” button:
UbuntuMate 64-bit-2017_Select folder_04

4.)When download is complete, click “Open folder” button:
UbuntuMate 64-bit-2017_DownloadComplete_05

5.) In “Downloads” folder, right click on downloaded file and click: “Extract To…”:
UbuntuMate 64-bit-2017_ExtractTo_06

6.)Extract dialogue will appear, click: “Create Folder” button:

UbuntuMate 64-bit-2017_ExtractToDirectory_07

7.) Type in the name of new folder: PlanetCNC
UbuntuMate 64-bit-2017_NameDirectory_08

UbuntuMate 64-bit-2017_PlanetCNC_Name_09

8.) Open PlanetCNC folder and click “Extract” button:
UbuntuMate 64-bit-2017_ExtractToPlanetCNC_Folder_10

9.) Extracted files will now populate PlanetCNC folder:
UbuntuMate 64-bit-2017_ExtractedFiles_12

10.) Right mouse click on blank space and click: “Open in Terminal”
UbuntuMate 64-bit-2017_Open_inTerminal_13

11.) Terminal window will appear:
UbuntuMate 64-bit-2017_PlanetCNCTerminal_14

12.) Write: sh install.sh
UbuntuMate 64-bit-2017_TerminalInstall_15

13.) Type in your root password and hit enter.
UbuntuMate 64-bit-2017_PasswordFor_16

14.) PlanetCNC TNG software will automatically launch
UbuntuMate 64-bit-2017_SWStart_17

EnterLicense

Obtaining and activating license for PlanetCNC controller with TNG software

We are aware that license is an annoyance. But please understand us.

PlanetCNC TNG software works only with Mk3 series of controllers: Mk3, Mk3/4 and Mk3ECO.
You cannot use PlanetCNC TNG software with Mk2,Mk2/4, and Mk1 controllers!

To obtain your PlanetCNC TNG license please follow steps below(follow steps very carefully and in exact order):

1.) Update your PlanetCNC USB driver to latest version: Updating to new PlanetCNC USB driver

2.) Update your controller with PlanetCNC TNG software: Updating PlanetCNC controller with PlanetCNC TNG software

3.) When you complete steps 1. and 2., connect your controller with PC, start PlanetCNC TNG software and click Help tab: Help/License Management/Activation Code Generator
Activation code generatorBlank

You will notice that option “Enable computer” is available. With this feature enabled you are able to select your computer from Device list and generate activation code. We do not accept these activation codes.

4.) Select your controller from Device list so that becomes highlighted.
Activation code generator

“Code” window will be populated with code that starts with “CU…”
Copy this code using right mouse click and select “Copy” or click “Copy to Clipboard”

Send us this code via e-mail when you will request for license. E-mail should also include some sort of proof of license purchase for your controller. Such as invoice, license code used for old software etc…

Your license code will be sent to you via e-mail.
License code will look like this:
LicenseCode

5.) After you receive license code from us, in PlanetCNC TNG software click Help/License Management/My Licenses
MyLicenses

Click the Import button:
EnterLicenseBlank

Paste the license code that we sent you. You can use right mouse click and select “Paste” or you can use “Paste From Clipboard” button.

EnterLicense

Click OK.
You controller will now appear on the License list:
MyLicensesList

Software should notify you if license activation has been successful.

You will also notice that green light at the bottom right corner is now without X.

PLEASE NOTE: You cannot use old license with PlanetCNC TNG software as also setting files from old CNCUSB controller software.

Windows-8

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”:

Slika1

Slika2

Select “General” and then “Advanced Startup”:
Slika3

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”:

Slika4

Then the following menu appears:

– Refresh your PC
– Reset your PC
– Advanced Options

Choose “Advanced Options”:

Slika5

Then the following menu appears:

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

Choose “Windows Startup Settings”, then Click Restart:

Slika6

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

Slika8

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

Win-10

Disabling Driver Signature on Windows 10

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

 

 

Select “Settings” from the Start Menu:

StartMenu

Settings

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.

AdvancedStartup

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

Slika4

Click Advanced options:

Slika5

Click Startup Settings:
Slika6

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

Slika7

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:

Slika8

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

ThumbNail

Controlling spindle with output board

In this tutorial we will explain how to use output board with VFD and spindle. We will describe how to set VFD* parameters and how to connect output board with VFD control inputs.

We are aware that many users use different VFD’s but no worries, the work flow in a sense should be the same.
*For purposes of this tutorial we will use MK3/4 controller and Chinese Huanyang VFD which is a well known piece of equipment among hobby machinists around the world.

Please follow this link to introduce yourself with output board and controller pin configuration:

Using output board with PlanetCNC controllers

 

Step 1: Configuring Huanyang VFD’s parameters

Variable Frequency Drive (VFD) drives an electric motor by varying the frequency and voltage supplied to the electric motor. VFD controls motors ON/OFF control,speed, direction etc..

All these functions can be controlled via external equipment (output board). Output board communicates with VFD trough its control inputs which are located on external terminal panel.

So first we need to define operating mode and configure VFD’s control inputs.

1.1: Defining VFD’s operating mode:

  • We want to start/stop spindle from VFD’s external terminal panel
  • We want to change motors direction from VFD’s external terminal panel
  • We want to regulate motors RPM from VFD’s external terminal panel with 0-10 analog voltage signal

 

After going trough VFD’s user manual we know that we need to configure these parameters:

“Source of Run Commands” ->parameter PD001

PD001 → set it to value 1 (Set by external terminals)

Start, stop, change direction and speed can now be controlled via screw type input terminal.
“Source of Operating Frequency”-> parameter PD002

PD002 → set it to value 1 (Set by external terminals);

Source of operating frequency signal type is determined with parameter PD070

PD070 → set to value 0 (0-10V)

Motor speed can now be controlled via screw type terminal using the 0-10V input.

 

Step 2: Connecting output board with VFD

We need to connect output board with VFD control inputs.

Basic Connection Diagram :
VFD_control_inputs

Control inputs of VFD that we will use:

“FOR”: This input will be used for forward motor rotation

“REV”: This input will be used for reverse motor rotation

“DCM”: Common Terminal of Digital and Control Signals

“VI”: Analog Voltage Frequency Reference Input. 0-10V signal from output board will be connected to this input.

“ACM”: Common Terminal of Analog and Control Signals. GND signal from output board will be connected to this input.

Connect output pins of controller with input pins of output board:

Controller_Output_board

Connect output board with VFD’s control inputs:
Output_VFD

Wiring diagram below illustrates how relays and varying voltage output are connected with VFDs control inputs so that we achieve on/off, direction and speed control:

shemasrednja

Short functional behaviour description:
When spindle is turned ON (M3 command), relay 1 is activated and motor rotates in forward direction(VFDs FOR input becomes active).

As soon as we change direction, relay 2 is activated and motor starts to rotate in reverse direction (VFDs REV input becomes active).

Please NOTE:

Before any wiring is done and equipment is connected, please check that all spindle, coolant and speed g-codes activate correct corresponding relays and outputs.

shutterstock_291168074

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

1

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

2

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

3

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.

4

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.

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.

5

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.

6

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.

7

You will notice that position display now shows all zeros.

8

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:

15

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.

18

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.

21

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.

22

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.

23

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.

24

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.

6

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.

Motor

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

Micro-Stepping

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

Pitch

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 CNC USB SOFTWARE

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.

1

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.

3

In MDI window, we enter X10.

4

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:

5

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.

6

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

7

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.

9

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)

MACHINING YOUR FIRST WORK PIECE

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

2

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)

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:

4

Machine Menu: Machine/Offset/Current XY

5

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

6

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

7

XY Offset position in relative coordinates

8

 

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.

9

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)

10

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

Button is located in Offset Toolbar:

11

Machine menu: Machine/Offset/Current Z

12

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:

13

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.

Video