You are on page 1of 20

4/20/2021

I
1. History
2. Motivation and Uses
3. Features and Advantages
4. Types of CNC
5. Programming Basics

II
1. CNC Programming
2. Problems
3. Canned Cycle
4. Summary

1
4/20/2021

*
• 15th century - machining metal.
• 18th century - industrialization, production-type machine tools.
• 20th century - Tool metal - HSS
Automated production equipment -
Screw machines
Transfer lines
Assembly lines
...
using cams and preset stops
Programmable automation -
NC
PLC
Robots

2
4/20/2021

Vertical Milling machine architecture

 To manufacture complex curved geometries in 2D or


3D was extremely expensive by mechanical means

 Machining components with repeatable accuracy

 Unmanned machining operations

3
4/20/2021

* 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.

 Easier to program
 Easy storage of existing programs
 Easy to change a program
 Avoids human errors
 Safer to operate
 Complex geometry is produced as cheaply as simple ones
 Usually generates closer tolerances than manual
machines

4
4/20/2021

 “NC”, system controls many machine functions and movements which were
traditionally performed by skilled machinists
 Numerical control developed to meet the requirements of
 high production rates
 uniformity
 consistent part quality

 Based on Motion Type:


Point-to-Point or Continuous path

 Based on Control Loops:


Open loop or Closed loop

 Based on Power Supply:


Electric or Hydraulic or Pneumatic

 Based on Positioning System:


Incremental or Absolute

10

5
4/20/2021

* 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

11

*
12

6
4/20/2021

The method of accurate work positioning in relation to the cutting tool is called the
“rectangular coordinate system”

13

 CNC instructions are called part program commands

 One command line at a time is interpreted until all lines are completed

 Commands begin with a letter address and end with a numerical value

 Each letter address relates to a specific machine function

 “G” and “M” letter addresses are two of the most common

 “G” letter specifies certain machine preparations such as inch or metric modes,
or absolutes versus incremental modes

 “M” letter specifies miscellaneous machine functions and work like on/off
switches for coolant flow, tool changing, or spindle rotation

 Other codes such as F, S, D, and T are used for feed, speed, cutter diameter
offset, tool number, etc.

14

7
4/20/2021

*
1. G00 Rapid Transverse
2. G01 Linear Interpolation
3. G02 Circular Interpolation, CW
4. G03 Circular Interpolation, CCW
5. G17 XY Plane,G18 XZ Plane,G19 YZ Plane
6. G20/G70 Inch units
7. G21/G71 Metric Units
8. G40 Cutter compensation cancel
9. G41 Cutter compensation left
10.G42 Cutter compensation right
11.G43 Tool length compensation (plus)
12.G43 Tool length compensation (plus)
13.G44 Tool length compensation (minus)
14.G49 Tool length compensation cancel
15.G80 Cancel canned cycles
16.G81 Drilling cycle
17.G82 Counter boring cycle
18.G83 Deep hole drilling cycle
19.G90 Absolute positioning
20.G91 Incremental positioning

15

*
* 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

16

8
4/20/2021

*
* 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

17

18

9
4/20/2021

19

*
Important things to know:
• Coordinate System

• Units, incremental or absolute positioning


• Coordinates: X,Y,Z, RX,RY,RZ

• Feed rate and spindle speed

• Coolant Control: On/Off, Flood, Mist


• Tool Control: Tool and tool parameters

20

10
4/20/2021

* The spindle speed is commanded under an S address

* Always in revolution per minute

* S1000 represents a spindle speed of 1000 rpm

𝑚
𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝑐𝑢𝑡𝑡𝑖𝑛𝑔 𝑆𝑝𝑒𝑒𝑑 𝑖𝑛 (𝑚𝑖𝑛) × 1000
𝑆𝑝𝑖𝑛𝑑𝑙𝑒 𝑆𝑝𝑒𝑒𝑑 =
𝜋 × 𝐶𝑢𝑡𝑡𝑒𝑟 𝐷𝑖𝑎𝑚𝑒𝑡𝑒𝑟 𝑖𝑛 𝑚𝑚

