proggg( )ramming tcs (cont’d)me.metu.edu.tr/courses/me440/me440secure/me 440 - 07...– g28 u0...

13
O tli P i TC Outline Programming TCs Programming TCs Basic Motions Dwell Command General NC Code CSS Mode Radius Compensation Turning Cycles Straight turning cycle Threading cycle Chapter 7 ME 440 2 Programming Turning Centers Programming Turning Centers Programming turning centers is very similar to that of machining centers. •Z is the coordinate along the spindle axis while X is by default the diametral axis while X is, by default, the diametral axis. – One needs to specify diametral coordinates for the tip tool of the tool in the X direction. – This is, you need to double the tool coordinates in the X direction. Chapter 7 ME 440 3 Programming TCs (Cont’d) Th t l d (T) i f di it th fi tt f The tool code (T) is four digits the first two for the tool number, the second two for the offset b Th ll th number. They are usually the same. • In G-code System A, one does not need to switch between absolute and incremental programming mode via G90 and G91 codes. Instead, we use X, Z words to specify absolute coordinates and U, W to program with incremental coordinates. Chapter 7 ME 440 4 Programming TCs (Cont’d) G28 code is used to send the machine home G28 code is used to send the machine home. requires a move through an intermediate point. Programmer generally positions the tool clear of the Programmer generally positions the tool clear of the part before sending it home, so the intermediate point is not used. To give it a point, one incrementally programs a zero movement: zero movement: G28 U0 which means go home in X incrementally through a point 0 distance from the current location. through a point 0 distance from the current location. G28 W0 means the same for the Z direction. Chapter 7 ME 440 5

Upload: others

Post on 11-Apr-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

O tli P i TCOutline – Programming TCs• Programming TCs• Basic Motions• Dwell Command• General NC Code• CSS Mode• Radius Compensationp• Turning Cycles

– Straight turning cycle– Threading cycle

Chapter 7 ME 440 2

Programming Turning CentersProgramming Turning Centers

• Programming turning centers is very similar to that of machining centers.g

• Z is the coordinate along the spindle axis while X is by default the diametral axiswhile X is, by default, the diametral axis.– One needs to specify diametral coordinates

for the tip tool of the tool in the X direction.– This is, you need to double the tool

coordinates in the X direction.

Chapter 7 ME 440 3

Programming TCs (Cont’d)g g ( )

Th t l d (T) i f di it th fi t t f• The tool code (T) is four digits – the first two for the tool number, the second two for the offset

b Th ll thnumber. They are usually the same.• In G-code System A, one does not need to

switch between absolute and incremental programming mode via G90 and G91 codes.

• Instead, we use X, Z words to specify absolute coordinates and U, W to program with p gincremental coordinates.

Chapter 7 ME 440 4

Programming TCs (Cont’d)g g ( )

• G28 code is used to send the machine home• G28 code is used to send the machine home.– requires a move through an intermediate point.

Programmer generally positions the tool clear of the– Programmer generally positions the tool clear of the part before sending it home, so the intermediate point is not used.

• To give it a point, one incrementally programs a zero movement:zero movement:– G28 U0 which means go home in X incrementally

through a point 0 distance from the current location.through a point 0 distance from the current location.– G28 W0 means the same for the Z direction.

Chapter 7 ME 440 5

Page 2: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

Common G CodesCommon G Codes

G0 Rapid travel( i t t i t)

G20 Imperial units (inch)(point-to-point)

G1 Rectilinear motion G21 Metric units (mm)

G2 Circular motion (clockwise)

G3 Ci l ti

G28 Return to reference point (home)

G54 First WCS selectionG3 Circular motion (counter clockwise)

G4 Dwell (wait)

G54 First WCS selection

G99 feed per revolution modeG4 Dwell (wait)

Chapter 7 ME 440 6

Common M CodesCommon M Codes

M0 Program stop

M3 Start spindle (clockwise)

