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.

09

Updating PlanetCNC controller with PlanetCNC TNG software

To update your PlanetCNC Mk3 series controller with PlanetCNC TNG software make sure that your PlanetCNC USB driver is updated to latest version and that PlanetCNC controller is updated with latest version of CNC USB controller software.

This link will guide you on how to update your PlanetCNC USB driver: Updating to new PlanetCNC USB driver

You can download latest version of CNC USB controller software here: CNC USB controller software download page

After you successfully update your controller with latest CNC USB controller software version start PlanetCNC TNG software and click: File/Settings/Connection

Controller is recognised with controllers serial number and version(V1):
11

Click: Machine/Firmware Update
After update this message is displayed:
09

You can check controller in settings:
10

Controller is now updated to latest PlanetCNC TNG firmware version.

05

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

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

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

You can get latest PlanetCNC USB driver here: CNC USB controller 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
04

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

PlanetCNCMainScreen

PlanetCNC TNG software overview and performance guidelines

USB_bad

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:
    USB_bad
    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:
    USB_good
    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.

 

 

blockdelete_g-code_thumb

Using G01 and G00 g-codes with PlanetCNC TNG software

When it comes to g-codes that specify machine motion we need to mention G00 and G01.
G00 or also known as rapid or traverse move. G00 command is usually used for moves when machine travels from position to position above the material and when no cutting is applied.
When G00 command is stated we also need to specify in which direction move will occur. For example: G00 X100 Y50
Speed at which this move will be executed is usually maximum speed of machine.

G01 command activates linear motion of machine. We use G01 with moves when machine is moving tool trough material and therefore applying various types of cutting.
Normally speed of G01 move is set with F-word(distance/time). In this case F stands for feed rate, which specifies speed in mm/min or inch/min.
When G01 command is stated we also need to specify in which direction move will occur. For example: G00 X10 Y5 F1000

g00

g00g01

blockdelete_g-code_thumb

Using “Optional Pause” feature with PlanetCNC TNG software

PlanetCNC TNG software supports, next to the conventional M00 pause, also optional M01 pause.

While M00 command pauses program every time when it appears in program, M01 pauses program only when “Optional pause” option is enabled in machine menu: Machine/Options/Optional pause
optionalpause_menu

You can enable/disable optional pause while program is running, so you would not need to restart the program in order to use optional pause feature.

Example:
You can insert M01 optional pause at different locations in your program.
So when you run your program for the first time, you can have these pause checkpoints in-between, where you can check up on machine or machining parameters, measure your work piece or tool wear, check fixture position etc..

Optional pause disabled:
optionalpause_disabled

Optional pause enabled:
optionalpause_enabled

You can download “Optional pause” example program here: Optional pause example

blockdelete_g-code_thumb

Using “Block Delete” feature with PlanetCNC TNG software

This feature comes useful when you need to test proof your program or if you have two versions of the same workpiece with minor changes etc…
In such case you can use “Block delete” feature which allows you to skip or execute marked lines of g-code of your program.

Block delete feature executes or skips lines of program that have character “/” at the beginning of the program line:
blockdelete_g-code

Example:
Lets say we would like to create two half’s of one part. For first half we would like to mill the cutout and holes, while for other we would like to create also pockets for screw heads.

Bottom screenshots display the same program file, with Block delete option disabled in first case and Block delete option enabled in second case:

With “Block delete” disabled:

blockdelete_disabled

With “Block delete” enabled:
blockdelete_enabled

You can see how quickly we can get two versions of the same file using this feature.

You can download “Block Delete” example program here: Block delete example