0% found this document useful (0 votes)
122 views

CNC Router Tutorial

The document provides instructions for safely operating a CNC router and creating G-code files to control cutting paths using HSMXpress software. Key steps include completing a machining course, carefully changing cutting bits, monitoring the router, and setting cutting speeds appropriate for the material. G-code is generated by defining a coordinate system in SolidWorks, creating cut paths in HSMXpress, simulating the cuts, and posting the G-code file for use in the Mach 3 controller software.

Uploaded by

M Shabbir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views

CNC Router Tutorial

The document provides instructions for safely operating a CNC router and creating G-code files to control cutting paths using HSMXpress software. Key steps include completing a machining course, carefully changing cutting bits, monitoring the router, and setting cutting speeds appropriate for the material. G-code is generated by defining a coordinate system in SolidWorks, creating cut paths in HSMXpress, simulating the cuts, and posting the G-code file for use in the Mach 3 controller software.

Uploaded by

M Shabbir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

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.

- The movement mechanism of the mill possesses a number of pinch


points. Keep hands clear during operation to avoid your extremities
being caught between moving members.

- The CNC router must be monitored at all times. Do not leave


unattended.
Introduction
The CNC router is precision piece of machinery, capable of cut precision equal to or greater than
0.001 inches. Router function is as follows: A g-code file is loaded on to the attached computer,
into the Mach 3 g-code interpreter software. Mach 3 directs the stepper motors on the Router
mechanism to move in accordance with the g-code, which move the router motor in the
predefined motion, removing material with the cutting bit. The operations that this setup is
capable of performing are general purpose machining, engraving, and high accuracy machining
(special conditions must be met to maximize accuracy). This setup is capable of 3 dimensional
machining, but the student version of HSMXpress is limited to 2 ½ dimension machining. 2 ½
dimension machining basically means that the cuts can be made in the x and y direction ONLY
while the z direction is being held constant. So, for example, you can a perfect cylinder, but not a
perfect hemisphere. For most projects, this is not a significant obstacle.
This tutorial is divided into three (3) distinct sections: Building your G-code file, Setting
up & initializing your G-code in the interpreter (Mach 3), and Cutting your part(s).

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.

Notes and definitions:


G-code – A computer language used to define cut paths, cut speeds, and other machining
operations. Language was developed years ago and is used when programming almost any
computer guided cutting machinery. More modern equipment will come with a pendant for
programming or a graphical user interface, allowing the cut paths to be programmed on-site,
without a separate computer. This setup requires that a separate G-code file be compiled and then
loaded into the Mach 3 G-code interpreter.

Regarding the CNC computer:


The computer on which the G-code interpreter operates requires a 32 bit version of the Windows
operating system to function correctly. This is due to the 64 bit parallel port drivers being
changed from the earlier, 32 bit version by Microsoft. This effectively limits the usable RAM
memory to 4 Gb, making it next to impossible to run SolidWorks concurrently with the G-code
interpreter. Furthermore, as Microsoft is constantly updating their software, often in ways that
interfere with user operation, it is imperative that the computer not be connected to the internet.
If Windows updates were to be applied, operation of the CNC router could be disrupted. For this
reason, all G-code files should be loaded to the computer using a writable CD or a USB stick
only. The UTSA Service Tag of this particular computer is HBZXCP1.

Learn the equipment:

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.

Before you begin you will need:


- A completed SolidWorks part file.
- A computer equipped with SolidWorks and the HSMXpress software.

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.

Figure 4: Adding a Reference Coordinate System


3. Create a new job in HSMXpress by clicking the “CAM” tab in SolidWorks. Navigate to
the CAM tab in the left hand side bar, right click, and select “New Job”. Select “Relative
Size Box” and “No Additional Stock” under the Stock section. Select “Use Coordinate
System” and select the coordinate system added in step 2 below the drop down menu.
Click new machine and define the speeds and workpiece limitations as listed in step 4.
Click the green arrow to complete the new job. Any cutting operations created under this
new job will use the speeds and limitations defined in this menu,.

Figure 5: HSMXpress, New Job

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.

Figure 6: Mach3 Profile Manager

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.

Figure 8: Main Screen, Motor Power ON.


4. Once the Reset button is surrounded by Green, the motor controls are active and the CNC
router can be manually moved using the arrow keys on the attached keyboard (the PgUp
and PgDn buttons control the vertical elevation of the spindle).
5. Ensure the Spindle Power is turned off. Position and adhere your raw material to the
cutting surface using double sided tape. Using the appropriate wrenches, loosen the
spindle arbor and insert the appropriate machining bit, then tighten the spindle arbor.
Take care not to bend the spindle arbor by torqueing it against the motor.
6. Using the arrow keys, position the cutting bit over the raw material positioned in step 5
such that the x direction and y direction clearances correspond to coordinate system
defined when making your G-code cut paths in SolidWorks.
7. Using the PgUp and PgDn buttons, adjust the cutting bit height until it barely contacts the
raw material from step 5. This is accomplished by turning the spindle by hand, feeling for
when the resistance increases as the spindle is lowered. Ensure the Spindle Power is OFF
for this step! Once this step is complete, do not move the spindle in any direction, as you
just defined your machine origin.
8. In the Mach3 “Diagnostics” tab, set all “Current Position”, “Machine Coord”,
“WorkOffset” and “G92 Offset” boxes to “0”. See figure 9. You have now informed
Mach3 that the current position of the router is the origin position (0,0,0).

Figure 9: Mach3 Diagnostics Tab


9. Go back to the “Program Run” tab. Load your G-code file by clicking “Load G-Code”
and selecting your G-code text file. Your G-code will be displayed in the upper left
window on the “Program Run” tab. A depiction of the cut paths will be displayed in the
upper right screen. This can be manipulated and zoomed using the mouse buttons.
10. Ensure the coordinates shown in the X, Y, and Z boxes on the “Program Run” tab are all
zero. If not, repeat step 8. If so, turn on the Spindle Power Switch, turn the speed control
knob all the way clockwise to set the speed to maximum, and click the “Cycle Start”
button on the Mach3 “Program Run” tab. The Router should now begin cutting your part.

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.

Responsibilities during cutting operations:


- Monitor cutting operations in case of error or bit failure.
- Clean scrap material away from the cutting bit. This is especially important during deeper
cuts as the material can clump in narrow channels and severely impede cutting bit
movement.
- Adjust cutting and movement speeds to minimize chatter and/or prevent bit damage. The
cutting speed can be adjusted during operation by increasing or decreasing the speed in
the “Feed Rate” section of the Mach3 menu. See figure 8.
o Note: Chatter is defined as vibration in the router due to operating at or near
resonant frequencies. This is demonstrated by louder than normal noises during
cutting operations. Reducing or increasing the cutting speed by a few inches per
minute will minimize these vibrations and noise.

If any errors occur, do the following:


- If clogged, vacuum away scrap material.
- If bit failure occurs, stop the cutting operation by clicking the “Stop” button or pressing
the emergency stop button (large red button) on the clear Plexiglas case.
o Note: Using the “Stop” button is preferable if possible as it will maintain the
position of the router, allowing you to click “GOTO ZERO” and send the router
back to zero position. This will allow you to resume cutting operations with a
reasonable level of consistency between previous and current operations.
- Once the cutting operations are complete, click stop or reset before turning off the spindle
power. Never turn off the spindle power before stopping motion of the router, as the bit
will break if the non-turning spindle impacts material.

Above all, be safe!

You might also like