CNC Router Tutorial
CNC Router Tutorial
Jeremy Krause
[email protected]
Usage prerequisites:
Any user must have completed the machine shop portion of the Mechanical Engineering
Manufacturing course (undergraduate, sophomore level).
Warnings:
- The machining bit on this CNC mill is extremely sharp and turning
extremely fast (~20000 rev/min). It is more dangerous than a razor
and will sever fingers very quickly. Keep limbs clear of the cutting
table during operation. Ensure power to cutting motor is turned off
(not just turned down) before adjusting the mill bit.
- Take care when changing mill bits. Do not allow the bit to slide
through your fingers, as you will be cut. If necessary, use pliers to
grip the shank of the bit, but avoid grabbing along the cutting
edges, as you may damage them.
- High voltage is present in the control case. Do not operate the mill
or open the case when the case cover is removed.
Equipment limitations:
- Overall material thickness cannot exceed the height of the machining bit above the
support surface. The machining bit MUST be able to travel above the raw stock to work
correctly. The vacuum attachment, when equipped, reduces this capacity significantly.
With the vacuum attachment and wooden base plate, the max cutting thickness is about
0.3 inches. With the vacuum attachment and wooden base plate removed, the maximum
workpiece thickness is 2 inches, as limited by the z axis travel ability.
- This G-code interpreter and the equipment are capable of true three dimensional
machining, BUT, the student version of HSMXpress (G-code builder), does not allow
beyond 2 and ½ dimensional machining without buying the full version. For the author’s
purpose, this is a limitation.
- This router is designed to machine NONMETALS ONLY. Engraving can be performed
on plastics and soft metals. The exception to this is cutting electronic circuit boards PCB,
in which an end mill can be used to machine the copper traces.
Figure 1: Router. (1) Cutting Motor, (2) Cutting Base, (3) Vacuum Attachment.
Figure 2: Cutting Head/Bit Chuck.
Figure 3: Controls. (1) Emergency Stop Switch (Pust to trip, twist to reset), (2) Spindle Speed
Control, (3) Drive Motor Power Switch, (4) Spindle Power Switch.
Part 1: Building the G-Code (Cut Paths)
About the Interpreter:
The G-code interpreter used in this tutorial is the student version of HSMXpress (free), by
Autodesk. It is purely a SolidWorks add-on and CANNOT function by itself. However, it is not
the only G-code interpreter available. Please note that assistance cannot be provided with any
other interpreter.
Process Steps:
1. Load the part file in SolidWorks and initialize the HSMXpress add-in.
2. Begin by inserting a reference geometry coordinate system on the SolidWorks part. This
coordinate system will represent the 0,0,0 (start position) of the CNC router. This
coordinate system should be inserted such that the positive Z axis is vertical, parallel with
the direction of the cutting bit; The positive X axis is to the right; and the positive Y axis
is up, along the length of the part. See Figure 4.
4. Review the HSMXpress tutorials and build your cut path accordingly. See the tutorial
website: http://www.hsmworks.com/docs/hsmworks/2013/en/
Note: Transit (non-cutting) speeds should not exceed 70 inches per minute. Plunge (drill)
speeds should not exceed 6 inches per minute. Lateral cutting speeds should not exceed
60 inches per minute. These speeds are the absolute maximums and will vary according
to the material being cut and the depth of cut. For softer plastics, the cutting speed will be
very near the listed maximums. For harder plastics and softer metals (engraving only),
the speeds will be a lot slower. Recommended cutting speeds for PCB electrical traces
with a 1/16 inch diameter end mill are as follows: Lateral cut, 6 inches/min, plunge cut, 1
inch per min.
Note: Cutting speeds can be changed real time in the Mach 3 G-code interpreter, so
values entered in the HSMXpress can be considered “ball park” figures.
Note: Cutting should be performed at incremental depths. The depth steps should be
between 0.005 and 0.050 inches per step. Do not attempt to cut anything thicker than
0.050 inches in a single cut. When using a 1/16 inch diameter end mill, NEVER exceed
0.010 inches per depth step, or you may break the end mill.
Note: Be sure to select the appropriate cutting tool for each operation. The selected
“Coolant method” should always be “Flood”. Selecting any other coolant method may
result in an interpreter error.
5. Simulate your cut paths by selecting the created cutting operations and clicking
“Simulate” under the CAM tab. It will provide you graphical simulation of the cuts, as
well as provide an estimated completion time. The purpose of this step is to verify that
the cuts will accomplish what is desired.
6. Once your cut paths are to your satisfaction, click “Post Process” in the CNC tab to open
the G-code compiler.
7. In the Post Process compiler, select “mach3mill.cps – Generic Mach3Mill” in the “Post
Configuration” drop down menu. This is IMPORTANT. Not doing so will create G-code
that may be wholly unusable by the Mach 3 G-code interpreter. Define a file output name
and destination. When complete, click the “Post” button.
8. Navigate on your computer to the destination folder that you selected in step 7. Open
your file using any text editor. This is your G-code file. We may need to make a few
changes to make the operation work without erroneous cuts.
a. First, scroll down to the first cutting operation, usually about 16 lines from the
top. Look for a line starting with “G0”, followed by a line starting with “G43”.
Switch these lines. The purpose of this is to make the router raise to transit height
before moving to the initial start point. Not changing these will result in the router
head being dragged along the surface of the material to the start point.
b. Second, scroll to the very end of the G-code file. Look for a line starting with
“G28”. Change the z value listed in that line to the clearance height that you
defined in your HSMXpress cut paths. For example, if you defined a 0.2”
clearance height, change “G28 G91 Z0.” to “G28 G91 Z0.2”. This will cause the
router to maintain the clearance height as it transits to the end position, rather than
dragging across the workpiece at the zero height.
9. Save the G-code file as a text document, filetype .txt.
Part 2: Initializing the Router
1. Double click the “Mach3 Loader” icon on the Router computer desktop screen.
2. In the “Session Profile” box, select the “540BVFD” profile and click “ok”. Not doing so,
or creating another profile will cause the router to not function correctly. Figure 6.
3. Once Mach3 loads, you will be greeted with the following screen, figure 7. Note: If the
motor power switch (NOT THE SPINDLE POWER SWITCH) on the Plexiglass
controller box is off, the “Reset” button will be red and no shuttle will be detected,
prevention the execution of any G-code. If this is the case, turn on the motor power
switch and click the reset button in the Mach3 menu. If the button remains surrounded by
red, an error has occurred. Otherwise, continue.
Figure 7: Main Screen, Motor Power OFF.
Note: Do not alter any properties other than those expressly specified in the previous steps.
Doing so may decrease the machine accuracy or prevent operation.
Note: To pause cutting operations, only click the “Stop” button on the Mach3 “Program Run”
tab. Do Not click the “Reset” button, as this will both stop the machine but also reset the G-code
to the first command. To resume after clicking the “Stop” button, click “Cycle Start”.
Note: If the program is interrupted and your place lost, the program can be resumed from a
specific G-code line by scrolling to the desired start point in the upper left window and then
clicking “Run From Here”. The program will scan the G-code for errors, once complete, click
“Cycle Start”. If an error is found, close Mach3, reload your G-code and try again.
Part 3: Cutting your part.
Note: Always monitor the CNC router and be ready to press the emergency stop switch if an
error occurs. In addition, if the vacuum attachment is not used, the operator should periodically
use the vacuum to clear the scrap material away from the machine bit to improve heat flow away
from the cutting bit.
Important: NEVER, NEVER, NEVER use your hand to remove scrap material from the cutting
floor during operation. Either use a vacuum to suck scrap material away or use a brush to knock
scrap material away.