M4 Start spindle (counter clockwise)M4 Start spindle (counter clockwise)

M5 Turn spindle off

M8/M9 Turn coolant on / off

M30 End-of-programM30 End-of-program

Chapter 7 ME 440 7

Other Codes

N Li bl k bN Line or block number

X, Z New coordinates in [mm or inch]

U, W Incremental coordinates

F Feed in [mm/rev] or [inch/rev] (w/ G99)F Feed in [mm/rev] or [inch/rev] (w/ G99)Feed in [mm/min] or [inch/min] (w/ G98)

S Spindle speed in [rpm]S Spindle speed in [rpm]

T Tool number

Chapter 7 ME 440 8

Rapid Travel (w/o Interpolation)p ( p )

• Each axis• Each axis independently moves by a

Absolute: G0 Xφ xf Zzf

Incremental: G0 U(φ xf - φ xi) W(zf - zi) moves by a (prescribed) maximum speed

Xp

until it reaches its destination.(φ xf, zf)

• One needs to specify diametral

l f(φ xi, zi)

value of xf .Zi i

Chapter 7 ME 440 9

Page 3: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

Rectilinear MotionRectilinear MotionAbsolute: G1 Xφ xf Zzf Ffφ f f

Incremental: G1 U(φ xf - φ xi) W(zf - zi) Ff

• Move to the destination on a rectilinear path at

X(φ xf, zf) p

the specified feedrate. • f is positive value

f

representing the feed in either [mm/rev] or [ / i ]

Z(φ xi, zi)

[mm/min].

Chapter 7 ME 440 10

Circular Motion

• φ x, z are the coordinates of the destination point.E t t h• Extra parameters such as R, I, and K are needed to specify the arcspecify the arc.– r is the radius of the circle.– i, k are the incremental

coordinates from the center of the circle to the initial tool position.

i i

p

Chapter 7 ME 440 11

G04 - Dwell

• Dwell command suspends the machiningDwell command suspends the machining operation for a specified amount of time.– Mainly used for breaking chips for drilling counter-Mainly used for breaking chips for drilling, counter

boring, grooving or parting-off.• G04 is used in conjunction with X or P wordsG04 is used in conjunction with X or P words

– Numbers after X and P words specify the waiting period in seconds and milliseconds respectively:period in seconds and milliseconds respectively:

• G04 X2.5 ;WAIT FOR 2.5 S – MC• G04 P2500 ;WAIT FOR 2500 MS

Chapter 7 ME 440 12

Structure of a General NC ProgramStructure of a General NC Program

Th t t f i NC• The structure of a generic NC program can be given as– Program initialization– Tool changeg– Machining functions– Program endProgram end

• Except for machining functions, the remaining portions are similar in allremaining portions are similar in all programs.

Chapter 7 ME 440 13

Page 4: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

Structure (Cont’d)Structure (Cont d)Initialization:N__ G21 G40 G99 ; METRIC/COMPENSATION OFF/MM-PER-REV

Tool Change:N M9 ; TURN THE COOLANT OFFN__ M9 ; TURN THE COOLANT OFFN__ G28 U0 ; FIRST GO HOME IN X DIRECTIONN__ G28 W0 ; THEN SAFELY GO HOME IN Z DIRECTIONN__ Ttthh ; LOAD TOOL tt AND ITS OFFSET hhN__ Sssss M3 ; SET THE SPINDLE TO ssss RPM / CWN__ G54 ; SELECT FIRST WCS / FIXTURE OFFSETN__ G0 Zz ; RAPID MOVE TO THE FIRST z LOCATIONN Xx M8 ; RAPID MOVE TO x / COOLANT ONN__ Xx M8 ; RAPID MOVE TO x / COOLANT ON

Program Ending:N__ M9 ; TURN THE COOLANT OFFN__ M5 ; TURN THE SPINDLE OFFN__ G28 U0 ; GO HOME IN X DIRECTIONN__ G28 W0 ; GO HOME IN Z DIRECTIONN M30 ; END OF PROGRAMChapter 7 ME 440 14

