Ch3 CNC Part Programming

63
CNC PART PROGRAMMING

Transcript of Ch3 CNC Part Programming

Page 1: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 1/63

CNC PART PROGRAMMING

Page 2: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 2/63

7/30/2013 2

7/30/2013 2

ISO MACHINE TOOL AXIS DEFINITION

Page 3: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 3/63

7/30/2013 3

ISO MACHINE TOOL AXES DEFINITIONS 

AXIS   MACHINE TOOL WITH SPINDLE    MACHINE TOOL WITH NO SPINDLE  

Z  axis of spindle,

(+Z) as tool goes away from the work piece 

 perpendicular to work holding surface,

(+Z) as tool goes away from theworkpiece

 MACHINE TOOL

WITH ROTATING

WORKPIECE  

 MACHINE TOOL WITH ROTATING

TOOL 

 HORIZONTAL

 AXIS  

VERTICAL AXIS  

X  radial and parallel to

cross slide, (+X) when

tool goes away from

the axis of spindle 

horizontal and

 parallel to work 

holding surface,

(+X) to the right

when viewed from

spindle towards

work piece 

horizontal and

 parallel to the

work holding

surface, (+X) to

the right when

viewed from

spindle towards

column 

 parallel to and positive in the principal

direction of cutting (primary motion) 

Y  apply right hand rules 

Page 4: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 4/63

7/30/2013 4

RIGHT HAND RULE

 Vertical Machine Horizontal Machine

Page 5: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 5/63

7/30/2013 5

STANDARD LATHE COORDINATE

SYSTEM

Page 6: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 6/63

7/30/2013 6

STANDARD MILLING MACHINE

COORDINATE SYSTEM

Page 7: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 7/63

7/30/2013 77

CNC Machine Axes of Motion 

Five-axis

machine

configurations

Page 8: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 8/63

7/30/2013 8

CNC PROGRAMMING

Page 9: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 9/63

7/30/2013 9

CNC PROGRAMMING

Offline programming linked to CAD programs.

Conversational programming by the

operator. MDI ~ Manual Data Input.

Manual Control using jog buttons or

