Click here to load reader

2.6 Programming of CNC lathe 2.6.1 The characteristics of CNC lathe programming The most basic lathe operations are: facing

Embed Size (px)

Citation preview

  • 2.6 Programming of CNC lathe 2.6.1 The characteristics of CNC lathe programmingThe most basic lathe operations are: facing

  • turning

  • grooving

  • parting

  • drilling

  • boring

  • threading

  • Coordinate system programming basic two-axis motions: Z and X axesPositive +Z: the motion away from spindle Negative Z: the motion toward the spindleX axis controls the cross-slide movementProgramming zero: on right end planeleft end plane the intersection point of chuck front plane and work-piece centerline

  • (2) Types of positioning modesmovement of tool in modes absoluteincremental or mixed (incremental and absolute)X axis must be programmed in terms of the diameter

    Address U: indicate incremental X axis motion Address W: specify incremental Z axis movement

  • (3) The functions of tool compensation CNC lathes have tool length compensation and tool nose radius compensation

    It is useful to finish machining adjusting setting up tool error and adjusting abrasive tools

  • Tool-nose radius compensation: compensate for the diameter of the tool by offsetting the tool path by the radius of the tool diameter. program the part just as it appears on the part print

  • When we set the X and Z axes of the tool, we create a square point on the tool. Most of the tools we use for turning have radii.

  • an error: apparent when use the tool edges to set coordinate position need to use TNR compensation (saves from mathematically calculating the cutter path) TNR compensation also lets us use the same program for a variety of tool types. With TNR compensation capabilities, the insert radius size can be ignored and the part profile can be programmed.

  • Tool-nose radius compensation can be to the right or left of the part profile.

  • The exact size of the cutting tool to be used is entered into the offset file, and when the offset is called, the tool path will automatically be offset by the tool radius.

    need to specify how much the controller is to offset. The size of the radius is placed in the nose radius offset table, which is typically located adjacent to the tool file under the tool number being used.

  • Other information: the tool nose direction vector. The tool tip or imaginary tool tip has a specific location or direction from the center of the tool-nose radius. The tool nose vector: tells the control which direction it must compensate

    The direction vector number is usually placed in the same tool offset table as the radius value.

  • (4) Spindle speed control constant surface speed control: to speed up and slow down as the part diameter changes, important for: efficient use of cutting tools, tool life, and proper surface finish.

  • Command constant surface speed:

  • Cancel constant surface speed:e.g.G50 S2000; /*max. spindle speed (r/min)G96 S150;G01 X10.;G97 S800;

  • 2.6.2 Programming codes for CNC lathe (1) workpiece coordinate setting X0: spindle or workpiece center Z0: the right end of the workpiece or the chuck face

    Workpiece coordinate

    Part

    Workpiece coordinate

    zero setting

    zero setting

  • G92 (G50) X... Z...

    P is the tool start point,XOZ to be set: G50 X121.8 Z33.9XOZ to be set: G50 X121.8 Z109.7

  • (2) Tool change and tool call T-code is sufficient to tell the control which tool turret position the tool is in. The tool call is accompanied by the offset call Return the axis to home or a safe position before calling a new tool. Correspond the tool offset number and the tool number to eliminate mistakes in machining and damage to equipment.

  • O0302N001 G50 X100.0 Z52.7N002 S800 M03N003 G00 X6.0 Z2.0N004 G01 Z-20.0 F1.3N005 G02 X14.0 Z-24.0 R4.0 N006 G01 W-8.0N007 G03 X20.0 W-3.0 R3.0N008 G01 W-37.0 N009 G02 U20.0 W-10.0 R10.0N010 G01 W-20.0N011 G03 X52.0 W-6.0 R6.0N012 G02 U10.0 W-5.0 R5.0N013 G00 X100.0 Z52.7N014 M05N015 M02

  • (3) Thread cutting

  • depth of each pass: the depth of each pass gets smaller as approach the final thread depth (the minor diameter) As the tool gets deeper into the thread, the area of contact increasesTaking more shallow cuts allows for increase in contact and reduces the chance for work hardening

    To cut a thread, the tool makes many passes, taking shallow cuts down the angle of the plunge.

    The spindle speed must remain constant from rough cutting through finish cutting. (If not inaccurate thread lead will occur) 1 and 2

  • Format: G32 X Z Q F ;X, Z: end point coordinate; F: pitch; feedrate (in/min) =pitch (in/rev) spindle speed (rev/min)

    G32 just does the single movebiggest advantages to G32:can control the depth of each thread pass and the exact plunge angle.

  • 4 mm1 mm 3 mm1.5 mm

  • : 1.5mm, 1=2mm,2=1mm

  • O0013G92 X80.0 Z150.0 S160 M03 ;G90 G00 X50.0 Z122.0 M08 ;X13.2 ; 3-3, ap1 = 0.8 mmG91 G32 X29.0 Z 43.0 F1.5 ; 1()G00 X7.0 ; X= 50Z43.0 ; Z=122.0G90 X12.6 ; ap2 = 0.6 mmG32 X41.6 Z79.0 ; 2G00 X50.0 ;Z122.0 ;X12.2 ;G32 X41.2 Z79.0 ; ap3 = 0.4 mmG00 X50.0;Z122.0;X12.04; ap4 = 0.16 mmG32 X41.04 Z79.0;G00 X50.0;Z122.0;X80.0 Z150.0 M09;M05 M03;

  • :

  • Ax=19.5mmz=3mmBx=25.3mmz=-34mm

  • 0.9mm0.6mm0.6mm0.4mm0.1mmN10 G40 G97 G99 S400 M03 N20 T0404 4N30 G00 X27.0 Z3.0 N40 X18.6 0.9mmN50 G32 X24.4 Z-34.0 F2.0 2mmN60 G00 X27.0 XN70 Z3.0 ZN80 X18.0 0.6mmN90 G32 X23.8 Z-34.0 F2.0 2mmN100 G00 X27.0 XN110 Z3.0 ZN120 X17.4 0.6mmN130 G32 X23.2 Z-34.0 F2.0 2mmN140 G00 X27.0 XN150 Z3.0 ZN160 X17.0 0.4mmN170 G32 X22.8 Z-34.0 F2.0 2mmN180 G00 X27.0 XN190 Z3.0 Z N200 X16.9 0.1mmN210 G32 X22.7 Z-34.0 F2.0 2mmN220 G00 X27.0 XN230 Z3.0 ZN240 X16.9 0N250 G32 X22.7 Z-34.0 F2.0 2mmN260 G00 X200.0 XN270 Z100.0 ZN280 M30

  • (5) Canned cycles fixed cycles: used to simplify the programming of repetitive turning operations ( rough turning, threading, grooving) Programming without the use of a canned cycle can take up to four or five times the number of lines needed for a part with canned cycles.

    Standard canned cycles, are common to most CNC machines.

  • longitudinal turning cycle ( )Format G90 X(U)___ Z(W)___ R___ F___ X(U) , Z(W) : X, Z coordinate at the end point; F : cutting speed.

  • R- : When cutting from the start point to X+ direction; R+ : When cutting from the start point to X- direction;

  • 50mm(X55.0Z3.0),

  • O2009N05 G50 X80.0 Z100.0 N10 M03 S600 T0101; N15 G00 X55.0 Z3.0; N20 G90 X46.0 Z-45.0 F0.3; N25 X42.0; N30 X40.0; N35 G00 X80.0 Z100.0 T0100; N40 M05; N45 M30;

  • 60mm(X65.0Z2.0), 5mm

  • G00 X65.0 Z2.0 G90 X60.0 Z-35.0 R-5.0 F0.2 X50.0 G00 X200.0 Z100.0M30

  • N10 G40 G97 G99 M03 S600 600r/minN20 T0101 1N30 G42 G00 X65.0 Z2.0 N40 G90 X60.0 Z-35.0 R-5.0 F0.2 N50 X50.0 N60 G40 G00 X200.0 Z100.0 N70 M30

  • Thread cutting cycle G92By using G92 in one block, a cycle of four individual movements can be obtained.

    These movements are: 1)rapid traverse to a given diameter; 2)thread cutting with programmed feed rate; 3)rapid withdrawal; 4)rapid return traverse to the starting point.

  • G92 X(U)__ Z(W)__ F__ ; (straight thread)

    G92 X(U)__ Z(W)__ I(R)__ F__ ; (taper thread; Value of I(R) is the radius difference between end and start point of the cut )

    XZ(UW)R45

  • O0009 N1 G50 X60 Z28 N2 S100 M03 N3 G00 X29.1 Z2G00 X32. Z5.; N4 G32 Z-23 F2G92 X29.1 Z-23 F2.0; N5 G00 X32 N6 Z2 N7 X28.5X28.5; N8 G32 Z-23 F2 N9 G00 X32 N10 Z2

  • N11 X27.9 X27.9; N12 G32 Z-23 F2 N13 G00 X32 N14 Z2 N15 X27.5X27.5; N16 G32 Z-23 F2 N17 G00 X32 N18 Z2 N19 X27.4 X27.4; N20 G32 Z-23 F2 N21 G00 X32 N22 X60 Z28 N23 M02

  • G76: Compound type thread cycle

  • FORMAT: G76 G76 m199

    r L0.19.90.10099 605530

    d

  • XUZW iG92Rk

    f

  • G76

  • um X=27.4mm, Z=-30mm

    k=0.65P=1.3mm, P1300

    f=2mm, F=2.0

    1.0mm, Q1000

  • N10 G40 G97 G99 S400 M03 400r/minN20 T0404 T04N40 G00 X32.0 Z5.0 N50 G76 P021160 Q100 R50 N60 G76 X27.4 Z-30.0 P1300 Q1000 F2.0 N70 G00 X200.0 Z100.0 N80 M30

  • Stock removal cycle in facing G94G94 is a function similar in application to function G90. It is used for facing.

  • G94G90G90G94G94

    aG90 bG90RcG94 dG94R

  • Format: G94 X(U)__ Z(W)__ F__ ; G94 X(U)__ Z(W)__ K__ F__ ; Tapered cuts may be programmed by inclusion of address K, which is the value of difference between the starting and ending point in Z direction ( K=Zstart - Zend )

  • 30mm(X85.0Z5.0)5mm N30 G00 X85.0 Z5.0 N40 G94 X30.0 Z-5.0 F0.2 N50 Z-10.0 N60 Z-15.0 N70 G00 X200.0 Z100.0 N80 M30

  • O3014N05 G50 X100.0 Z150.0N10 M03 S600 T0101; N15 G00 X80.0 Z32.0; N20 G94 X20.0 Z26.0 R-4.0 F0.3;N25 Z23.0; N30 Z20.0; N35 G00 X100.0 Z150.0 T0100;N40 M05; N45 M30;

  • STOCK REMOVAL IN TURNING (G71) rough cutting cycle that removes metal along the direction of the Z axis.

    In a case where there is a lot of material to be removed, it has been necessary to employ many blocks for roughing. By using G71, programming of the final shape of the workpiece is defined. Material is removed automatically, in each pass.

    () XZ

  • Cutting is through parallel moves in the Z axis direction

  • A certain procedure needs to be followed: the tool needs to be positioned to the rough stock boundaries. two-fold purpose: to tell the control how big the stock is, to create a Z clearance position that the tool rapids back to on each pass.

    The G71 cycle reads a specified number of blocks to determine the part profile and determines each pass, the depth of cut for each pass, and the number of repeat passes for the cycle.

  • FormatG71 U(d) R(e)G71 P(ns) Q(nf) U(u) W(w) F(f) S(s) T(t)N(ns).....N(nf).

    dthe depth of each roughing cut per side, (no sign) ;e the amount of retract, along the X axis ;nsthe sequence number of the first block in the program, which defines the finish profile nfthe sequence number of the last block in the program uthe stock allowance to be left for a finishing pass in the X axis direction ;wthe stock allowance to be left for a finishing pass in the Z axis direction ;

  • fstonly valid for G71Changes in F,S between blocks P and Q will be ignored in G71;

    the first tool path move of the cycle cannot include any displacement in the direction of the Z axis

    u

  • e.g.: S=500r/min, F=150mm/min, cutting depth =5 mm, stock allowance is 2mm in X axis and 1mm in Z ; amount of retract is 1mm. The tool number is 1.

    O2015N5 G50 X100.0 Z100.0;N10 M03 S640 T0101;N15 G00 X65.0 Z2.0;N20 G71 U5.0 R1.0;N25 G71 P30 Q55 U2.0 W1.0 F0.3;N30 G00 X20.0;N35 G01 Z-15.0;N40 G02 X40.0 Z-46.0 R35.0;N45 G01 Z-67.0;N50 X60.0 Z-85.0;N55 Z-110.0;N60 G00 X100.0 Z100.0 T0100 M05;N65 M30;

  • Finishing cycle (G70) Stock allowances for finishing (U, W) to be removed; G70 allows for removal of the remaining stock allowance (without repetitive passed, along the contour).

    Format: G70 P__ Q__ ; Where P=number of the first block of the finished profileQ=number of the last block of the finished profile

  • STOCK REMOVAL IN FACING ( G72 ) similar to G71, the only difference: change of the cutting direction

    (;ZX)

  • FormatG72 W (d) R (e)G72 P(ns) Q(nf) U(u) W(w) F(f) S(s) T(t)N(ns).....N(nf).

    parameters have the same meaning as those for G71

    Note: the first block of the cycle should not include any displacement in direction of the X axis.

    G72,

  • e.g.: S=640r/min, F=0.3mm/r, cutting depth=2 mm, stock allowance is 1mm in X axis and 0.5mm in Z, amount of retract is 0.5mm, The tool number is 1.

  • O2016N5 G50 X200.0 Z100.0;N10 M03 S640 T0101;N15 G00 X170.0 Z2.0; N20 G72 W2.0 R0.5;N25 G72 P30 Q60 U1.0 W0.5 F0.3;N30 G00 Z-70.0;N35 G01 X160.0;N40 X120.0 Z60.0;N45 Z-50.0;N50 X80.0 Z-40.0;N55 Z-20.0;N60 X40.0 Z0;N65 G00 X200.0 Z100.0 T0100 M05;N70 M30;

  • PATTEN REPEATING (G73) G73 permits the repeated cutting of a fixed pattern, with displacement of the axes position by an amount, divided by the number of passes desired.

    This cycle is well suited for previously formed castings, forgings or rough machined materials the best scenario is when the finished contour closely matches the casting, forging or rough material shape.

  • G73 U(i) W(k) R(d)G73 P(ns) Q(nf) U(u) W(w) F(f) S(s) T(t)N(ns).....N(nf).

    itotal displacement in the direction of X axis ktotal displacement in the direction of Z axis dthe number of rough cutting passes

    Other addresses have similar meaning as in G71

  • N010 G00 X220.0 Z40.0 ;N012 G73 U14.0 W14.0 R3 ;N013 G73 P014 Q020 U4.0 W2.0 F0.3 S180 ;N014 G00 G42 X80.0 Z2.0 ;N015 G01 W-20.0 F0.15 S600 ;N016 X120.0 W-10.0 ;N017 W-20.0 S400 ;N018 G02 X160.0 W-20.0 R20.0 ;N019 G01 X180.0 W-10.0 S280 ;N020 G40;N021 G70 P014 Q020 ;N022 G00 X260.0 Z80.0 ;N023 M30 ;

  • 2.6.3 Examples for Turning Operations Example 1:

  • O0006 ; Program numberN005 G50 X200. Z350. ; Establish workpiece coordinate systemN010 S500 M03 T01 M08 ; Start spindle (CW) at 500rpm. Change to tool 1 and coolant onN015 G00 X54. Z102. ; Rapid to the start pointN020 G90 X44. Z50. F60. ; Execute multiple-pass straight cutting cycle: rapid to 1; cut to 2; and 3 at feed rate 60 mm/min, rapid to start pointN025 X34. ; Rapid to 4;cut to 5 and 3 at feed rate 60 mm/min; rapid to start pointN030 X24. ; Rapid to 6;cut to 7 and 3 at feed rate 60 mm/min; rapid to start pointN0035 G00 X200. Z350. ; Rapid to reference pointN0040 M05; Spindle offN0045 M03; End of program

  • Example 2 :

  • Operation :Chamfering, cutting the outside circle of thread 48mm, cutting conical surface, cutting the outside circle62mm, chamfering, cutting the outside circle80mm, cutting the arc surface, cutting the outside circle80

    Grooving

    Threading

  • X280.51mm1mm30-1=29mm3.5mmx28mmG924---