Professional Documents
Culture Documents
Handbook
on
Practical Sessions
Kingswood Campus
SolidWorks Tutorial
1. Start SolidWorks
2. Click the ‘help’ icon in the toolbars and then click “SolidWorks
Tutorials”
3. Finish watching the Introduction to SolidWorks and then
learning Lessons 1-3
1 2
1 1
1
3 4
1 1
1 1
A
80
70
17
18
R8
100
B B
10
A 20
8
SECTION A-A
5
25
100
DRAWN
CHK'D
APPV'D
MFG
Q.A MATERIAL:
A3
DWG NO.
SolidCAM Tutorial
Follow the Tool part information and add the new tool as
listed as followed
Define the Spin Rate and Feed Rate in the tool data function
(Spin Rate: 1000; Feed Rate: 200) then click OK.
4. Design the processes to machining
Generally speaking, there are four steps to machine this fly
wheel. The first one is to cut a thin disk for the block via
milling.
Secondly, dig an open area between the rim and the central
area on this disk via pocketing.
Thirdly, cut out four open spaces as required via pocketing
too.
Lastly, Drill the central hole in this fly wheel via drilling.
4.1. Define the 3D Milling Operation
Right click the function and select ‘add Milling
Operation’ and ‘3D Milling’
Select ‘Simulate’ then ‘Solid verify’ tab for simulation and play
Produce the G-code
Copy the G&M header code of the machine (on vUWS) to the top
of the generated code and simulate final code with BOXFORD
simulation software.
School of Computing, Engineering and Mathematics
NOTE: For the sake of simplicity, the majority of the text of this International Standard is written in terms
of that is applicable to manual machine-tools but it nevertheless applies to numerically controlled machines
in general.
1.3 The technical terms used in this International Standard are based on the ISO data processing vocabulary.
3.4 If the principal axis can be swivelled and if the extent of its motion allows it to lie in only one position
parallel to one of the axis of the standard three-axis system, this standard is the Z axis.
3.5 If the extent of the swivelling action motion is such that the principal spindle may lie parallel to two or
three axes of the standard three axis system, the Z axis is the standard axis which is perpendicular to
the work-holding surface of the work-table of the machine, ignoring such ancillaries as angles of
packing pieces.
3.6 If there is no spindle, the Z axis is perpendicular to the work-holding surface.
3.7 Positive Z motion increases the clearance between the workpiece and the tool holder.
Fundamentals of programming
4. Specifying co-ordinates
4.1 The two most popular methods of specifying a co-ordinate on numerically controlled machines are:
Absolute - Specifying a target co-ordinate from a fixed datum or the (0,0,0) position.
Relative - Specifying a target co-ordinate relative from the current position of the tool.
4.2 Absolute
When programming any type of CNC machine the co-ordinate specified is the target for the tool or in our
case is the target for the beer can.
The absolute co-ordinates to move the can through positions 1 to 3 are:
Position Co-ordinates
Position 1. 2
Position 2. 4
Position 3. 6
Note that the co-ordinates are taken from a fixed position 0.
4.3 Relative
The relative co-ordinates to move the can through positions 1 to 3 are:
Position Co-ordinates
Position 1. 2
Position 2. 2
Position 3. 2
Note that the target co-ordinates were calculated from the current position.
Absolute:
Position Co-ordinates
Position 1: X-2.000 Y-1.000
Position 2: X1.000 Y-2.000
Position 3: X2.000 Y3.000
Relative:
Position Co-ordinates
Position 1: X-2.000 Y-1.000
Position 2: X3.000 Y-1.000
________________________________________________________________________
2. A programmer assumes when dealing with relative movement of the tool that :
a. The material approaches the tool.
b. The tool approaches the material.
c. The tool approaches the material when the work piece is stationary.
d. The material approaches the tool when the work piece is stationary.
________________________________________________________________________
________________________________________________________________________
5. What are the two main methods pf specifying a co-ordinate on a CNC machine.
________________________________ _________________________________
6. Can you think of a situation that would require the use of both Co-ordinate methods
in a program?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
Introduction to CNC Machining – Revision Questions Page 2
4__________________________ 5___________________________
b.Number the ticks on each axis choosing carefully the +ve and –ve directions
c.Create a program to move the beer can from position 1 to 2 including suction on and of
commands (M08 and M09, respectively)
___________________________________________________________________________
___________________________________________________________________________
School of Computing, Engineering and Mathematics
Task 1 is to write a program for the milling centres to produce the two pockets of the part shown below. The
program when finished is to be entered into the machines allocated and stored under your name. Each
program will need to be verified first and then the stock material is clamped into position. DO NOT USE A
CAD SYSTEM FOR ANY PART OF THIS TASK.
The program zero is to be set up using G54 when machining is to be done. This code allows you to set the
program zero at the bottom left-hand corner of the stock and then the machine will know where this is with
respect to the machine home position (will explain this at the relevant time).
Assessment process:
A CNC program is basically a list of commands that are executed sequentially and these instruct the
CNC controller to perform specific functions.
The program is made up of a series of lines (BLOCKS) which in turn are made up of a series of
commands (WORDS).
Block number 1 contains two words; ”Spindle On” and ”Spindle Speed”.
The actual machine commands that correspond to these “words” would look like this:
N0001 M03 S2000;
The Head
The head of the program usually contains
HEAD all the preparatory commands that control:
N00000 *Spindle
N00001 *Default feeds and speeds
*Coordinate system selection
*Measuring system
BODY
The Body
N00010 This contains the all the moves and machine
N00011 actions and also most of the default values
from the head of the program, which can be
reset when required.
The End
N00072 This is where any auxiliary devices are
activated or deactivated. Also commands
END from the head can be turned off and the
SUB program can be terminated and reset.
PROGRAM
The Sub Program.
This is a useful feature where similar
machining patterns can be repeated or nested
as required.
1.3 Program Syntax
Line number increments are usually determined by the user parameters in the CNC control. It is
advisable that the increment step be set to 5 or 10; this facilitates the addition and editing of CNC
blocks.
Example:
N00000 ;
N00005 ; Easy insertion of blocks before line 5 without the tedious process of renumbering
all the lines.
The spacing between the words of a block is controller specific but often undefined: need to refer to the
documentation supplied with the specific controller.
Declaration order
The XYZ coordinates can be placed in any particular order, but standardizing on an XYZ order
simplifies program debugging and portability.
Coordinates
123.456
It is good programming practice to always include the decimal place when declaring a coordinate.
Some controllers will automatically include the decimal place and some will substitute the missing
numbers with 0, but sometimes not including the decimal point can be disastrous if missed during the
testing and debugging stage. Refer to the specific controller documentation in relation to positional
accuracy and the declaration of floating point numbers (real numbers).
This is controller specific; consult the controller documentation for the EOB .End of Block character.
Example:
N0025 G00 X23.456 Y-23.768 Z1.000 ;
N0030 G01 Z-5.000 F200 ;
2. Creating a program
We will now take a closer look at creating a CNC program. We will systematically add the necessary
codes and coordinates until the program is complete.
Figure 1.
It is assumed that to create an CNC program, a 20.00mm
dia tool is to be used.
The datum (0,0,0) coordinate is located on the bottom L/H
corner and we are cutting from Left to Right.
X0.000 Y50.000 ; Move tool to XY coordinates. (X&Y coordinates in same block will cause both axes
to move simultaneously.
Z1.000 ; Tool moves to 1.000mm above the surface.
Z-10.000 ; Tool plunges 10.000mm deep into the work piece.
X100.000 ; Move tool to the right (X+ direction) 100.000mm
Z1.000 ; Move tool to 1.000mm above the workpiece.
Z50.000 ; Move the tool 50.000mm above the workpiece.
Although we have calculated the target co-ordinates for the CNC part program we will need to differentiate
between rapid positioning commands and cutting feed rate commands.
G codes take effect before a motion is specified. They contain information such as the type of cut to be
performed, that is, whether absolute or incremental (relative) dimensioning is supplied and therefore used in the
program, whether to pause for operator intervention, and so on.
More than one G code from different groups can appear in each NC block. However, you may not place
more than one G code from the same group in the same block.
Introduction to CNC Machining - Lab session 2
We will be using the Prolight PC controlled CNC mill for our machining operations and a listing of the G & M
codes and their groupings is available at the end of this document.
These G codes are retained (modal) until superseded in the program by another code from the same group. Four
interpolation G codes are supported:
Some controllers use UVW as opposed to G91 XYZ to specify incremental coordinates.
Unit Group
G70 Inch mode
G71 Metric mode
*These codes can be omitted if set as system defaults on the controller.
F##mm/min
The F command specifies the feed rate in mm/min and is modal, (self holding) only another F command
can overwrite an existing feed rate value.
In our program we will set a feed rate of 200mm/min.
M codes control Machining Functions while the part program is running. They control such functions as the
spindle On/Off switch, and the Clamp/Unclamp operation of a pneumatically-operated vice. M codes can also be
used to chain a second program to the end of a part program, or to repeat the program. Only one M code can be
specified per NC block (this may vary between controllers).
;HEAD
N0000 G28; Send Machine to limit switches (For safety)
N0003 G54 G90 G71 ; Call register G54 where datum (0,0,0) offsets from machine limits are stored.
N0005 T01; Call tool number 1.
N0010 M03 S1000; Spindle turned on and set to 1000 RPM
N0015 F200;
;BODY
N0020 G00 X0.000 Y50.000 ;
N0025 G00 Z1.000 ;
N0030 G01 Z-10.000 ;
N0035 G01 X100.000 F150;
N0040 G00 Z1.000 ;
N0045 G00 Z50.000 ;
;END
N0050 M30; End program/turn everything off/rewind program.
Enter the above program into a simulator program and test (http://www.cncsimulator.com) .
Appendix A:
Appendix B: Part Program of W Block for Milling Operation
_______________________________________________________________________
_______________________________________________________________________
________________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
40
(0,0)
(0,0)
20
E E
20
40
20
10 10 20 0
0 0 10
1 00
D D
C 10 C
(0,0) (0,0) 20
20
10 10
20
10
40 R20 R30
10 0 10 0
0 10 0 10
B B
DRAWN
CHK'D
APPV'D
MFG
4 3 2 1
School of Computing, Engineering and Mathematics
Task 2 is to write a program for the training lathes to produce a chess piece - rook as shown below. The
program when finished is to be entered into the machines allocated and stored under your name. Each
program will need to be verified first and then the work will be clamped into position. You have the
flexibility to design and turn the rook based on the stock material provided. You can also refer to the figure
below for some information on the size of a rook. YOU ARE ONLY ALLOWED TO USE SOLIDWORKS
CAD PACKAGE TO DESIGN THE ROOK IN THIS TASK, Code should be written and typed as Text
Document manually.
The stock material is of 67 mm in height and 31 in diameter at average. Stock material should be facing
(minimised the height) with P which is the last two student ID digits. You need to keep about 20 mm
considering we mount the rod in the chuck.
Try to fully make use of the material.
Appropriate tools will be provided for turning operations.
Assessment process:
Example:
The following program is written using the ANCA programming format (an Australian-
made CNC controller), this is standard ISO code with some controller specific points
that need to be considered when programming. Please note that the codes refer to the
bench top CNC Emco Lathe, which is not used during the lab sessions.
For the ANCA controller codes, refer to the full G & M code listing at the end of this
section.
Syntax:
Line number - Direction - X & Y Target coordinates - Arc Centre I & J - Feed
rate
Example:
G03 - Direction
X50.0 Z-70.0 - Target coordinates for the arc.
I0.0 K-5.0 - Arc centre locations from tool starting point (incremental).
F200 - Feed rate for arc movement (mm/min).
Machine Codes for the Emco CNC lathe
Miscellaneous Codes
MO Program Halt Modal
M2 End of Program Modal
M3 Spindle Forward Modal
M4 Spindle Reverse N/A
M5 Stop Spindle Modal
M6 Tool change Modal
Other Commands
F _ Feed rate Modal
S _ Speed command Modal
T _ Tool call command Modal
N _ Block number Default inc 10
I,K,W,D,R,U,C _ Parameter values Not modal
P,Q _ Cycle first/last parameters Not modal
G Codes
G00 Rapid Traverse Not modal
G01 Linear interpolation Not modal
G02 Arc clockwise Not modal
G03 Arc anti-clockwise Not modal
G27 Internal Thread Not modal
G28 External Thread Not modal
G29 R/H Thread Reqiures G28/29
G30 L/H Thread Reqiures G28/29
G40 Cutter comp off Not modal
G41 Cutter comp left Not modal
G42 Cutter comp right Not modal
G46 Z cutting cycle Not modal
G47 X cutting cycle Not modal
G50 Position shift register Modal
G52 Send machine home Not modal
G62 Peck grooving cycle. Not modal
G66 Stock removal cycle Not modal
G67 Finish cycle for G66 Not modal
G70 inches Not modal
G71 mm Not modal
G73 Drilling cycle Not modal
G90 Absolute Modal
G91 Incremental Modal
G94 Feed mm/min Modal
G95 Feed mm/rev Modal
2. Cutter compensation (milling)
During the process of writing a tool path, tool radius compensation must be factored into the
program to ensure that the component is machined to the correct size no matter what the
diameter of the tool.
The above diagram describes the result of a tool path created with the geometry and tool
centre path. The geometry path did not allow any offset for the tool diameter and results in
the job being undersized by a full diameter of the tool (the centre of the tool follows the edge
of the job instead of being offset).
a. Manually
The following 110mm square boss needs to be machined to 10.0mm depth with a
40.0mm diameter tool.
N0000 G71 G54 G90 M71 T01 M03 S1800 F350 M08
N0010 G00 X-15.0 Y-15.0 Z50.0
N0020 G00 Z1.00
N0030 G01 Z-10.00
N0040 X135.
N0050 Y135.
N0060 X-15.
N0070 Y-15.
N0080 G00 Z50.
N0090 M30
b. Using cutter compensation functions in the CNC controller
Take note that the geometry path was programmed and the cutter compensation was
calculated by the controller. Care should be taken when using G41/42 commands as they can
cause unexpected movements during activation and cancellation of the functions in a
program.
Appendix A: Part Program of Chess Pawn Using Turning
Operation
G18 G40 G49 G90 G94 G80
M3
G0 X17.275 Z2
F400
G0 X14.275
G1 Z-37.5
G0 X16.275 Z-36
G0 Z2
G0 X13.275
G1 Z-37.5
G0 X15.275 Z-36
G0 Z2
G0 X12.275
G1 Z-37.5
G0 X14.275 Z-36
G0 Z2
G0 Z2
G0 X11.5
G1 Z-37
G03 X12 Z-37.5 I0.5 K0
G1 X17.275
G0 Z2
F200
G0 X11
G1 Z-37
G03 X12 Z-38 I1 K0
G1 X17.275
G0 Z2
Z0.0000
G00 X10.5000 Z0.0000
G01 X10.5000 Z-28.6000
G00 X11.5000 Z-28.1000
G00 Z2
G01 X9.5000 Z0.0000
G01 X9.5000 Z-28.1625
G00 X10.5000 Z-27.6625
G00 Z2
G01 X8.5000 Z0.0000
G01 X8.5000 Z-27.4028
G00 X9.5000 Z-26.9028
G00 Z2
G01 X7.5000 Z0.0000
G01 X7.5000 Z-26.2459
G00 X8.5000 Z-25.7459
G00 Z2
G01 X6.5000 Z0.0000
G01 X6.5000 Z-23.9775
G00 X7.5000 Z-23.4775
G00 Z2
G01 X6.4299 Z-7.7507
G01 X6.4299 Z-8.2670
G02 X5.6214 Z-9.6713 I-6.4299 K2.7670
G01 X6.2740 Z-9.9737
G02 X6.5146 Z-10.1093 I-0.7358 K-1.5878
G00 X6.5200 Z-13.6310
G01 X6.4299 Z-14.4043
G01 X5.5770 Z-15.1211
G03 X6.5146 Z-19.7964 I22.5188 K2.0846
G00 X7.5146 Z-19.2964
G00 X6.4299 Z-12.0706
G01 X6.4299 Z-13.0981
G01 X4.5385 Z-14.6876
G03 X6.5301 Z-22.6590 I23.5572 K1.6511
G00 X7.5301 Z-22.1590
G00 Z2
G01 X5.5000 Z0.0000
G01 X5.5000 Z-3.1021
G00 X6.5000 Z-2.6021
G00 Z2
G01 X4.5000 Z0.0000
G01 X4.5000 Z-1.5314
G00 X5.5000 Z-1.0314
G00 Z2
G01 X3.5000 Z0.0000
G01 X3.5000 Z-0.6266
G00 X4.5000 Z-0.1266
G0Z2
G01 X0.5000 Z1.0000
G01 X0.5000 Z0.4791
G02 X3.9630 Z-10.0050 I-0.5000 K-5.9791
G01 X5.8535 Z-10.8811
G02 X6.0207 Z-12.1357 I-0.3153 K-0.6805
G01 X3.5104 Z-14.2454
G03 X5.8154 Z-23.5001 I24.5853 K1.2089
G02 X6.5296 Z-24.0710 I-0.0141 K-0.7499
G03 X10.0959 Z-28.4919 I6.5044 K1.5983
G02 X10.5146 Z-29.1073 I-0.3290 K-0.6740
G02 X9.9156 Z-31.0739 I-2.8059 K-0.2199
G02 X10.5298 Z-34.8569 I-5.7224 K-2.8704
G02 X10.2875 Z-35.3090 I-0.7423 K0.1069
G01 X10.2875 Z-38.0000
G00 X11.2875 Z-37.5000
G00 Z2
G01 X0.0000 Z1.0000
G01 X0.0000 Z0.0000
G02 X3.3448 Z-9.8660 I0.0000 K-5.5000
G03 X3.3917 Z-10.2913 I0.1520 K-0.1985
G01 X5.6433 Z-11.3347
G02 X5.6990 Z-11.7529 I-0.1051 K-0.2268
G01 X3.0000 Z-14.0212
G03 X5.5000 Z-24.0000 I25.0956 K0.9847
G01 X5.8013 Z-24.0000
G02 X6.0440 Z-24.1903 I0.0000 K-0.2500
G03 X9.8766 Z-28.9412 I6.9900 K1.7176
G02 X10.0162 Z-29.1463 I-0.1097 K-0.2247
G02 X9.3083 Z-31.0000 I-2.3074 K-0.1808
G02 X10.0349 Z-34.7856 I-5.1151 K-2.9444
G02 X9.7875 Z-35.0000 I-0.2474 K0.0356
G01 X9.7875 Z-38.0000
G00 X10.7875 Z-37.5000
G00 Z2
M09
M05
M30
300735 Practical Session 3 Question Sheet Page 1
________________________________________________________________________
________________________________________________________________________
2. Will the following CNC lathe program block create an error? Why?
________________________________________________________________________
3. What is the Prolite CNC mills equivalent to the CNC lathes G50?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
5. Write two programs for the following using a 40.00 diameter tool.
a. Manually calculating the cutter path.
b. Using G40,41/42
F F
100
15
10
E E
R6
12
100
80
D D
70
R6
30
C 50 C
(0,0)
50
B B
DRAWN
CHK'D
APPV'D
MFG
A
Q6 Drawing A
Q.A MATERIAL: DWG NO.
A3
8 7 6 5 4 3 2 1
School of Computing, Engineering and Mathematics
Prac Task 3
Task 3 is to create a model using the SolidWorks CAD package of a Hand Wheel shown in the two drawings
on the following pages. The second part of the task is to generate the toolpaths using the SolidCAM package.
Each of these toolpaths is to be then postprocessed from within SolidCAM to create G&M code for the
milling centres (choose FANUC as the ‘machine’ for postprocessing – this is the closest to the ProLight
code).
Specifically, the task can be broken down into the following steps:
1. Create a model in SolidWorks
2. Do the first few Lessons of the online SolidCAM Tutorial to learn how to use SolidCAM
3. Determine what tools are available in the tool library of SolidCAM
4. Choose an 8mm diameter milling cutter as the appropriate tool from the tool library or if one does not
exist, modify the dimensions of an existing tool from the library.
5. Generate a toolpath using the SolidCAM package
6. Using SolidCAM, generate a program of G & M codes suitable for the milling machine by
postprocessing the toolpath.
7. Modify the resulting program manually so that it includes G54 and other codes that the postprocessor
does not generate.
10.0 .00 p
0 10 Dee
m
0m
2.0
100.00
A A
15.00
0°
90.0
0 12
16.00
.00
80
B 18.00
.00
R5
SECTION B-B
15.00
In recent years a lot of research and development has gone into creating special alloys and coatings to
improve the efficiency of the machining process and to keep up with developments in machine tools and
manufacturing methods. This makes the calculation of the correct feeds and speeds critical so as to take full
advantage of the specific technology. As a general rule when purchasing any type of cutting tool make sure
that you get the data sheet for that specific cutting tool.
2. Terminology
Feed - The speed at which the machine slides move. (G01 F400)
Speed - The speed in RPM for (a) Mill - the tool spindle speed (M03 S1500)
(b) Lathe - the work piece spin speed (M03 S1500)
Whether it’s your dentist drilling a hole in your tooth or you are drilling a hole in a wall to mount a picture it
is important that the tool of the machine is spinning at the correct RPM. Without the correct RPM
(revolutions per minute) it will not be possible to achieve.
* Accuracy
* Correct tool wear
* Economy
* Safety
V
N , where V is in m/min and D is in mm:
πD
325 V
RPM
D
The spindle speed on the drilling machine should be set to the closest value to 1950 RPM.
Thus we need to specify an RPM of 508. This becomes a block: N0035 M03 S508
Important !
Using modern, high performance cutting tools requires well-maintained machine tools and therefore the
capability limits of a machine should not be exceeded. For example, in the turning operation above (3.4),
before setting the spindle speed you should first check that the machine is capable of the required RPM
and any associated tooling is stable at that RPM.
The feed rate in milling is important as it dictates the correct chip load on the flutes (cutting edges) of the
tool, and without the correct feed rate (mm per minute) good machined finishes cannot be achieved,
including:
* Accuracy
* Correct tool wear
* Economy
* Safety
RPM
325 V
We calculate this first using the formula: RPM
D
Number of Teeth
Requires counting the number of teeth (e.g. for a milling cutter with inserts) or flutes (e.g. for a drill, slab
milling cutter etc.) on the tool.
4.2 Example
Using a 3-fluted 6.00mm diameter unimill (end-mill or slot-mill) a slot is to be machined in surgical
grade acrylic.
* Recommended cutting speed of acrylic 120m/min
* Recommended chip depth per tooth 0.10mm
325 120
a. Calculate the spindle RPM: 6500 RPM
6
b. Calculate the feed rate: 6500 x 3 x 0.1 = 1950 mm/min
Feed rates for CNC lathes are usually specified in mm/rev (G95), as the work piece is turning this facilitates
more control of surface finish and enables us to keep the surface finish constant when programming constant
surface speed.
Example:
N0025 G92 S1000 ; Some G codes perform two functions (see note)
N0030 M03 S125 G96 ; Surface speed of 125m/min taken from tool data sheet.
G96 instructs constant surface speed.
Note: G92 sets either (a) a pre-set position if followed by XYZ cords like G54, or (b) sets maximum spindle
speed as here.
Example:
A steel shaft is being faced using a carbide tool with a tool-nose radius of .8mm
Details from data sheet:
* Surface speed 120m/min
* Recommended feed per revolution for roughing is 0.25mm per revolution.
Important:
If your machine does not have constant surface speed option you may have to calculate the Average,
fixed (G97) spindle RPM or increase the speed manually at certain increments.
The use of G97 makes it very difficult to achieve the desired surface finish.
300735 Practical Session 4 Question Sheet Page 1
1. Why is it important to have correct feed and speed values in a CNC program?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
4. Calculate the feed rate for question 3 using a 2 fluted cutter with a chip per
tooth of 0.012mm, show working.
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________