N__ M30 ; END OF PROGRAM

Programming Example 1Programming Example 1• Face up to 2 mm off

Cutter at HomePosition

• Face up to 2 mm off the end of a 50 mmdiameter 1117 CD

X2

Position diameter 1117 CDsteel bar with 175 HB.

• Tool: Hard coatedZ

50• Tool: Hard coated

carbide C shaped insert (Tool no: 2)

250

insert (Tool no: 2).• Feedrate: 0.1 mm/rev.• Spindle Speed: 4000

rpm.Chapter 7 ME 440 15

Cutter PathCutter Path

Chapter 7 ME 440 16

NC Program AbsoluteNC Program - AbsolutePROG_T01_ABS ; FACING EXAMPLE - ABSOLUTEN01 G21 G40 G99 ; INITIALIZEN02 G28 U0 ; GO HOME IN XN03 G28 W0 ; GO HOME IN ZN03 G28 W0 ; GO HOME IN ZN04 T0202 ; TOOL 2N05 S4000 M3 ; SPDL SPEED 4000 / CWN06 G54 ; SELECT FIRST WCS0 0 2 8 0 1N07 G0 Z248.0 ; RAPID MOVE TO POINT 1N08 X52.0 M8 ; POSITION TOOL 1MM ABOVE WP/COOLANT ONN09 G1 X0 F.1 ; FACING AT 0.1 MM/REVN10 Z250.0 ; MOVE OUT IN ZN10 Z250.0 ; MOVE OUT IN ZN11 G0 X52.0 ; MOVE OUT RAPIDLY IN X TO 52 MMN12 M9 ; COOLANT OFFN13 M5 ; SPINDLE OFF14 28 0N14 G28 U0 ; GO HOME IN XN15 G28 W0 ; GO HOME IN ZN16 M30 ; END OF PROGRAM

Chapter 7 ME 440 17

Page 5: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

NC Program IncrementalNC Program - IncrementalPROG_T01_INC ; FACING EXAMPLE - INCREMENTALN01 G21 G40 G99 ; INITIALIZEN02 G28 U0 ; GO HOME IN XN03 G28 W0 ; GO HOME IN ZN03 G28 W0 ; GO HOME IN ZN04 T0202 ; TOOL 2N05 S4000 M3 ; SPDL SPEED 4000 / CWN06 G54 ; SELECT FIRST WCS0 0 2 8 0 1N07 G0 Z248.0 ; RAPID MOVE TO POINT 1N08 X52.0 M8 ; POSITION TOOL 1MM ABOVE WP/COOLANT ONN09 G1 U-52.0 F.1 ; FACING AT 0.1 MM/REVN10 W2.0 ; MOVE OUT IN ZN10 W2.0 ; MOVE OUT IN ZN11 G0 U52.0 ; MOVE OUT RAPIDLY IN X TO 52 MMN12 M9 ; COOLANT OFFN13 M5 ; SPINDLE OFF14 28 0N14 G28 U0 ; GO HOME IN XN15 G28 W0 ; GO HOME IN ZN16 M30 ; END OF PROGRAM

Chapter 7 ME 440 18

Changing Surface Speed in Facing

Cutting Tool

Speed Profile

Surface Speed:

• While facing, constant (angular) spindle speed (ω) leads d i i ( f ) d (V) hto decreasing cutting (or surface) speed (V) as the

cutter moves towards the centerline of the workpiece.

Chapter 7 ME 440 19

Surface Speed in Facing (Cont’d)Surface Speed in Facing (Cont d)

• Hence, any particular cutting speed is lid t l i dl d (N i )valid at only one spindle speed (N in rpm)

and diameter value.• Decrease in cutting speed results in poor

surface finish and shorter cutter life sincesurface finish and shorter cutter life since hard cutters generally perform better at hi h tti dhigher cutting speeds.

