numerical control programming

81
Chapter 6 Numerical Control Programming 6.1 NC part programming 6.2 Manual part programming 6.3 Computer-assisted part programming 6.4 CAD part programming 6.5 NC cutter-path veriication 6.6 Anal!tical geometr! or part programming

Upload: msaqibraza93

Post on 06-Oct-2015

42 views

Category:

Documents


2 download

DESCRIPTION

m

TRANSCRIPT

  • Chapter 6 Numerical Control Programming

    6.1 NC part programming6.2 Manual part programming6.3 Computer-assisted part programming6.4 CAD part programming6.5 NC cutter-path verification6.6 Analytical geometry for part programming

  • 6.1 NC PART PROGRAMMING /IntroductionCoordinate Systems/NC Words/

  • 6.1.1 Coordinate System/Cartesian coordinate system: the xyz system is a right-hand systemPositive motion: moving the cutting tool away from the workpiece.

  • 6.1.1 Coordinate System/Z AXISworkpiece-rotating machine: Z is parallel to the spindletool-rotating machine: Z is parallel to the tool axisZZZZ // rotating spindle

  • 6.1.1 Coordinate System/X AXISworkpiece-rotating machine: X is the direction of tool movement horizontal milling machine : X axis is parallel to the table vertical machine : +X axis points to the right when the programmer is facing the machine. ZZZXXXX // table

  • 6.1.5 NC Words/ N, G, X, Y Z, A, B, C, I, J, K, F, S, T, R, MN: specify the sequence number

    G: preparatory word to prepare for control functions (the motion of each axis, coordinate system, coordinate plane, cutter radius compensation, tool length offset)

    M: miscellaneous word to control miscellaneous functions (spindle on/off, start/stop the machine, turn on/off the coolant, change the tool, and rewind the program tape)

  • 6.1.5 NC Words/

  • 6.1.5 NC Words/M CODES

  • 6.1.5 NC Words/Modal codes and non modal codes/ modal functions Modal functions stay active until some other command changes it. Modal commands are arranged in sets called modal groups, and only one member of a modal group may be in forces at any given time. non-modal functions Non-modal functions have effect only on the lines on which they occur.

  • 6.1.5 NC Words/modal groups/

  • 6.1.5 NC Words/M CODESmodal groups/

  • 6.1.5 NC Words/N, G, X, Y , Z, A, B, C, I, J, K, F, S, T, R, MF: feed rate of the tool motionS: cutting-speed

    T: tool number

  • 6.1.5 NC Words/X, Y, Z, A, B, C: provide the coordinate positions of the tool. X, Y, and Z define the three translational (Cartesian) axes of a machine. A, B and C are used for the three rotational axes about the X, Y, and Z axes.

    I, J, K: specify the center for circular motion N, G, X, Y , Z, A, B, C, I, J, K, F, S, T, R, M

  • 6.1.5 NC Words/R: specify the clearance height in canned-cycleN, G, X, Y, Z, A, B, C, I, J, K, F, S, T, R, M N0010 G81 X1.000 Y2.000 Z0.000 R1.300

    Operations in drill cycle G81 :1. Rapid to location (1,2,2).2. Rapid down to the R plane:(1,2,1.3) 3. Feed to the Z point, the bottom of the hole:(1,2,0)4. Operation at the bottom of the hole (dwelling).5. Rapid or feed to either the R plane or the initial height.

  • NC Words/

  • G codesUnit selection: G70 (inch), G71(metric)Coordinates selection: G90(absolute), G91(incremental)Working plane selection: G17(X-Y), G18(Z-X), G19(Y-Z)

  • Set up working coordinateMachine zerois unchangeable and usually is set up with the machineWorking coordinate (is decided by the offset from the machine zero)G92Be defined in programG54G59 Be defined in CRT/MDI environment, not defined in programAfter they are defined, they can be used in program.

  • Rapid traverse: G00G00: to make the machine move at maximum speed. It is used for positioning motion. G90 G00 X20.0 Y10.0G90: absolute coordinates(0,0)(10,10)(20,10)

  • Linear interpolation: G01 G01: linear interpolation at feed speed. G91 G0l X200.0 Y100.0 F200.0 G91: incremental coordinates

  • Circular interpolation: G02, G03 G02, G03: For circular interpolation, the tool destination and the circle center are programmed in one block G02 is clockwise interpolation, G03 is counterclockwise interpolationEnd pointCircle center, radius

  • Circular interpolation: G02, G03G91 G02 X60.0 Y20.0 R50.0 F300.0G91 G02 X60.0 Y20.0 R-50.0 F300.0Specify R with sign before it:180 +R>180 -R

  • Circular interpolation: G02, G03Specify Center with I, J, K

    I, J, K are the incremental distance from the start of the arc;

    Viewing the start of arc as the origin, I, J, K have positive or negative signs.

  • Circular interpolation: G02, G03 N0010 G92 X200.0 Y40.0 Z0 ; N0020 G90 G03 X140.0 Y100.0 I -60.0 F300 N0030 G02 X120. 0 Y60.0 I- 50.0Or N0010 G92 X200.0 Y40.0 Z0 N0020 G90 G03 X140.0 Y100.0 R60.0 F300 N0030 G02 X120.0 Y60.0 R50.0G90: absolute coordinatesG92:To define working coordinate

  • Circular interpolation: G02, G03Annotation for Circular InterpolationI0.0, J0.0, and K0.0 can be omitted. If X,Y,Z are all omitted in the program, that means start and end of arc are same points. N0020 G02 I20.0 (a full circle)If I, J, K, and R all appears in circular interpolation instruction, R is valid and I, J, and K are invalid

  • Return to Machine Zero: G28 G28The machine passes by the specified point, and then move to the machine zero.

    G91 G28 X_, Y_, Z_X,Y,Z are the coordinate of specified point that is saved in memory of machine.Usually this instruction is used in the beginning and end of program.G91: incremental coordinates

  • Return to the Specified point : G29G29 The machine passes from the machine zero by the point that is specified in G28, and then move to the new specified point.

    G29 X_, Y_, Z_X, Y, Z are the coordinate of new specified pointG28,G29 are usually used to change tool

  • Tool CompensationTool-Radius Compensation /Left hand G41 Right hand G42 Cancel tool-radius compensation G40Tool-Height Compensation/Positive G43 Negative G44 Cancel tool-height compensation G49

  • Tool-Radius CompensationTool-radius compensations make it possible to program directly from the drawing, and thus eliminate the tool-offset calculation

    G41 (G42) HH: the radius of tool to compensate is saved in a memory unit that is named HG41/G42 is directly related with direction of tool movement and which side of part is cut.

  • Start Tool-Radius CompensationNote the difference between two ways:

    N0010 G41 G01 X0.500 Y1.700 N0020 G01 X1.500

    N0010 G41 N0020 G01 X0.500 Y1.700 N0030 G01 X1.500Ramp on block effective from the start

  • Inside Corner in Tool-Radius CompensationWhen the cutter path determines the geometry of an inside corner, it stops at the inside cutting point N0010 G42N0030 G01 X1.500 Y2.000N0030 G01 X0.000 Y1.600

  • External curves in Tool-Radius CompensationM96: to insert circular arc at the corner by the CNC controller. M97: to insert straight lines at the corner.

  • External curves in Tool-Radius CompensationUse of M96 and M97If a step is to be cut using a cutting tool that is larger than the height of the step, M97 must be used. If M96 is used, the cutter will roll over the corner and into the material N0010 G41N0020 G01 X1.000 Y1.000N0030 G01 Y0.800 M96N0040 G01 X2.000N0010 G41N0020 G01 X1.000 Y1.000N0030 G01 Y0.800 M97N0040 G01 X2.000M96M97

  • Cancel Tool Compensation: G40 Note the difference between two waysN0060 G40 G01 X2.000 Y1.700 M02N0060 G01 X2.000 Y1.700N0070 G40 M02ramp off block effective to the end point

  • Tool-Height Compensation

    G43 (G44) H

    H: specified memory unit used to save height compensation of tool.Positive compensation (G43): real position = specified position + value saved in HNegative compensation (G44): real position = specified position - value saved in H

  • Tool-Height CompensationExample:N0010 G91 G00 X12.0 Y80.0 N0020 G44 Z-32.0 H02

    If we put 0.5mm into H02, real position = -32.0 - 0.5 = -32.5

    Cancel tool-height compensation: G49

    G91: incremental coordinates

  • M codemiscellaneous word/miscellaneous functions: turn the spindle on/offstart/stop the machineturn on/off the coolantchange the toolrewind the program (tape)

  • M codemodal groups/

    M00Program stop M06Tool changeM01Optional stopM07Flood coolant onM02End of programM08Mist coolant onM03Spindle CWM09Coolant offM04Spindle CCWM30End of tape

  • M code: M00, M01M00 and M01 both stop the machine in the middle of a program. M01 is effective only when the optional stop button on the control panel is depressed. The program can be resumed through the control panel.

  • M code: M03, M04, M05M03 turns on the spindle clockwise. M04 turns the spindle on counterclockwise. (The spindle rpm must be specified in the same line or in a previous line. ) M05 turns off the spindle.

  • M code: M07, M08, M09M07 and M08 turn on different modes of coolant. M07: flood coolant onM08: mist coolant onM09 turns off the coolant.

  • M code: M06M06 signals the tool-change operation. On a machine equipped with an automatic tool changer, it stops the spindle, retracts the spindle to the tool-change position, and then changes the tool to the one specified in the T-code.

  • M code: M02, M30M02 marks the end of the program. M30 marks the end of the tape. It stops the spindle and rewinds the program (tape)

  • ExampleA 2.0-in 2.0-in. square is to be milled using a 1/2-in. end milling cutter (end mill). Write an NC part program to make the square.

  • Example

  • 6.2 MANUAL PART PROGRAMMING/

    Example partFigure 6.10

  • 6.2 MANUAL PART PROGRAMMING/

    Setup and cutter path for example partFigure 6.11Working coordinate zero point

  • coordinates of each point (cutter location) /P1:(1.75+0.375,-0.1-0.375,4)=(2.125,-0.475,4)P1:(2.125,-0.475, 2-0.5)=(2.125,-0.474,1.5)P2:(2.125,4+0.1,1.5)=(2.125,4.1,1.5)P3:(3-0.375,4.1,1.5)=(2.625,4.1,1.5)P4:(2.625,2-1+0.375,1.5)=(2.625,1.375,1.5)P5:(3,2-1+0.375,1.5)=(3,1.375,1.5)P6:(3,2+1-0.375,1.5)=(3,2.625,1.5)P7:(3,2,1.5)P8:(3-0.375,2,1.5)=(2.625,2.0,1.5)P9:(2.625,-0.1,1.5)P9:(2.625,-0.1,4)

  • Figure 6.12 Part program for the part in Figure 6.10

    (without tool-radius compensation)

  • Figure 6.12 Part program for the part in Figure 6.10

    (with tool-radius compensation)

  • Figure 6.12 Part program for the part in Figure 6.10

    (with tool-radius compensation)

    N0010 G70 G90 T08 M06

    N0020 G00 G42 X1.75 Y-0.1 Z4.0 S3157

    N0030 G01 Z1.5 F63 M03N0040 G01 Y4.1N0050 G01 X3.0N0060 G01 Y3.0N0080 G02 Y1.0 R1.0 M96

    N0110 G01 Y-0.100 M96N0120 G00 G40 Z4.000 T02 M05

    N0130 F9.16 S509 M06N0140 G81 X0.750 Y1.000 Z-0.1 R2.100 M03N0150 G81 X0.750 Y3.000 Z-0.1 R2.100 N0160 G00 X-1.000 Y-1.000 M30Set the machine to the inch format (G70) and absolute dimension (G90) programming, change to tool T08, Rapid to PP1. radius compensation on (right hand)Down feed to PP1, spindle CW.Feed to PP2.To PP3.To PP6.Circular interpolation to PP5 with additional external curve.To PP9 Additional external curveTo PP9, radius compensation off, spindle off, tool sign 2.Tool change, set new feed and speed.Drill hole 1. CWDrill hole 2. CWMove to home position, stop the machine.

  • Figure 6.12 Part program for the part in Figure 6.10

    (with tool-radius compensation)

    N0010 G70 G90 T08 M06

    N0020 G00 G42 X1.75 Y-0.1 Z4.0 S3157N0030 G01 Z1.5 F63 M03N0040 G01 Y4.1N0050 G01 X3.0N0060 G01 Y1.0N0080 G03 Y3.0 R1.0

    N0110 G01 Y-0.100 M96N0120 G00 G40 Z4.000 T02 M05

    N0130 F9.16 S509 M06N0140 G81 X0.750 Y1.000 Z-0.1 R2.100 M03N0150 G81 X0.750 Y3.000 Z-0.1 R2.100 N0160 G00 X-1.000 Y-1.000 M30Set the machine to the inch format (G70) and absolute dimension (G90) programming, change to tool T08, radius compensation on (right hand)Rapid to P1.Down feed to P1, spindle CW.Feed to P2.To P3.To P4.Circular interpolation to P5 with additional external curve.To P9 Additional external curveTo P9, radius compensation off, spindle off, tool sign 2.Tool change, set new feed and speed.Drill hole 1. CWDrill hole 2. CWMove to home position, stop the machine.

  • 6.2 MANUAL PART PROGRAMMING/ Summary

    Adequate for many simply point-to-point processes

    Time-consuming Error correction can be cumbersome Errors made by the programmer are often not discovered until the program is tested graphically or on the machine tool

  • 6.3 COMPUTER-ASSISTED PART PROGRAMMING/Automatically Programmed ToolAPT Initially developed in 1956 at MIT

    Definition In computer-assisted part programming, general-purpose computers are used as an aid in programming, and special-purpose, high-level programming languages perform the various calculations necessary to prepare the program.

  • 6.3 COMPUTER-ASSISTED PART PROGRAMMING/

  • Example of APT program/ APT

    PARTNO LJBCL MACHINMHC432 $$INTOL/0.01 0.01TN,MILL,1,8,10 1810LOADTL/1 1CUTTER/8 8SPINDLE/800,CLW 800rpmFEDRAT/100 100mm/minCOOLNT/ON

  • Example of APT program/ APT

    $$ SETPT=POINT/0,0 SETPT(0,0)L1=LINE/XAXIS,5 L1XY5L2=LINE/YAXIS,5 L2YX5P1=POINT/5,20 P1(5,20)L3=LINE/P1,ATANGLE,(90+45) L3P1X135C1=CIRCLE/YLARGE,L1,XSMALL,L3,RADIUS,2.5 C1L1L3YX2.5

  • Example of APT program/ APT

    $$FROM/SETPT SETPTGO/TO,L1,TO,L2 L1L2TLRGT,GORGT/L1,TANTO,C1 L1C1GOFWD/C1,TANTO,L3 C1L3GOFWD/L3,PAST,L2 L3L2GOLFT/L2,PAST,L1L2L1GOTO/SETPT SETPT$$COOLNT/OFF SPINDLE/OFF FINI %PM

  • 6.3 COMPUTER-ASSISTED PART PROGRAMMING/APTAPT

  • After APT compilerN9900LJBCLN1 G90 N2 G17 XYN3 G40 N4 T1 M06 1N5 S800 M03 800rpmN6 G90 N7 G1 X1 Y1 Z0 F100 N8 X13.964 L1N9 G3 X18.561 Y12.096 I13.964 J7.5 C1N10 G1 X1 Y29.657 L3N11 Y1 L2N12 X0 Y0 N13 M9 N14 M5 N15 G0 Z150 ZN16 M30

  • 6.3 COMPUTER-ASSISTED PART PROGRAMMING/Summary

    For more complex programs

    Require the programmer to translate geometric information from one form (usually an engineering drawing) into another, which has a significant potential for errors in the process.

    Need improvement

  • 6.4 CAD PART PROGRAMMING/ CAD The modern way ----Creation of NC programs from CAD allow geometry to be described in the form of points, lines, arcs, and so on, just as it is on an engineering drawing, rather than requiring a translation to a text-oriented notation (compared with APT). Use of a graphics display terminal allows the system to display the resulting cutter-path geometry allow earlier verification of a program, which can avoid costly machine setups for program testing.

  • Several CAD/CAM systems Computervision System CADAM System CATIA System MasterCAM UG

  • 6.4 CAD PART PROGRAMMING/ CAD Procedures

  • 6.4 CAD PART PROGRAMMING/ CAD Part-programming

  • 6.4 CAD PART PROGRAMMING/ CAD rough cutting semi-finishing finishing with end mill to remove cavity

    Layer by layer/WorkWorkWorkStraight end millBall end millStraight end millAxial cutting depthAxial cutting depthAxial cutting depth

  • 6.4 CAD PART PROGRAMMING/ CAD Tool path patterns (most popular)direction-parallel millingcontour-parallel milling

  • 6.4 CAD PART PROGRAMMING/ CAD Applications(Zig-Zag) Contour Line

  • 6.4 CAD PART PROGRAMMING/ CAD Tool path patterns (advanced) (extra spiral at corners)Plunge into part)

  • 6.4 CAD PART PROGRAMMING/ CAD Tool path patterns (advanced)

    Same roughness

  • 6.4 CAD PART PROGRAMMING/ CAD Part-programming

  • 6.4 CAD PART PROGRAMMING/ CAD Part-programming

  • 6.4 CAD PART PROGRAMMING/ CAD Part-programming

  • 6.4 CAD PART PROGRAMMING/ CAD Approach/Engage/Entry

    Departure/Retract/Exit

  • 6.4 CAD PART PROGRAMMING/ CAD Part-programming

  • 6.5 TOOL-PATH VERIFICATION/ Purposes/ to detect geometric error of the cutter pathto detect potential tool interferenceto detect incorrect cutting conditions

  • 6.5 TOOL-PATH VERIFICATION/ /Overcut and undercut

    potential problems in sculptured surface machining

  • 6.5 TOOL-PATH VERIFICATION/ Ways to verify a part program/

    To make a dry cut on the machine without the workpiece to actually machine a prototype in wax, plastic, wood, foam, or some other soft material.

    In a CAD-based system, cutter-path abnormalities can be detected by visual inspectioni.e. the display of an animation sequence that shows the tool moving along its generated path which is superimposed on the part geometry.

  • 6.5 TOOL-PATH VERIFICATION/

  • 6.5 TOOL-PATH VERIFICATION/ Almost most of the cutter-path-generation packages are based on the wire-frame model.There is no way of detecting interference between the tool and the part and the fixture

    Some systems have begun to use solid models directly The entire machining environment, including stock, part volume, tools, and fixtures, can be modeled and used to generate a collision-free cutter path.

  • ReviewCoordinate systemsTypical NC wordsThree types of part programmingManual/APT/CADPotential problems in sculptured surface machining

  • Homework6.26.36.4

    Thumbindex fingermiddle [long] finger ring fingerwedding ringlittle [small] fingerTraverse Circular, dwell, acceleration, deceleration, metric format,traverseMDI: Multi-Document InterfacecorrespondinglyVise jawretractCAMCAMR ,,,Curvature:.,