Chapter 6 CNC
Chapter 6 CNC
Chapter 6 CNC
DJJ10033 WORKSHOP
TECHNOLOGY
6.0 CNC
GATHERED BY :
FARHA BINTI MOHD FADZLI
DEPARTMENT OF MECHANICAL ENGINEERING
POLYTECHNIC OF SULTAN HAJI AHMAD SHAH
25350 KUANTAN PAHANG
History of CNC
1947 John Parsons, Parsons Corporation, Michigan
Developed a control system that directed a spindle to many points in
succession
Conventionally :-
operator decides and adjusts various machines parameters like feed ,
depth of cut etc depending on type of job , and controls the slide
movements by hand.
Introduction
❑ Interface between
Machine
Control Unit
CNC Controller
Program
(MCU)
CNC controller
Input command Processing Output Command
Drive Limit
signal switches
Position
feedback
Lead screw
An open-loop control system for a numerical-control
machine
Control System
Two Basic Types of Control in CNC
ii. Closed loop control system
- Uses feedback measurement to verify that the actual position is
equal to the specified location
- Servo motor with a feedback loop
Work table
Input Dc
Comparator DAC servomotor Gear
Miscellaneous
Position Velocity
function
Motion Data Feedback Feedback
Driving Feedback
System Device
Machine Tool
Element of CNC
Working Principle of CNC Machine (Wiring Diagram)
Element of CNC
1) Input Device
Use tape Punched Tape
reader
Use
Computer
RS232
cable
External Devices
- Floppy disc
- Hard disc
Connect to
port/slot - USB
❑ The holes represent a set of data that tells the machine how to
move and what to do.
Element of CNC
1) Input Device
a) Punched Tape (continue....)
RS-232 Port.
Element of CNC
1) Input Device
c) Direct Input
Control Panel
Element of CNC
1) Input Device
d) Manual Data Input (MDI)
❑ Despite it being the fastest way of telling the machine what to do,
it is also a very risky and tedious operation as it requires the use
of the machine's terminal.
Use
MDI Function
to key in the
program
Control Panel
Element of CNC
1) Input Device
e) External Devices
❑ MCU is use :
- Functions:
a. The input device, such a tape reader.
b. Reading circuits and parity checking logic.
c. Decoding circuits for distributing data to the
controlled axes
d. An interpolator to supply velocity commands
to the axes, either singly or in combination
NC Machine Sub-unit
2) The Machine Control Unit (MCU)
ii- The Control Loop Unit (CLU)
- Function :
a. Position control loops for each and all axes.
b. Velocity control loops.
c. Deceleration and backlash take up circuits.
NC Machine Sub-unit
4) Driving System
❑ Main component of a drive systems :
- Amplifier circuits.
- Drive motors.
- Ball lead screws
5) Feedback Device
❑ A feed back system is also referred to as a measuring
system.
6) Display Unit
❑ As an interactive device between machine and operator.
6) Display Unit
❑ Other important information also display such as :
- machine parameter
- error massage
- diagnostic data
Industrial Application
Metal Machining
Metal Forming
Plating
Painting
Assembly Joining
Linear Axis X Y Z
Rotary Axis A B C
Secondary
U V W
Linear
Interpolation I J K
CNC Axis Conventions
Example Axis in CNC Machine
Z axis will be horizontal on a horizontal machining
centre
Job Planning
1.Sketch the part. Add incremental or absolute dimensions.
Job Planning
4. Plan operation sequence Mark sequence pattern of sketch.
Test program data for accuracy.
PROGRAM DEFINITION
PROGRAM DEFINITION
i) Programme
PROGRAM DEFINITION
ii) Blocks
PROGRAM DEFINITION
iii) Word
PROGRAM DEFINITION
❑ Each line of program = 1 block
1 BLOCK OF INFORMATION
CONSISTS OF 6 WORDS
N G X Y F M
SEQ. PREP. DIMENSION DIMENSION FEED MISC
NO. FUNCT.
N001 G 01 X 12345 Y 67890 F2 5 0 M 0 3
PROGRAM DEFINITION
Sequence no
Preparatory function
Feed rate
Spindle speed
Tool
Miscellaneous function
NC PROGRAMMING
PROGRAMMING CODES
❑ A number of standard codes are used to reduce the amount
of programming effort needed to command machining
operations, instructions and conditions.
PROGRAMMING CODES
i) G Codes (Preparatory Code)
In absolute
programming, all
dimensions must be
taken from the XY
zero at the top
left-hand corner of the
part
NC PROGRAMMING
* In incremental
programming,
- all dimensions
are taken from
the previous
point.
NC PROGRAMMING
❑ Example
Y N10 G91
60 P1 N15 G01 X10 Y10 F300
50 P2 N20 X0 Y10
P4 P3 N25 X20 Y0
40
P4 N30 X10 Y20
30
P5 N35 X20 Y-30
20 P2
P3 P6 N40 X-10 Y-10
10 P1 P5
P6
P7 N45 X-50
10 20 30 40 50 60 X N50 M02
NC PROGRAMMING
❑ For G02 and G03 the feed rate "F" function must be specified
NOTE:
E.g. G01 X200 F250 If a new line with
G01 is listed again
- G01 → Move in a straight line somewhere below,
the F250 does not
- X200. → A distance of 20O.mm have to be written
again. This is called
- F250. → At a feed rate of 250.mm/min modal
NC PROGRAMMING
Example :
Base on drawing below, write the programme using
Absolute Dimension system
Solution :
10 10 70 10 N01 G90
P1 N02 G01 X100 Y0 F300
P5 P2 N03 Y70
P6 P4 P3 P3 N04 X90 Y80
90 P2
80 P4 N05 X20
80
70 P5 N06 X10 Y90
P7 P1 P6 N07 X0 Y80
100 P7 N08 Y0
N09 M02
NC PROGRAMMING
10 20 30 40 50 60 70 80 90 X N10 M02
NC PROGRAMMING
Circular Interpolation
❑ In circular interpolation mode :
i) G02 - Clockwise ii) G03 - Counterclockwise
❑ For G02 and G03 the feed rate "F" function must be specified
NC PROGRAMMING
Circular Interpolation
❑ Direction of movement
Circular Interpolation
❑ To determine the length for I and J, draw an arrow from the
circle starting point A to the circle center point M
i) A → M is paraxial to X or Y
Y Direction : Clockwise
60 A → Start Point
50 E → End Point
40 + E M → Centre of circle
A M
30
20 Block format
i) A → M is paraxial to X or Y
Y Direction : Counterclockwise
60 A → Start Point
50 E → End Point
40 + A M → Centre of circle
E M
30
20 Block format
i) A → M is paraxial to X or Y
Y
60
Direction : Counterclockwise
A → Start Point
50
E E → End Point
40
M → Centre of circle
30
20 M+ Block format
10 G03 X40 Y40 I0 J20
A Direction of End point Center point
movement coordinates of coordinates
10 20 30 40 50 60 X the arc (absolute) I belong to X
J belong to Y
(incremental)
NC PROGRAMMING
i) A → M is paraxial to X or Y
Y
60
Direction : Clockwise
A → Start Point
50
A E → End Point
40
M → Centre of circle
30
20 M+ Block format
10 G02 X40 Y0 I0 J-20
E Direction of End point Center point
movement coordinates of coordinates
10 20 30 40 50 60 X the arc (absolute) I belong to X
J belong to Y
(incremental)
NC PROGRAMMING
Example
N10 G90
Explanation of
commonly
used
G codes
NC PROGRAMMING
PROGRAMMING CODES
ii) M Codes (Miscellaneous Code)
Explanation of
commonly
used
M codes
NC PROGRAMMING
PROGRAMMING CODES
iii) F Codes (Feed Command)
Writing of Program
❑ Program
(X0 Y0) N10 G71 G90 S150 T1
CP N20 G00 X0 Y0
P2 N30 G00 X70 Y-25 Z10
M1 + P2
N40 G01 Z-5 F250
P3 N50 G03 X45 Y-50 I-25 J0
P4
P5
P4 N60 G01 X60 Y-50
P6 N70 G02 X49 Y-75 I0 J-15
P8
M2 +
P7 N80 G01 X38 Y-65
P7
P6 P8 N90 X15 Y-65
N100 Z10
To cut a ‘S’-slot/groove with a point-
to-point method and a continuous N110 G00 M0
path/contouring system
N120 G00 X0 Y0
NC PROGRAMMING
Advantages:
High Repeatability and Precision e.g. Aircraft parts
Disadvantages:
Maintenance is difficult