Chapter 7 ME 440 20

Constant Surface Speed FunctionConstant Surface Speed Function

• To fix this problem, a CNC function called constant surface speed (CSS) is utilized.

• CSS causes the machine to adjust the spindle speed based on the cutter’s Xspindle speed based on the cutter s X diameter to accommodate a desired cutting speed.cutting speed.

• CSS mode should be used for turning, facing and boring NOT threading orfacing, and boring, NOT threading or drilling.

Chapter 7 ME 440 21

Page 6: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

CSS (Cont’d)( )

• Special G codes set the CSS mode:Special G codes set the CSS mode:– Surface speed ([m/min] or [fpm]) is selected

byby• G96 S___ M03 (M04)

– Revolution per minute (normal mode) isRevolution per minute (normal mode) is selected by

• G97 S M03 (M04)___ ( )• Both G96 and G97 are modal. However, it

is a good idea to put the correct one inis a good idea to put the correct one in your program at each tool change.

Chapter 7 ME 440 22

Notes on CSSNotes on CSSIn CSS mode, one can calculate the spindle speed (N: [ ]) f ti f th di t l iti f th tt[rpm]) as a function of the diametral position of the cutter (D: [mm]) as

V⋅1000DVN d

⋅⋅

1000

where Vd is the desired cutting speed in [m/min]. The CNC controller limits N (especially for small D values) to the maximum spindle speed of the lathe (usually 6000 [rpm])maximum spindle speed of the lathe (usually 6000 [rpm]).

If desired, the programmer can set the upperbound of N , p g ppvia the preparatory function G92 S___

Chapter 7 ME 440 23

Facing Example with CSSFacing Example with CSS• Face up to 2 mm off

Cutter at HomePosition

Face up to 2 mm off the end of a 50 mmdiameter 1117 CD

X2

Position steel bar with 175 HB.

• Tool: Hard coated Z

50 carbide C shaped insert (Tool no: 2).

250• Use constant cutting

speed of 180 m/min.• Limit the spindle

speed to 4000 rpm.

Chapter 7 ME 440 24

NC Program CSSNC Program - CSSPROG T02 CSS ; CSS EXAMPLE_ _N01 G21 G40 G99 ; INITIALIZEN02 G28 U0 ; GO HOME IN XN03 G28 W0 ; GO HOME IN ZN04 T0202 ; TOOL 2N04 T0202 ; TOOL 2N05 G54 ; SELECT FIRST WCSN06 G92 S4000 ; SET MAX SPDL SPEED TO 4000 RPMN07 G96 S180 M3 ; SET DESIRED SPEED AS 180 M/MIN/SPDL ONN08 G0 Z248.0 ; RAPID MOVE TO POINT 1N09 X52.0 M8 ; POSITION TOOL 1MM ABOVE WP/COOLANT ONN10 G1 X0 F.1 ; FACING AT 0.1 MM/REVN11 Z250 0 ; MOVE OUT IN ZN11 Z250.0 ; MOVE OUT IN ZN12 G0 X52.0 ; MOVE OUT RAPIDLY IN X TO 52 MMN13 M9 ; COOLANT OFFN14 M5 ; SPINDLE OFFN15 G28 U0 ; GO HOME IN XN16 G28 W0 ; GO HOME IN ZN17 M30 ; END OF PROGRAM

Chapter 7 ME 440 25

Page 7: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

Facing and Straight TurningFacing and Straight Turning• When facing or straight turning, the tool nose

radius has no effect on the part other than leaving a radius on inside corners.

Chapter 7 ME 440 26

“Tool Nose” RadiiTool Nose Radii

• Typical radii for turning and boring tools are as follows:– 1/64” = 0.0156“ = 0.4 mm (metric)– 1/32” = 0.0313” = 0.8 mm (metric)– 3/64” = 0.0469” = 1.2 mm (metric)