*
21

* The feed rate is commanded under an F address

* Unit: mm per minute or in mm per revolution

* F100 represents a feed rate of 100 mm/min.

F𝑒𝑒𝑑 𝑅𝑎𝑡𝑒 = × . ×

*
22

11
4/20/2021

NUMERICALS

23

*
Each line of program == 1 block

Each block is composed of several instructions, or (words)

Sequence and format of words:

N00 G02 X+10 Y+14 Z+14 I5 J5 K5 F3.2 S400 T4 M02

destination coordinates dist to center of tool


sequence
circle spindle speed

preparatory function feed rate

Other function

24

12
4/20/2021

Manual Part Programming Example

5”
2.5”
p4
p2 p3 p5

1”

Tool size = 0.25 inch,


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

(4, 4)
p1 Motion of tool:
p0  p1  p2  p3  p4  p5  p1  p0
p0 (2, 2)

25

1. Set up the programming parameters

5”
2.5”
p4
p2 p3 p5

1”

Programming in inches
5”
Use absolute coordinates

Feed in ipm
45°
N010 G70 G90 G94 G97 M04
(4, 4)
p1
Spindle speed in rpm
p0 (2, 2)
Spindle CCW

26

13
4/20/2021

2. Set up the machining conditions


5”
2.5”
p4
p2 p3 p5

1”

Machine moves in XY-plane

Use full-circle interpolation


5”
Feed rate

Spindle speed
45°

N020 G17 G75 F6.0 S300 T1001 M08


(4, 4)
p1
Tool no.
p0 (2, 2)
Flood coolant ON

27

3. Move tool from p0 to p1 in straight line

5”
2.5”
p4
p2 p3 p5

Linear interpolation
1”
target coordinates

5” N030 G01 X3.875 Y3.698

45°

(4, 4)
p1

p0 (2, 2)

28

14
4/20/2021

4. Cut profile from p1 to p2

5”
2.5”
p4
p2 p3 p5

1”

Linear interpolation
5” target coordinates

N040 G01 X3.875 Y9.125


45°
or
(4, 4)
p1 N040 G01 Y9.125

p0 (2, 2)

X-coordinate does not change  no need to program it

29

5. Cut profile from p2 to p3

5”
2.5”
p2 p3
p4
p5 Linear interpolation

target coordinates
1”

N050 G01 X5.634 Y9.125

5”

y = 9 + 0.125 = 9.125
(6.5 - x)2 + 0.1252 = (1 - 0.125)2
x = 5.634
45° p3
(x, y)
(4, 4)
p1 (6.5, 9)
.125

p0 (2, 2)

1”

30

15
4/20/2021

6. Cut along circle from p3 to p4

5”
2.5”
p4
p2 p3 p5

1”

circular interpolation, CCW motion

5”
target coordinates

45° N060 G03 X7.366 Y9.125 I6.5 J9.0

(4, 4) coordinates of center of circle


p1

p0 (2, 2)

31

7. Cut from p4 to p5

5”
2.5”
p4
p2 p3 p5

1”

5”

Linear interpolation

45° target coordinates (Y is unchanged)

(4, 4) N070 G01 X9.302


p1

p0 (2, 2)

32

16
4/20/2021

8. Cut from p5 to p1

5”
2.5”
p4
p2 p3 p5

1”

5”
Linear interpolation

target coordinates
45°
N080 G01 X3.875 Y3.698
(4, 4)
p1

p0 (2, 2)

33

9. Return to home position, stop program

5”
2.5”
p4
p2 p3 p5

1”

Linear interpolation

5” target coordinates

N090 G01 X2.0 Y2.0 M30

45°
end of data
(4, 4)
N100 M00
p1

p0 (2, 2) program stop

34

17
4/20/2021

35

36

18
4/20/2021

37

 Diameter of Cutter Available: 28 mm

 The Difference in Radius: (0-28)/2

= -14 mm

 -14 mm is stored in the memory for cutter


radius compensation under address D01

38

19
4/20/2021

39

20

You might also like