How to Drill a grid on the bed for mounting holes.
For a larger mill – I soon realised that the number of holes I would have to drill through the bed would be a lot and too much to do in order to get a good number of mounting points for the work piece. But instead of me measuring it out each one by hand, I thought why not get the CNC to do most of them whilst I relaxed. So, I created an Excel spreadsheet do it all for me; enter you machines dimensions, number of X, Y mounting points, speed and federates and also any off set values to get a bigger mounting grid – click generate and mill that is all.
- Autogenerates Gcode
- Save Gcode file directly from Excel
- Visually see the build area and drill position
- Options to allow for drill location outside the reach of the CNC (useful if you want a bigger grid than the machine can do).
- Visually see the travel movements
How to use:
Enter the number of drill locations you want
I brought a pack of 100pcs M6 inserts nuts and also wanted an even number of mounting points in each X and Y direction. So, ten is each direction was good for me.
However, if you do not have a square shaped machine but instead have a rectangular build area; This parameter will allow you to tailor the drill locations for your machine.
Enter the Drill safe height and drill down location
Drill safe height (mm) – this is the height of the drill bit when the machine is doing a travel move to the next drill location.
Drill down (mm) – How far down to drill
For my machine, I had a 18mm thick plywood base and reference my datum point of the CNC to the top of this surface. IE at height 0mm the tool will be just touching the top of the bed, at -18 the drill bit would have drilled through the bed and at 20mm there would be sufficient clearance height to do a travel move.
Enter the machines working area
Enter the machines Axis length, use the value used in the CNC firmware or Mach3/4. It will use the values to calculate an even distribution of mounting points.
Drill off sets (Drill the majority of hole inside the work area)
These options are very handy if you wish to make the drill locations evenly distributed but outside the reach on the CNC. IE mounting locations for workpieces which is bigger than the size of the build area. theses offset is normally the extra dimension of the bed vs build area.
Example of this function
As you can see the software has created drill locations evenly across the build area and the offsets. Though if you were to run this code the machine will hit the end stops and not do what is expected. However, in the software you can ignore these values and drill the majority of holes by the CNC machine and do the rest by hand. Saving time and wiggly lines 😊
Set Speed and Federates
Enter the speed and federates for your machine – if you do not know these values then please leave as default – they will work 😉
With all your parameters entered into the spreadsheet it’s time to generate the gcode. To-do this hit the “Generate Gcode” button. NB – ensure the macros are enabled in the workbook, otherwise it won’t work!
You will be prompted by this message;
Ignore Neg values, if you have added offsets to the build volume then this prompt will ignore values outside the reach of the machine. handy to check the generated gcode HOWEVER if you are running the gcode on the machine then please please ignore negative values.
Machine Setup message
This will display some states for the machine including axes lengths and distances between each drill location.
NB the step size will be commented in the exported gcode.
View Drill locations
Drill location – Using this button will only place an orange dot on the drill location
Drill location + Movement – Using this button will only place an orange dot on the drill location and also a line to indicate the travel path.
To export the Gcode clock the “Save Gcode (.gcode)” button this will export the generated gcode into the same directory of the Excel file. The file name will be “RootCNC_DrillGrid.gcode”
Verify (*optional but recommended)
Please check the generated gcode files to ensure they are correct – its’ worth checking every file. I recommend using JViewer to see the generated gcode.
Where to get this spreadsheet?
Check out the shop.
(I know it’s in the shop and not free, however I need some extra coffee and need to pay for this hosting somehow, I hope you understand 😊)