Notepad++ plugin

I use Notepad++ a lot. It is the best txt editor for me. I write all my scripts/g-codes in there.

As an experimentation I created plugin that implements TNG expression engine as Npp plugin.
It simply evaluates selected text as expression and stores result to clipboard. I no longer need calculator 🙂

 

 

Here is short manual and list of all functions:
readme

 

 

How to mill and drill PCBs using Gerber and NC Drill files with PlanetCNC TNG software

This tutorial is intended to help you with production of single side PCBs with your CNC machine, Gerber files and PlanetCNC TNG software.
Before any work is done with machine you must be sure that the ‘Gerber’ and ‘NC drill’ files of your PCB design 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.

-For the purposes of this tutorial we will use “NC drill” and “Gerber” files of our first Mk1 controller. Both files are available in PlanetCNC TNG installation folder located in Samples folder.

-Please note that we will describe only parameters of Import NC drill and Import Gerber dialog that will be used for this tutorial. All parameter description is available in the PlanetCNC TNG software user manual.

-Prior following this tutorial we recommend that you also read tutorial for Warp procedure: Using “Warp” with PlanetCNC TNG software

 

Steps for milling a single side PCB should be in such order:

1.) Mount copper board to machine table
2.) Set Work Position Zero positions for XY axes
3.) Measure the surface points of the board (Used for “Warp”)
4.) Import “NC drill” file
5.) Drill holes of the PCB
6.) Import “Gerber” file
7.) Apply “Warp”
8.) Mill PCB

 

Steps:

1.) Mount copper board to machine table

2.) Set Work Position Zero positions for XY axes

3.) Measure the surface points of the board (“Warp”)

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

4.) Import “NC drill” file

To import your drill files 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 used parameters:

Feed Speed:
Sets feed speed for generated toolpath. F-word g-code will be generated. This feed speed value will be used for moves from the ‘Depth’ value up to the ‘Safe Height’ position value. So once the drill point has been drilled, machine will use ‘Feed Speed’ value to ascend to ‘Safe 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.

Start Height:
Start height is usually at PCB’s surface. Machine moves down to this height from ‘Safe Height’ at ‘Traverse Speed’.

Cut Height:
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: -3mm

 

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

Format
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

Set new Work Position Z=0 value with the actual drill bit that will be used for drilling. Move machine to work position XY= 0 and position the tip of the drill bit on the surface of copper board and set work position zero with: Machine/Work Position/Axis To Zero/Z

We also recommend that you set the S value for spindle RPM value using the MDI window prior running the program.

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

6.) Import “Gerber” file

We will describe only parameters of Import Gerber dialog that were used for this tutorial. All parameters are described in detail  in the PlanetCNC TNG software user manual.

To import your “Gerber” files you can click: “File/Import Gerber”.

Description of used 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 ‘Start Height’ to ‘Cut Height’ when it starts to mill PCB layout.

Safe Height:
With this option enabled, generated toolpath will include traverse moves performed at safe height.

Start Height:
This is usually at PCB surface. Machine moves down to this height from ‘Safe Height’ at ‘Traverse Speed’.

 

Outputs:
Generated program will include M3/M5;M7,M8/M9 g-code commands, depending on options selected.

-Spindle
With this option enabled, generated program will include M3/M5 g-codes. In the input window you write desired value of spindle RPM.

Use
Gerber files can contain different elements such as polygons, tracks, pads and holes. You can select which element(s) will be converted to toolpath. For this tutorial we will select all three options.

Polygons:
Use ‘Polygons’ in toolpath calculation. Only polygons will be visible.

Tracks:
Use ‘Tracks’ in toolpath calculation. Only tracks will be visible.

Pads:
Use ‘Pads’ in toolpath calculation. Only pads will be visible.

 

Cutting Path
Toolpath calculation mode, you can choose between: ‘Isolation’, ‘Centerline’ and ‘Outline’. For this tutorial we will only use ‘Isolation’.

Cut Height:
Depth of milling.

Pause:
‘Pause’ (M0) G-Code will be inserted at the beginning of selected toolpath calculation mode. This will give us some time to check if everything is ok.

7.)Apply “Warp”

See “Warp” tutorial, Step 9.

We recommend that after you apply Warp, you also set new Work Position Z=0 value with the actual mill bit that will be used for milling. Move machine to work position XY= 0 and position the tip of the mill bit on the surface of copper board and set work position zero with: Machine/Work Position/Axis To Zero/Z

8.) Mill PCB

Final Gerber import parameter configuration:

Generated toolpath once all parameters that we used are set:

AllToolpath