You are on page 1of 15

11/11/2015

History and Development of


Technology

Prepared by Reza

Conventional vs. CNC machine


Conventional machine
eyes, hands, brain, skill
CNC machine
Program Control unit Motor Motion
Measuring & Reflection Unit

Advantages of CNC

Flexible, high accuracy


Short production time
Complex shapes
Short setting time
No skill requirement
Short inspection time/ high quality product
Low cost

No skill is required for operating CNC m/c .

11/11/2015

Disadvantages of CNC

Conventional milling machines


Vertical Milling machine architecture

High machine cost


Complicated maintenance
Skill & training are required for programming
and maintenance.
Parts are imported from aboard.
High tooling cost
Temperature, humidity & dust must be
controlled.

Basic CNC Principles Coordinates System


Basic CNC Principles
All computer controlled machines are able to accurately and
repeatedly control motion in various directions. Each of these
directions of motion is called an axis. Depending on the machine type
there are commonly two to five axes.
Additionally, a CNC axis may be either a linear axis in which movement
is in a straight line, or a rotary axis with motion following a circular
path.

Absolute Coordinate System

Incremental Coordinate System

11/11/2015

Additional Axes
Basic CNC Principles

A axis (angular axis about X - axis)


B axis (angular axis about Y axis)
C axis (angular axis about Z axis)

If a rotary table is added to the machine table, then


the fourth axis is designated the b axis.

U axis (secondary axis parallel to X)


V axis (secondary axis parallel to Y)
W axis (secondary axis parallel to Z)

How CNC Works

Features of CNC Machinery

Controlled by G and M codes.


These are number values and co-ordinates.
Each number or code is assigned to a particular
operation.
Typed in manually to CAD by machine
operators.
G&M codes are automatically generated by the
computer software.

The tool or material moves.


Tools can operate in 1-5 axes.
Larger machines have a machine control unit
(MCU) which manages operations.
Movement is controlled by a motors
(actuators).
Feedback is provided by sensors (transducers)
Tool magazines are used to change tools
automatically.

11/11/2015

Feed drive
Measuring
System

Manual NC programming

Tool change facilities

Part program: A computer program to specify

- Which tool should be loaded on the machine spindle;


- What are the cutting conditions (speed, feed, coolant ON/OFF etc)
- The start point and end point of a motion segment
- how to move the tool with respect to the machine.

Standard Part programming language: RS 274-D (Gerber, GN-code)

11/11/2015

G - Code Programming
G Code Programming

Originally called the Word Address


programming format.

Common Format of a Block


Sequence
#

N50

Preparatory
Function

G90 G01

Dimensio
n Words

X1.40Y2.25

Feed
Rate

Spindle
Functio
n

Tool
Functio
n

Misc.
Function

F10

S1500

T01

M03

Processed one line at a time sequentially.

Individual Words

Zero and reference points on CNC

Zero Point of machine on a CNC lathe

11/11/2015

Exercise 1

3.2 Two types of dimensioning in NC


programming
Absolute dimensioning (G90)-
Incremental dimensioning(G91)-


G90

Absolute

P0
P0-P1
P0-P2
P0-P3
P0-P4
P0-P5
P0-P6

G91

Exercise 2
X

Increment

X0
X-20
X12
X20
X20
X12
X-20

Y0
Y-20
Y-20
Y-12
Y14
Y20
Y20

P0
P0-P1
P1-P2
P2-P3
P3-P4
P4-P5
P5-P6

X0
X-20
X32
X8
X0
X-8
X-32

Y0
Y-20
Y0
Y8
Y26
Y6
Y0

11/11/2015

Exercise 3

Exercise 4

Word Address 1
N Sequence or line number

Dimension Words
X Distance or position in X direction
Y Distance or position in Y direction
Z Distance or position in Z direction

A tag that identifies the beginning of a block of


code. It is used by operators to locate specific lines of a
program when entering data or verifying the program
operation.

G Preparatory function

Word Address 2

G words specify the mode in which the milling


machine is to move along its programmed axes.

M Miscellaneous functions

M words specify CNC machine functions not


related to dimensions or axial movements.

11/11/2015

Word Address 3
F Feed rate (inches per minute or millimeters per
minute)

Rate at which cutting tool moves along an axis.

S Spindle speed (rpm revolutions per minute)

Controls spindle rotation speed.

Word Address 4
I Circular cutting reference for x axis
J Circular cutting reference for y axis
K Circular cutting reference for z axis

T Tool number

Specifies tool to be selected.

G Word
G words or codes tell the machine to perform
certain functions. Most G words are modal
which means they remain in effect until
replaced by another modal G code.

Common G Codes
G00 Rapid positioning mode

Tool is moved along the shortest route to


programmed X,Y,Z position. Usually NOT used
for cutting.

G01 Linear Interpolation mode

Tool is moved along a straight-line path at


programmed rate of speed.

G02 Circular motion clockwise (cw)


G03 Circular motion counter clockwise (ccw)

11/11/2015

Common G Codes, con.,

G17 XY plane
G18 XZ plane
G19 YZ plane
G20 Inch Mode
G21 Metric Mode
G28 Return to axis machine Zero (Home)

G Codes: G90, G91


G90 Absolute Coordinate Reference
References the next position from an absolute
zero point which is set once for the entire
program.

G91 Incremental Coordinate Reference


References the next position from the previous
position.

G Codes: Canned Cycles

G80 Cancel canned cycle


G81 Drilling cycle
G83 Peck drilling cycle
G84 Tapping cycle
G85 Boring cycle
G86 Boring cycle

NOTE: A canned cycle stays in effect until cancelled