• In metal cutting literature, the tool cutting edge is often called as a tool nose, the term tool nose radius offset has become a common t i lterminology.

Chapter 7 ME 440 27

Excess Material• When turning tapers or radii, the tool nose

di l t i lradius leaves excess material.

Chapter 7 ME 440 28

Excess Material on TaperspLet us calculate the excess material left on tapers:

0 4

0.45

0.3

0.35

0.4

x r

ε )

0.2

0.25

rial T

hick

ness

(

0.05

0.1

0.15

Mat

e

0 10 20 30 40 50 60 70 80 900

0.05

Taper Angle (α) [deg])1cos(sin −+= ααεrh

Chapter 7 ME 440 29

Page 8: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

SolutionSolution

• Manually program the exact tangent points:– Tedious!– It requires trigonometric calculations or accurate CAD

drawings to locate the tangent points may.U t l di ti• Use tool nose radius compensation.– The tool nose radius is entered into the machine

controllercontroller,– The machine calculates the tangent points (for

finishing cuts) so one can continue programming as ifg ) p g gthe cutter has a sharp point.

Chapter 7 ME 440 30

G Codes for Radius CompensationG Codes for Radius Compensation

G Code ApplicationG40 Cancel tool nose radius

compensation. Compensate for tool nose

G41p

radius to the LEFT of theprogrammed path.programmed path.

G42Compensate for tool noseradius to the RIGHT of theG42 radius to the RIGHT of theprogrammed path.

Chapter 7 ME 440 31

LEFT and RIGHT CompensationLEFT and RIGHT Compensation

G41 indicates that the cutter is to the LEFT of the work when looking in the direction of the cut.

G42 indicates that the cutter is to the RIGHT of the work when looking in the direction of the cut.g g

Chapter 7 ME 440 32

Notes on Radius Compensationp

• As an important rule the clearances in programAs an important rule, the clearances in program should be large enough to accommodate at least the tool nose radius at the start and the

d f tend of cut.• To turn compensation on, the machine must

move at least the distance of the nose radius inmove at least the distance of the nose radius in X and Z. – For easy calculations, back away from the start pointFor easy calculations, back away from the start point

2 mm and 4 mm in X.• To turn compensation off, the cutter is fed

l t l ff th k d th lcompletely off the work and then a move larger than the nose radius is made while calling G40.

Chapter 7 ME 440 33

Page 9: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

Programming Exampleg g p• Program the finishing

pass on this part usingpass on this part using G42 right tool nose radius compensation. p

• We are given a constant cutting speed of 800g pfeet/min and a feed of 0.006 inch/rev.

• Tool is V shaped coated TiC insert (Tool no: 3).

Chapter 7 ME 440 34

NC Program – G42NC Program G42

PROG_T03 ; EXAMPLE FOR TOOL NOSE RADIUS COMP.N01 G20 G40 G99 ; INITIALIZEN02 G28 U0 ; GO HOME IN XN03 G28 W0 ; GO HOME IN ZN03 G28 W0 ; GO HOME IN ZN04 T0303 ; SELECT TOOL 3: V INSERTN05 G54 ; FIRST WORK COORD. SYSTEMN06 G92 S4000 ; MAX. SPDL. SPEED IS 4000 RPM0 96 800 3 800 /N07 G96 S800 M3 ; DESIRED SURF. SPEED = 800 FPM / SPDL. ONN08 G0 Z2.2 ; RAPID MOVE TO G42 STARTING POINT IN ZN09 X1.0 M8 ; G42 STARTING POINT IN X /COOLANT ONN09 X1.0 M8 ; G42 STARTING POINT IN X /COOLANT ONN10 G42 G1 X.8 Z2.1 F.006 ; MOVE OUT A BIT TO PUT G42 IN EFFECTN11 X1.5 Z1.75 ; MACHINE THE CHAMFERN12 Z1.0 ; DO THE STRAIGHT CUT13 1 75 625N13 X1.75 Z.625 ; MACHINE THE TAPER PORTIONN14 G2 X2.5 Z.25 I.375 K0 ; DO THE RADIUS PORTION