`electronic handwheel'. Word-Address Coding using standard G-codes

and M-codes.

Page 10: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 10/63

7/30/2013 10

During secondary motion, either the toolmoves relative to the workpiece or the

workpiece moves relative to the tool.

In NC programming, it is always assumed

that the tool moves relative to theworkpiece no matter what the real situation

is. 

Basics of NC Part Programming:

Page 11: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 11/63

7/30/2013 11

The position of the tool isdescribed by using a Cartesian

coordinate system.

If (0,0,0) position can be

described by the operator, then itis called floating zero .

Coordinate system.

Page 12: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 12/63

7/30/2013 12

In defining the motion of the toolfrom one point to another, either

 Absolute  positioning mode orIncremental  positioning mode

can be used.

Coordinate system.

Page 13: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 13/63

7/30/2013 13

1. Absolute positioning . In this mode, thedesired target position of the tool for aparticular move is given relative to the origin

point of the program.

2. Incremental positioning . In this mode,

the next target position for the tool is givenrelative to the current tool position.

Coordinate system.

Page 14: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 14/63

7/30/2013 14

CNC Machine Tool Positioning Modes 

Page 15: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 15/63

7/30/2013 1515

CNC Controllers 

The NC controller is the brain of the NC system, it controls all functions of 

the machine.

• Motion control deals with the tool position, orientation

and speed.

•  Auxiliary control deals with spindle rpm, tool change, fixtureclamping and coolant.

Many different types of controllers are available in the market (GE,

Fanuc, Allen-Bradley, Okuma, Bendix, …). 

There are two basic types of control systems:

point-to-point and continuous path.

Page 16: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 16/63

7/30/2013 16

Point-to-Point Tool Movements Point -to-point contro l systems cause the tool to move to a point on the

part and execute an operation at that point only. The tool is not in

continuous contact with the part while it is moving.

Drilling, reaming, punching, boring and tapping are examples of point-to-

point operations.

Page 17: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 17/63

7/30/2013 17

Continuous-Path Tool Movements Cont inuou s-path co ntro l lers cause the tool to maintain continuous contact

with the part as the tool cuts a contour shape. These operations include milling

along any lines at any angle, milling arcs and lathe turning.

Page 18: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 18/63

7/30/2013 18

Structure of an NC Part Program:

Commands are input into the controller in

units called blocks or statements.

Block Format:

1. Fixed sequential format

2. Tab sequential format3. Word address format

Page 19: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 19/63

7/30/2013 19

EXAMPLE: Assume that a drilling operation is to be

programmed as:

1. The tool is positioned at (25.4,12.5,0) by a

rapid movement.2. The tool is then advanced -10 mm in the z

direction at a feed rate of 500 mm/min., with the

flood coolant on.

3.The is then retracted back 10 mm at the rapidfeed rate, and the coolant is turned off.

Page 20: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 20/63

7/30/2013 20

1. Fixed sequential format0050 00 +0025400 +0012500 +0000000 0000 00

0060 01 +0025400 +0012500 -0010000 0500 080070 00 +0025400 +0012500 +0000000 0000 09

2. Tab sequential format

0050 TAB 00 TAB +0025400 TAB +0012500 TAB +0000000 TAB TAB0060 TAB 01 TAB TAB TAB -0010000 TAB 0500 TAB 08

0070 TAB 00 TAB TAB TAB -0000000 TAB 0000 TAB 09

3. Word address format

N50 G00 X25400 Y125 Z0 F0

N60 G01 Z-10000 F500 M08

N70 G00 Z0 M09

Page 21: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 21/63

7/30/2013 21

Modal commands : Commands issued in theNC program that will stay in effect until it ischanged by some other command, like, feedrate selection, coolant selection, etc.

Nonmodal commands : Commands that areeffective only when issued and whoseeffects are lost for subsequent commands,

like, a dwell command which instructs thetool to remain in a given configuration for agiven amount of time.

Page 22: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 22/63

7/30/2013 22

CNC PROGRAMMING

Page 23: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 23/63

7/30/2013 23

INFORMATION NEEDED by a CNC

1. Preparatory Information: units, incremental or absolutepositioning

2. Coordinates: X,Y,Z, RX,RY,RZ

3. Machining Parameters: Feed rate and spindle speed4. Coolant Control: On/Off, Flood, Mist5. Tool Control: Tool and tool parameters6. Cycle Functions: Type of action required7. Miscellaneous Control: Spindle on/off, direction of 

rotation, stops for part movementThis information is conveyed to the machine through a setof instructions arranged in a desired sequence – Program.

Page 24: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 24/63

7/30/2013 24

BLOCK FORMATSample Block 

N135 G01 X1.0 Y1.0 Z0.125 F5 Restrictions on CNC blocks Each may contain only one tool move Each may contain any number of non-tool move G-codes Each may contain only one feedrate Each may contain only one specified tool or spindle speed The block numbers should be sequential Both the program start flag and the program number

must be independent of all other commands (onseparate lines) The data within a block should follow the sequence shown

in the above sample block 

Page 25: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 25/63

7/30/2013 25

WORD-ADDRESS CODING

N5 G90 G20

N10 M06 T3 N15 M03 S1250 N20 G00 X1 Y1 N25 Z0.1 N30 G01 Z-0.125 F5 N35 X3 Y2 F10 N40 G00 Z1 N45 X0 Y0 N50 M05 N55 M30

Example CNC Program 

Each instruction to the machine

consists of a letter followed by a

number.

Each letter is associated with a

specific type of action or piece of 

information needed by the machine.

Letters used in Codes

N,G,X,Y,Z,A,B,C,I,J,K,F,S,T,R,M

Page 26: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 26/63

7/30/2013 267/30/2013 267/30/2013 26

PART PROGRAM  A part program is a series of coded instructions required

to produce a part. It controls the movement of themachine tool and the on/off control of auxiliary functionssuch as spindle rotation and coolant. The codedinstructions are composed of letters, numbers andsymbols and are arranged in a format of functionalblocks as in the following example 

N10 G01 X5.0 Y2.5 F15.0 | | | | || | | | Feed rate (15 in/min)

| | | Y-coordinate (2.5")| | X-coordinate (5.0")| Linear interpolation modeSequence number

Page 27: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 27/63

7/30/2013 27

G & M Codes

N5 G90 G20 N10 M06 T3 N15 M03 S1250 N20 G00 X1 Y1 N25 Z0.1 N30 G01 Z-0.125 F5 N35 X3 Y2 F10 N40 G00 Z1 N45 X0 Y0 N50 M05 N55 M30

Example CNC Program 

• G-codes: Preparatory Functions

involve actual tool moves.

• M-codes: Miscellaneous

Functions – involve actions

necessary for machining (i.e.

spindle on/off, coolant on/off).

Page 28: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 28/63

7/30/2013 28

G Codes

G00 Rapid traverse G01 Linear interpolation G02 Circular interpolation,

CW

G03 Circular interpolation,CCW G04 Dwell G08 Acceleration G09 Deceleration G17 X-Y Plane

G18 Z-X Plane G19 Y-Z Plane G20 Inch Units (G70) G21 Metric Units (G71) 

G40 Cutter compensation – cancel

G41 Cutter compensation – left

G42 Cutter compensation-right

G70 Inch format G71 Metric format G74 Full-circle programming

off  G75 Full-circle programming

on G80 Fixed-cycle cancel G81-G89 Fixed cycles G90 Absolute dimensions G91 Incremental dimensions

Page 29: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 29/63

7/30/2013 29

Modal G-Codes

Most G-codes set the machine in a “mode”  which stays in effect until it is changed orcancelled by another G-code. These

commands are called “modal”. 

Page 30: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 30/63

7/30/2013 30

Modal G-Code List

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 

Page 31: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 31/63

7/30/2013 31

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

Page 32: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 32/63

7/30/2013 32

N Codes

Gives an identifying number for each block of information.

It is generally good practice to incrementeach block number by 5 or 10 to allow

additional blocks to be inserted if futurechanges are required.

Page 33: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 33/63

7/30/2013 33

X,Y, and Z Codes

 X, Y, and Z codes are used to specify thecoordinate axis.

Number following the code defines thecoordinate at the end of the move relativeto an incremental or absolute reference

point.

Page 34: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 34/63

7/30/2013 34

I,J, and K Codes

I, J, and K codes are used to specify thecoordinate axis when defining the center

of a circle.

Number following the code defines the

respective coordinate for the center of thecircle.

Page 35: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 35/63

7/30/2013 35

F,S, and T Codes

F-code: used to specify the feed rate

S-code: used to specify the spindle speed

T-code: used to specify the toolidentification number associated with thetool to be used in subsequent operations.

Page 36: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 36/63

7/30/2013 36

 Application of Some CodesG01 Linear Interpolation

Format: N_ G01 X_ Y_ Z_ F_  

Linear Interpolation results in a straightline feed move.

Unless tool compensation is used, thecoordinates are associated with thecenterline of the tool.

Page 37: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 37/63

7/30/2013 37

 Application of Some CodesG01 Linear Interpolation

. As an example, for the motion that occurs inx-y plane with the same maximum speed for the

x- and y-axis, initial motion is at an angle of 45oto the axes until motion in one of 

the axes is completed and then the balance of 

the motion occurs in the other axis. This is calledpoint-to-point motion .

Page 38: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 38/63

7/30/2013 38

 Application of Some CodesG01 Linear Interpolation

5

1 0

1 5

2 0

2 5

5 1 0 1 5 2 0 2 5 3 0

A

B C

P o s i t i o n i n g m o t i o n f r o m A t o C

N 1 0 G 0 0 X 3 0 0 0 0 Y 2 0 0 0 0 F 0

Page 39: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 39/63

7/30/2013 39

 Application of Some CodesG01 Linear Interpolation

G01 is another preparatory function to specify

that the tool should be moved to a specified

location along a straight line path. It is referredto as linear interpolation.

This function is typically used to specify

machining of straight features such as turninga cylindrical surface in turning, cutting a slot in

milling, etc.

Page 40: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 40/63

7/30/2013 40

 Application of Some CodesG01 Linear Interpolation

5

1 0

1 5

2 0

2 5

5 1 0 1 5 2 0 2 5 3 0

A

C

L i n e a r i n t e r p o l a t i o n f r o m A t o C

N 1 0 G 0 1 X 3 0 0 0 0 Y 2 0 0 0 0 F 2 5 0 0

Page 41: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 41/63

7/30/2013 41

N10 G00 X1 Z1

N15 Z0.1N20 G01 Z-0.125 F5N25 X2 Z2 F10 

G01 Linear Interpolation

X

Z

Page 42: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 42/63

7/30/2013 42

G02 Circular Interpolation

G02 is also a preparatory function to specify thatthe tool should be moved to a specified location

along a circular path in a clockwise direction. Inorder to specify the path to the MCU, the endpoint of the arc and the location of the center of the arc should be specified. Within the block in

which the G02 code is programmed, the centerof the arc is given by specifying its locationrelative to the start of the arc.

Page 43: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 43/63

7/30/2013 43

G02 Circular Interpolation (CW)

The G02 command requires anendpoint and a radius in order

to cut the arc. I,J, and K are relative to the

start point.

N_ G02 X2 Y1 I0 J-1 F10

orN_ G02 X2 Y1 R1

Page 44: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 44/63

7/30/2013 44

G02 Circular Interpolation (CW)

5

1 0

1 5

2 0

2 5

5 1 0 1 5 2 0 2 5 3 0

C

C

C i r c u l a r i n t e r p o l a t i o n f r o m A t o B

a b o u t a c i r c l e c e n t e r e d a t C

N 1 0 G 0 2 X 2 0 0 0 0 Y 1 0 0 0 0

I 5 0 0 0 J 1 5 0 0 0 F 2 5 0 0

A

B

I = 5

J = 1 5

Page 45: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 45/63

7/30/2013 45

The sequence of some machining operations is maybe the same for any part and for any machine. For

example, drilling a hole involves the following steps:

Position the tool above the point where the hole will bedrilled

Set the correct spindle speed

Feed the tool into the workpiece at a controlled feedrate to a predetermined depth

Retract the tool at a rapid rate to just above the pointwhere the hole started

Canned Cycles

Page 46: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 46/63

7/30/2013 46

Some Commonly Used Canned Cycle 

Code   Function   Down feed   At bottom   Retracti 

on  

G81  Drilling  Continuous

feed 

 No action  Rapid 

G82  Spot face,

counterbore 

Continuous

feed 

Dwell  Rapid 

G83  Deep hole drilling  Peck    No action  Rapid 

G84 Tapping  Continuous

feed 

Reverse

spindle 

Feed

rate 

G85  Through boring(in& out) 

Continuousfeed 

 No action  Feedrate 

G86  Through boring(in

only) 

Continuous

feed 

Stop

spindle 

Rapid 

Page 47: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 47/63

7/30/2013 47

G81 ILLUSTRATION

Page 48: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 48/63

7/30/2013 48

Three Main parts of a CNC program

N5 G90 G21 (Absolute units, metric)

N10 M06 T2 (Stop for tool change, use

tool # 2) N15 M03 S1200 (Turn the spindle on CW to

1200 rpm)

Part 1- Program Petup

Page 49: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 49/63

7/30/2013 49

Three Main parts of a CNC program

N20 G00 X1 Y1 (Rapid to X1,Y1 from originpoint)

N25 Z0.125 (Rapid down to Z0.125) N30 G01 Z-0.125 F100 (Feed down to Z-0.125 at

100 mm/min) N35 G01 X2 Y2 (Feed diagonally to X2,Y2) N40 G00 Z1 (Rapid up to Z1) N45 X0 Y0 (Rapid to X0,Y0)

Part 2- Chip Removal

Page 50: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 50/63

7/30/2013 50

Three Main parts of a CNC program

N50 M05 (Turn the spindle off)

N55 M00 (Program stop)

Part 3- System Shutdown

Page 51: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 51/63

7/30/2013 51

EXAMPLE OPERATION on CNCMILLING MACHINE

Page 52: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 52/63

7/30/2013 52

G-CODE PROGRAM

First pass : conventional mill toa depth of 0.125 around edgeprofile. Tool 1 is a ½ inch dia.end mill.

%:1002N5 G90 G20N10 M06 T1N15 M03 S1200N20 G00 X0.125 Y0.125

N30 Z0.125N35 G01 Z-0.125 F5N40 X3.875N45 Y4.125N50 X0.125N55 Y0.125

Page 53: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 53/63

7/30/2013 53

Second pass:conventional mill to a

depth of 0.25 aroundedge profile.

N35 Z-0.250N40 X3.875

N45 Y4.125

N50 X0.125N55 Y0.125

N60 Z0.125

Page 54: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 54/63

7/30/2013 54

Third pass:conventional mill to adepth of 0.125

around pocket profile.

N65 G00 X1.25 Y1.0

N70 G01 Z-0.125 F5N75 X1.75

N80 Y2.5

N85 X1.25

N90 Y1.0

N95 Z0.125

Page 55: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 55/63

7/30/2013 55

Fourth pass: climbmill to a depth of 

0.125 acrossremaining material.

N100 Y2.125

N105 X2.625

N110 Z0.125

N115 G00 X-5 Y-5 Z5

N120 M05

N125 M30

Page 56: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 56/63

7/30/2013 56

 Advanced features:

Execution of the part of the program in arotated or mirrored position.

 Ability to scale the program and produce

larger or smaller programs. Three dimensional circular interpolation

which produces a helical shape.

Parabolic and cubic interpolation.

Page 57: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 57/63

7/30/2013 57

Program Loading:

Through keyboard

Through punched tape reader Through diskette drive

Through RS 232 serial port

Through network interface card

Page 58: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 58/63

7/30/2013 58

Tool Radius Compensation Cutter Compensation

Shifting tool path so that the actual finished cut iseither moved to the left or right of the programmedpath.

Normally, shifted exactly by tool radius Tool Entry and Exit Issues

T l R di C i

Page 59: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 59/63

7/30/2013 59

Tool Radius CompensationStart of Compensation.

G41 (or G42) and G01 in the same block ramp takes place at block N0010.

N0010 G01 G42 X0.500 Y1.700

N0020 G01 X1.500

G41 (or G42) and G01 in separate blocks the compensation is effective fromthe start.

N0010 G41

N0020 G01 X0.500 Y1.700

N0030 G01 X1.500

(a) G41 (b) G42

G41

G42

G41

G42

(0.5, 1.7)

(1.5, 1.7)

Page 60: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 60/63

7/30/2013 60

Tool Radius CompensationInside 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

Use of M96 and M97.

Cutting tool that is larger than the height of the step, M97 must be used

N0010 G41

N0020 G01 X1.000 Y1.000N0030 G01 Y0.800 M97

N0040 G01 X2.000

G42

G41M96

G41M97

(1.5, 2.0)

(0, 1.6)

Page 61: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 61/63

7/30/2013 61

TOOL-RADIUS COMPENSATION

Cancel Tool Compensation.

G40 in the same block ramp off block.

N0060 G40 X2.000 Y1.700 M02

G40 in a block following the last motion, the compensation iseffective to the end point (2.000,1.700).

N0060 X2.000 Y1.700

N0070 G40 M02

G41

G42

G40

G41

G42

G40

(2.000, 1.700)

(2.000, 1.700)

Page 62: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 62/63

7/30/2013 62

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). Usingtool-radius compensation, the square can be produced.

2.000

2.000

(6,6)

Page 63: Ch3 CNC Part Programming

7/27/2019 Ch3 CNC Part Programming

http://slidepdf.com/reader/full/ch3-cnc-part-programming 63/63

PART PROGRAM

Part Program

 N0010 G41 S1000 F5 M03 N0020 G00 X6.000 Y6.000 N0030 G01 Z-1.000 N0040 Y8.000 N0050 X8.000 N0060 Y6.000 N0070 X6.000 N0080 Z1.000 N0090 G40 M30

Explanation

Begin compensation, set feed and speed, spindle oMove to lower left cornerPlunge down the tool

Cut to upper left cornerCut to upper right cornerCut to lower right cornerCut to lower left cornerLift the tool

End compensation, stop the machine