by a G80.

Canned Cycles: G81


G81 Drilling Cycle

Feed to depth, rapid return

Example of program code:

N35 G81 X.500Y.500Z-1.000 R.100 F1.50


N36 X1.000Y1.500
N37 X1.500Y2.000
N38 G80

11/11/2015

Canned Cycles: G83, G84


G83 Peck Drilling Cycle

Feed to an intermediate depth, rapid out, rapid


back to just above previous depth, feed to next depth,
rapid out, repeat until reaching full depth.

G84 Tapping Cycle

Canned Cycles: G85, G86


G85 - Boring Cycle

Feed to depth, feed back out.


G86 Boring Cycle

Feed to depth, rapid out.

This cycle creates internal threads in an existing


hole.

NOTE: One cannot over-ride the feed rate.

G Codes: Cutter Compensation


G40 Cancel cutter diameter compensation.
G41 Cutter compensation left.
G42 Cutter compensation right.

M Word
M words tell the machine to perform certain
machine related functions, such as: turn
spindle on/off, coolant on/off, or stop/end
program.

Professional Development ID Code: 6006

10

11/11/2015

Common M words
M00 Programmed pause

Automatically stops machine until operator pushes a button


to resume program.

M01 Optional stop

A stop acted upon by the machine when operator has


signaled this command by pushing a button.

M02 End of program

Common M words
M03 Turn spindle on

In clockwise direction

M04 Turn spindle on

In counter clockwise direction

M05 Stop spindle

Usually used prior to tool change or at end of program.

M06 Tool change

Stops program and calls for a tool change, either


automatically or manually.

Stops program when all lines of code are completed. Must


be last command in program.

Common M words
M08 Turns Accessory 1 on.
M09 Turns Accessory 1 off.
M10 Turns Accessory 2 on.
M11 Turns Accessory 2 off.
M30 End of program

Similar to M02 but M30 will also rewind the


program. Must be last statement in program. If used, DO
NOT use M02.

Programming Key Letters

O - Program number (Used for program identification)


N - Sequence number (Used for line identification)
G - Preparatory function
X - X axis designation
Y - Y axis designation
Z - Z axis designation
R - Radius designation
F Feed rate designation
S - Spindle speed designation
H - Tool length offset designation
D - Tool radius offset designation
T - Tool Designation
M - Miscellaneous function

11

11/11/2015

Table of Important G codes


G00 Rapid Transverse
G01 Linear Interpolation
G02 Circular Interpolation, CW
G03 Circular Interpolation, CCW
G17 XY Plane,G18 XZ Plane,G19 YZ Plane
G20/G70 Inch units
G21/G71 Metric Units
G40 Cutter compensation cancel
G41 Cutter compensation left
G42 Cutter compensation right
G43 Tool length compensation (plus)
G43 Tool length compensation (plus)
G44 Tool length compensation (minus)
G49 Tool length compensation cancel
G80 Cancel canned cycles
G81 Drilling cycle
G82 Counter boring cycle
G83 Deep hole drilling cycle
G90 Absolute positioning
G91 Incremental positioning

Table of Important M codes

M00 Program stop


M01 Optional program stop
M02 Program end
M03 Spindle on clockwise
M04 Spindle on counterclockwise
M05 Spindle stop
M06 Tool change
M08 Coolant on
M09 Coolant off
M10 Clamps on
M11 Clamps off
M30 Program stop, reset to start

Programming Example

Manual Part Programming Example

Cylindrical Part
5
2.5
p3

p2

p4

p5

F 25

Raw Material

Finished Part

(4, 4)
p1

Motion of tool:
p0 p1 p2 p3 p4 p5 p1 p0

F 22.5

45

70

F 17.5

Tool size = 0.25 inch,


Feed rate = 6 inch per minute,
Cutting speed = 300 rpm,
Tool start position: 2.0, 2.0
Programming in inches

20

p0 (2, 2)

30

12

11/11/2015

APT Programming Example (Cylindrical Part)

Programming Example

O0013
N0005
N0010
N0020
N0030
N0040
N0050
N0060
N0070
N0080
N0090
N0100
N0110
N0120
N0130

G53
T0303
G57 G00 X26.00 Z0.0 S500 M04
G01 X-0.20 F100
G00 Z2.0
X50.0 Z50.0
T0404
G57 G00 X22.50 Z2.0 S500
G01 Z-30.0 F100
G00 X23.0 Z2.0 S500
G84 X17.5 Z-20.0 D0=200 D2=200 D3=650
G00 Z2.0
X50.0 Z50.0
M30

Automatic Part Programming

Raw Material

Finished Part

Automatic part programming and DNC

Software programs can automatic generation of CNC data

Very complex part shapes very large NC program


NC controller memory may not handle HUGE part program

Define Tool

computer feeds few blocks of


NC program to controller

CNC data

When almost all blocks executed,


controller requests more blocks

Make 3D model
Simulate
cutting

13

11/11/2015

Example 1: NC Block

Top View NC Block

.125
GRID
SPACES

Origin
(0,0)

Download Worksheet

Worksheet Problem 1
D( , )

I( , )

J( , )

B( , )

.125
GRID
SPACES
K( , )
L( , )

Click here to open Practice Exercises


E( , )
A( , )
F( , )
C( , )
Origin
(0,0)

H( , )

G( , )

14

11/11/2015

Worksheet Problem 2 .250 GRID

Example 2: PLTW Block

SPACE

Origin

Summary

CNC machines allow precise and repeatable control in machining


CNC lathes, Milling machines, etc. are all controlled by NC programs
NC programs can be generated manually, automatically

15