Chapter 7 ME 440 35

NC Program (Cont’d)NC Program (Cont d)

N15 G1 Z-0.15 ; FEED CLEAR IN ZN16 X2 875 ; FEED CLEAR IN XN16 X2.875 ; FEED CLEAR IN XN17 G40 X3.075 Z-0.25 ; MOVE OUT TO TURN OFF COMPENSATIONN18 M9 ; COOLANT OFFN19 M5 ; SPINDLE OFFN20 G28 U0 ; GO HOME IN XN21 G28 W0 ; GO HOME IN ZN22 M30 ; DONE!N22 M30 ; DONE!

Chapter 7 ME 440 36

G42 Starting Pointg

Back to NC program

Chapter 7 ME 440 37

Page 10: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

Turning CyclesTurning Cycles

N ll l f iti i• Normally, we only perform one positioning or cutting task in each block.

• However, tasks such as the four block turning sequence just provided are so g q j pcommon that control designers have incorporated cycles to reduceco po ated cyc es to educeprogramming time.

• A cycle combines multiple moves into a• A cycle combines multiple moves into a single programmed block.

Chapter 7 ME 440 38

Rectangular CyclesRectangular Cycles

• This is a common turning taskRapid travel to a cetain depth– Rapid travel to a cetain depth

– Feed to length– Feed clear of the diameter– Rapid travel back to the starting point.p g p

• This cut takes four blocks to program, a rapid two feeds and another rapidrapid, two feeds, and another rapid.

Chapter 7 ME 440 39

Rectangular Cycle Commandg y

• To use the rectangular turning cycle, you must first position the cutter at

G90 Xφx1 Zz2 Fffirst position the cutter at the Cycle Start Point (0).

• The cutter will also end up at the cycle start point at the end of the cycle.

• The cutter moves rapidly• The cutter moves rapidlyto x1 diameter, is fed to points 2 and 3. Then, it travels rapidly back to the starting position.

Chapter 7 ME 440 40

Remarks on G90Remarks on G90

• The rectangular turning cycle (G90) is modal which is handy for repeated cuts.y p

• You can change φx1 and z2 in succeeding cuts and can add a feedrate on any cut orcuts, and can add a feedrate on any cut or just use the previous one.

• G90 only works in the direction shown. There are additional cycles for facing,There are additional cycles for facing, boring, and turning towards the tailstock.

Chapter 7 ME 440 41

Page 11: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

OD Turning Example• Turn the 3” and 3.5”

diameter steps on this part at 800 rpm with a feedrate of 0 012 inch/revfeedrate of 0.012 inch/rev (ipr).

• Use the 80 degree C gshaped insert in tool 2.

• Let the maximum depth of cut be 0 125”of cut be 0.125 .

Chapter 7 ME 440 42

Programming Stepsg g p

1. Examine drawing.2. How to hold the raw material? 3 jaw chuck. 3 Decide what cutters to use – given hard coated carbide C shaped3. Decide what cutters to use given hard, coated carbide C shaped

insert, and the spindle speed is also given as 800 rpm. Write down the exact sequence of operations:

– Rapid position the cutter in Z0.25” away from the face. y– Rapid position the cutter 0.125” away from the part in X (radial). – Take 0.125” radial cuts (0.25” from diameter) using the G90 turning

cycle. Note: we are not taking finishing cuts in this example. 4 P d4. Program end. 5. Convert the sequence of operations to a program:

– Program Start S– Turn the Steps

– Program End

Chapter 7 ME 440 43

