Sei sulla pagina 1di 36

NC PART PROGRAMMING

10 - 1

Agenda
Introduction Elements of NC Program NC Words (G, M, T, S, Codes) Examples Cutter Compensation and Offsets Conclusions

10 - 2

COORDINATE SYSTEMS
y y z x

10 - 3

Coordinate system for a lathe


(Based on Y. Koren, Computer Control of Manufacturing Systems,McGraw- Hill, 1983. Reproduced with permission of McGraw-Hill Companies)

10 - 4

Coordinate system for a drill.


(Based on Y. Koren, Computer Control of Manufacturing Systems,McGraw- Hill, 1983. Reproduced with permission of McGraw-Hill Companies)

10 - 5

Coordinate system for a mill


(Based on Y. Koren, Computer Control of Manufacturing Systems,McGraw- Hill, 1983. Reproduced with permission of McGraw-Hill Companies)

10 - 6

Introduction to NC programming
Manual part programming Computer-assisted part programming

PROGRAM STORAGE
Paper tape Paper or Mylar coated paper. Diskettes From other computers through RS 232 or local area network (LAN)

10 - 7

NC WORDS
A G-code program consists the following words: N, G, X, Y, Z, A, B, C, I, J, K, F, S, T, R, M An EIA standard, RS-273 defines a set of standard codes.

10 - 8

BASIC REQUIREMENT OF NC MACHINE CONTROL


a. Preparatory functions: which unit, which interpolator, absolute or incremental programming, which circular interpolation plane, cutter compensation, etc. b. Coordinates: three translational, and three rotational axes. c. Machining parameters: feed, and speed. d. Tool control: tool diameter, next tool number, tool change. e. Cycle functions: drill cycle, ream cycle, bore cycle, mill cycle, clearance plane. f. Coolant control: coolant on/off, flood, mist. g. Miscellaneous control: spindle on/off, tape rewind, spindle rotation direction, pallet change, clamps control, etc. h. Interpolators: linear, circular interpolation

10 - 9

NC WORDS
N code. sequence number N0010 G code. preparatory word.

10 - 10

NC WORDS (continue)
X, Y, Z, A, B, C Codes. coordinate positions of the tool. The coordinates may be specified in decimal number (Decimal Programming), or integer number (BLU Programming). BLU programming: leading zero, trailing zero. In the leading zero format: X00112 Y002275 Z001 In the trailing zero format, the program looks like: X11200 Y22750 Z10000

10 - 11

NC WORDS (continue)
Circular Interpolation: (5.000,4.000)

Cut from (5.000,4.000) to (7.000,2.000) CW

(7.000,2.000) (5.000,2.000)

10 - 12

NC WORDS (continue)
F Code. feed speed. inch/min (ipm), or ipr. F code must be given before either G01, G02, or G03 can be used. N0100 G02 X7.000 Y2.000 I5.000 J2.000 F6.00 S Code. cutting speed code. It is programmed in rpm. S code does not turn on the spindle, spindle is turned on by a M code. N0010 S1000

10 - 13

NC WORDS (continue)
T Code. tool number. Actual tool change does not occur until a tool change M code is specified. R Code. cycle parameter.
1 (1,2,2) Initial height 2 R plane 0.3" 1" 3

0.7"

The cycle may be programmed in one block, such as: (cycle programming is vendor specific.)

5 Z point 4

N0010 G81 X1.000 Y2.000 Z0.000 R 1.300

10 - 14

NC WORDS (continue)
M Code. miscellaneous word.

10 - 15

NC part-program manuscript

10 - 16

MANUAL PART PROGRAMMING


Example 10.1 Machined from a 5" x 4" x 2" workpiece. low carbon steel. The process plan: 1. Set the lower left bottom corner of the part as the machine zero point (floating zero programming). 2. Clamp the workpiece in a vise. 3. Mill the slot with a 3/4" four flute flat end mill made of carbide. From the machinability data handbook, the recommended feed is 0.005 inch/tooth/rev, and the recommended cutting speed is 620 fpm. 4. Drill two holes with a 0.75" dia twist drill. Use 0.18 ipr feed and 100 fpm speed.

10 - 17

PART DRAWING

10 - 18

SOLUTION TO EXAMPLE
Solution: The cutting parameters need be converted into rpm and ipm. Milling:

Drilling:

10 - 19

SETUP AND CUTTER PATH


p2 p3 H2 p8 H1 p4 p6 p7 p5

p9 p1
(0,0,0)

Drill

End mill

Vise jaw

(0,0,0)

10 - 20

CUTTER LOCATIONS
The coordinates of each point (cutter location) are calculated below: p1': ( 1.75+0.375, -0.1-0.375, 4.00) = (2.125, -0.475, 4.000) p1: (2.125,-0.475, 2.000-0.500) = (2.125,-0.475,1.500) p2: (2.125,4.000+0.100,1.500) = (2.125,4.100,1.500) p3: (3.000-0.375,4.100,1.500) = (2.625,4.100,1.500) p4: (2.625,1.375,1.500) p5: (3.000,2.000-1.000+0.375,1.500) = (3.000,1.375,1.500) p6: (3.000,2.625,1.500) p7: (3.000,2.000,1.500) p8: (2.625,2.000,1.500) p9: (2.625,-0.100,1.500) p9': (2.625,-0.100,4.000)

10 - 21

PART PROGRAM

10 - 22

CNCS VERIFICATION

10 - 23

CNCS 3D DRAWING

10 - 24

Offsets
Fixture
G10, G54, ..

Diameter Tool
Length compensation Part-Edge compensation

Cutter Compensation Next Slides Others Discussed in Lab Exercises (EdgeCAM)

10 - 25

Tool Radius Compensation


Cutter Compensation Shifting tool path so that the actual finished cut is either moved to the left or right of the programmed path. Normally, shifted exactly by tool radius Tool Entry and Exit Issues

10 - 26

(a) Tool compensation left, (b) tool compensationright, (c) additional block for external curves, (d) go to the machining point when cutting external curves.

10 - 27

(a) Ramp on block, (b) tool compensation -effective from the start

10 - 28

TOOL-RADIUS COMPENSATION
Start of Compensation.
(a) G41 (b) G42

G41 (or G42) and G01 in the same block ramp takes place at block (0.5, 1.7) N0010. N0010 G01 G42 X0.500 Y1.700 N0020 G01 X1.500
G41 G42

(1.5, 1.7)

G41 (or G42) and G01 in separate blocks the compensation is effective from the start. N0010 G41 N0020 G01 X0.500 Y1.700 N0030 G01 X1.500
G42 G41

10 - 29

TOOL-RADIUS COMPENSATION
Inside Corner. Cutter path is inside a corner, stops at the inside cutting point N0010 G41 N0020 G01 X1.500 Y2.000 N0030 G01 X0.000 Y1.600
(0, 1.6) (1.5, 2.0)
G42

Use of M96 and M97. Cutting tool that is larger than the height of the step, M97 must be used
G41 M96

N0010 G41 N0020 G01 X1.000 Y1.000 N0030 G01 Y0.800 M97 N0040 G01 X2.000
G41
(1,1) (1,0.8)

(2,0.8)

M97

10 - 30

TOOL-RADIUS COMPENSATION
G41 G40

Cancel Tool Compensation. G40 in the same block ramp off block. N0060 G40 X2.000 Y1.700 M02
G42

(2.000, 1.700)

G40 in a block following the last motion, the compensation is effective to the end point (2.000,1.700). N0060 X2.000 Y1.700 N0070 G40 M02
G41

G40 G42

(2.000, 1.700)

10 - 31

EXAMPLE
A square 2.0 in. x 2.0 in. is to be milled using a 1/2 in. end milling cutter. Write an NC part program to make the square. Solution Let us set up the lower left corner of the square at (6.0,6.0). Using tool-radius compensation, the square can be produced.

2.000

2.000

(6,6)
10 - 32

PART PROGRAM

10 - 33

TURNING
2.875 .250 .625 1.125 R.125 1.000 2.125 2.875

Z X

Part design

Cutter path

Tool

Cutter path

10 - 34

POCKETING

Contouring Stair case

10 - 35

Where you should be


You WILL (SHOULD) LEARN how an NC machine works (Next Class) You should be able to create an NC program manually and using EdgeCAM You should be able to read an NC program and understand what the machine will do You should be safe in the Machine lab using NC machines

10 - 36

Potrebbero piacerti anche