NC Program G90NC Program – G90PROG T04 ; EXAMPLE FOR G90 CYCLEPROG_T04 ; EXAMPLE FOR G90 CYCLEN01 G20 G40 G99 ; IMPERIAL UNITS/CANCEL COMP/IPR MODEN02 G28 U0 ; GO HOME IN XN03 G28 W0 ; THEN IN Z04 0202 2N04 T0202 ; SELECT TOOL 2N05 S800 M3 ; SPDL SPEED 800 / CWN06 G54 ; PICK UP FIRST WCSN07 G0 Z2.5 ; RAPID 0.25” AWAY FROM PART IN ZN07 G0 Z2.5 ; RAPID 0.25 AWAY FROM PART IN ZN08 X4.25 M8 ; RAPID 0.125” RAD. DISTANCE /COOLANT ONN09 G90 X3.75 Z.5 F.012 ; FIRST CUT REMOVES 0.25” FROM DIAMETERN10 X3.5 ; FINISH THE LARGER STEPN11 X3 25 Z1 5 FIRST CUT ON THE SECOND STEPN11 X3.25 Z1.5 ; FIRST CUT ON THE SECOND STEPN12 X3.0 ; FINAL CUT ON THE SECOND STEPN13 M9 ; COOLANT OFFN14 M5 ; SPINDLE OFF;N15 G28 U0 ; GO HOME IN XN16 G28 W0 ; GO HOME IN ZN17 M30 ; END OF PROGRAM

Chapter 7 ME 440 44

Explanations on NC ProgramExplanations on NC Program

Back to NC Program

Chapter 7 ME 440 45

Page 12: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

Explanations (Cont’d)Explanations (Cont d)

Back to NC Program

Chapter 7 ME 440 46

Single Point ThreadingSingle Point Threading

Th di i hi i t• Threading is a machining process to produce a helical groove of a particular shape on a cylinder.

• Most common application of threading fall pp ginto four major categories:– Fastening devices (screws nuts)Fastening devices (screws, nuts)– Measurement tools (micrometer barrel)

Transmission (lead screws camera lenses)– Transmission (lead screws, camera lenses)– Lift mechanisms (jacks)

Chapter 7 ME 440 47

G Codes for ThreadingG Codes for Threading

G Code Application

G32 Requires four blocks per cut, mostlyobsolete now.

G92 Works similarly to the G90 turningcycle with one block per cut required.cycle with one block per cut required.

G76 The whole thread is cut with one block. Has a machine specific formatHas a machine specific format.

Chapter 7 ME 440 48

G92 Threading Cycleg y• G92 works the same as

G90 except for the synchronization between

i dl d tt t

G92 Xφx1 Zz2 Ff

spindle and cutter to create the threads.Here f (mm/rev)

Rapid TravelFeed

• Here, f (mm/rev) corresponds to the pitch of a single-start metric

Clearance is neededto synchronize of a single start metric

thread.• Note that many turning

y

y gcenters use E instead of F on threading cycles.

Chapter 7 ME 440 49

Page 13: Proggg( )ramming TCs (Cont’d)me.metu.edu.tr/courses/me440/me440secure/ME 440 - 07...– G28 U0 which means go home in X incrementally through a point 0 distance from the current

Threading Example with G92Threading Example with G92

PROG_THREADN G21 G40 G99 INITIALIZATIONN__ G21 G40 G99 ; INITIALIZATION...N__ G92 X48.4 Z70.0 F3.0 ; PASS 1 - HEAVYN X47.0 ; PASS 2__N__ X45.8 ; PASS 3N__ X44.8 ; PASS 4N__ X44.2 ; PASS 5N X44 0 PASS 6 LIGHTN__ X44.0 ; PASS 6 - LIGHTN__ G0 X100.0 ; OUT OF G92 CYCLE...N M30 ; END OF PROGRAM__

Chapter 7 ME 440 50

ReferencesReferences

• Some of the materials used in these notes are partly adapted from the following sources:partly adapted from the following sources:– MFET 275: CNC Applications, Purdue University @

Calumet.– CNC Programming Handbook (2/e), Peter Smid,

Industrial Press Inc., New York, 2003.

Chapter 7 ME 440 51