Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

cnc machining

Cnc machining course from IIT Madras.

  • Be the first to comment

cnc machining

  1. 1. M3480 CNC MACHINING
  2. 2. ME 3480 CNC Machining (Self-Study) Basic components of CNC machining system- Machine Control Unit, Part Programming methods, machine tools, automatic tool changing systems, automatic work holding systems, interpolators ( Mid sem portion) Sequential controllers-manual part programming and machining of rotational and prismatic components with two and three axes MNC machine tools- Tools presetting and work setting procedures- Computer assisted part programming- Complex surface machining- Tool path generation for rough and finish machining of complex surfaces- Quality aspects in CNC machining of different surfaces. References: 1. Yoram Koren, Computer control of manufacturing systems, McGraw Hill, New York 1983 2. James Madison, CNC Machining Handbook, Industrial Press, New York, 1996.
  3. 3. Numerical Control (NC) Defined Programmable automation in which the mechanical actions of a ‘machine tool’ are controlled by a program containing coded alphanumeric data that represents relative positions between a work head (e.g., cutting tool) and a work part Machine Control Unit Power Program Instructions Transformation Process
  4. 4. NC Coordinate Systems For flat and prismatic (block-like) parts: • Milling and drilling operations • Conventional Cartesian coordinate system • Rotational axes about each linear axis For rotational parts: • Turning operations • Only x- and z-axes
  5. 5. Motion Control Systems Point-to-Point systems • Also called position systems • System moves to a location and performs an operation at that location (e.g., drilling) • Also applicable in robotics Continuous path systems • Also called contouring systems in machining • System performs an operation during movement (e.g., milling and turning)
  6. 6. Interpolation Methods 1. Linear interpolation – Straight line between two points in space 2. Circular interpolation – Circular arc defined by starting point, end point, center or radius, and direction 3. Helical interpolation – Circular plus linear motion 4. Parabolic and cubic interpolation – Free form curves using higher order equations
  7. 7. Absolute vs. Incremental Positioning Absolute positioning Move is: x = 40, y = 50 Incremental positioning Move is: x = 20, y = 30.
  8. 8. • Computer Numerical Control machining is a subtractive method • Mostly 5 axes of control at most, 3 axes of control • Tolerance limits are determined by accuracy of x-y tables • CNC has the highest relative tolerances of any manufacturing method CNC Overview
  9. 9. Computer Numerical Control • Numerical control is a method of automatically operating a manufacturing machine based on a code of letters, numbers, and special characters. • The numerical data required to produce a part is provided to a machine in the form of a program, called part program or CNC program. • The program is translated into the appropriate electrical signals for input to motors that run the machine.
  10. 10.  Increase production throughput  Improve the quality and accuracy of manufactured parts  Stabilize manufacturing costs  Manufacture complex or otherwise impossible jobs - 2D and 3D contours Why Use CNC Machines?
  11. 11. Advantages of CNC • Flexibility of operation is improved, as is the ability to • Produce complex shapes with good dimensional accuracy, • Repeatability, reduced scrap loss, and high production rates, • Tooling costs are reduced, since templates and other fixtures are not required. • Machine adjustments are easy to make with microcomputers • More operations can be performed with each setup, and less • lead time for setup and machining is required compared to • conventional methods. Design changes are facilitated, and • inventory is reduced.
  12. 12. Computer Numerical Control (CNC) • Storage of more than one part program • Various forms of program input • Program editing at the machine tool • Fixed cycles and programming subroutines • Interpolation • Acceleration and deceleration computations • Communications interface • Diagnostics
  13. 13. Machine Control Unit
  14. 14. DNC • Direct numerical control (DNC) – control of multiple machine tools by a single (mainframe) computer through direct connection and in real time – 1960s technology – Two way communication • Distributed numerical control (DNC) – network consisting of central computer connected to machine tool MCUs, which are CNC – Present technology – Two way communication
  15. 15. Distributed Numerical Control Machine Control Unit Transformatio n Process Machine Control Unit Machine Control Unit Central Computer NC Pgms BTR BTR BTR Computer Network
  16. 16. Cost-Benefits of NC Costs • High investment cost • High maintenance effort • Need for skilled programmers • High utilization required Benefits • Cycle time reduction • Nonproductive time reduction • Greater accuracy and repeatability • Lower scrap rates • Reduced parts inventory and floor space • Operator skill-level reduced
  17. 17. Precision
  18. 18. CNCs comprises: CNC unit, feed motion servo subsystem, spindle servo subsystem and some auxiliary control cells. Operation panel I/O Devices CNC Control Unit PLC Keyboard Spindle servo cell Machine tool I/O circuits and devices Spindle driver Feed motion servo cells Detect device Feed drivers Machine tool
  19. 19. Functions and features of CNC Controlling function Number of control axes and synchronously control axes: linear axes and rotate axes, basic axes and auxiliary axes.(The more the number of controlled axes,especially the number of axes being controlled synchronously,the more powerful functions of the CNC unit, and the more complex structure of the CNC unit,the more difficulty of programming.) Preparatory function G function, describes the motion modes of CNC machine The motion modes comprise instructions of basic motionsdwell plane selections, coordinate system settings,tool compensations, reference point return fixed operation circles,and metric/inch unit transfer,etc.
  20. 20. Interpolation function interpolation by using software real-time calculations. Linear interpolation,circular interpolation,helical interpolation, and polar coordinate interpolation Feed function Feed rate designation (machining centers only allow the feed rate to be specific in per-minute format: inches or millimeters per minute; Turning centers,which have position encoders in their spindles,also allow feed rate to be specified in per-revolution format: inches or millimeters per revolution) Feed Rate Override: multiple position switch on control panel allows the operator to change the programmed feed rate during cutting (The switch is usually segmented in 10 percent increments that range from 0 percent through 200 percent ) Functions and features of CNC
  21. 21. Rapid motion to minimize non-productive time during the machining cycle ↑ to command motion at the machine’s fastest possible rate. • Common uses for rapid motion: non-cutting motion | include : positioning the tool to and from cutting positions, moving to clear clamps and other obstructions
  22. 22. Spindle function specify the spindle speed On operation panel,there is a button to turn the spindle on and off,as well as a rheostat to control spindle speed. Miscellaneous function allow a variety of special functions Miscellaneous functions are typically used as programmable switches ∣ (spindle on/off,coolant on/off,and so on)
  23. 23. Compensation function allow the CNC user to allow for unpredictable conditions related to tooling Tool length compensation,cutter radius compensation, and tool nose radius compensation→ enable the CNC machine to adjust cutting tool to zero in the right position when wear occurs on cutter tool or changing of cutting tool Technical parameters compensation, ( fixture offset, NRZ(Non-return-to-Zero) of axis while counter-moving, distortion of machine tool any unpredictable situations during programming ∣ a form of compensation to deal with the problem
  24. 24. Enhanced function graphic display function CRT or LCD displayer: show programs,parameters,various compensation data,coordinates, fault information, part graphs; monitor dynamic cutter tool paths while machining Self-diagnosis function various diagnosis programs : prevent faults occurring or going worse to shorten the time of broken-down Communication function RS-232-C communications (serial) port←→ personal computers Some form of communications software →allow transmissions
  25. 25. Programming function Manual programming, all CNC programmers should have a good understanding of manual programming techniques regardless of whether or not they are used. conversational (shop-floor) programming, created using graphic and menu-driven functions visual check and CAM system programming helps the programmer in three major areas: keeps the programmer from having to do math calculations, makes easy to program different kinds of machines with the same basic language, helps with certain basic machining practice functions
  26. 26. Functional interface between hardware and software in CNC unit CNC unit : hardware + software ↓ work together to perform all functions of CNC unit different characters: Hardware→ higher speed ,more expensive; software → flexible ,slow on processing → proportion between hardware and software is determined by cost-performance of the CNC unit (In the earlier NC equipments,all functions were implemented by hardware; computer was introduced into CNC system) ↓ participations of computer different in different CNC units in different time
  27. 27. four different functional interfaces between hardware and software: Program Input Interpolation Position Pretreatment Speedcontrol Servomotor Detector Hardware Software Hardware Hardware Hardware Software Software 1 2 3 4 Software Hardware
  28. 28. Holononic CNC lath system of this architecture modules can be connected together by industry standard bus: IPC (Industry PC) bus or STD bus
  29. 29. Open Loop vs. Closed Loop controls
  30. 30. Components of Servo-motor controlled CNC Motor speed control Two types of encoder configurations Motor lead screw rotation table moves position sensed by encoderfeedback
  31. 31. Motion Control and feedback Encoder outputs: electrical pulses (e.g. 500 pulses per revolution) Rotation of the motor  linear motion of the table: by the leadscrew The pitch of the leadscrew: horizontal distance between successive threads One thread in a screw  single start screw: Dist moved in 1 rev = pitch Two threads in screw  double start screw: Dist moved in 1 rev = 2* pitch
  32. 32. Example 1 A Stepping motor of 20 steps per revolution moves a machine table through a leadscrew of 0.2 mm pitch. (a) What is the BLU of the system ? (b) If the motor receives 2000 pulses per minute, what is the linear velocity in inch/min ?
  33. 33. Example 2 A DC servo-motor is coupled to a leadscrew (pitch 5mm) of a machine table. A digital encoder, which emits 500 pulses per revolution, is mounted on the leadscrew. If the motor rotates at 600 rpm, find (a) The linear velocity of the table (b) The BLU of the machine (c) The frequency of pulses emitted by the encoder.
  34. 34. Types of CNC machines Based on Motion Type: Point-to-Point or Continuous path Based on Control Loops: Open loop or Closed loop Based on Power Supply: Electric or Hydraulic or Pneumatic Based on Positioning System Incremental or Absolute
  35. 35. Open Loop vs. Closed Loop controls
  36. 36. Components of Servo-motor controlled CNC Motor speed control Two types of encoder configurations Motor lead screw rotation table moves position sensed by encoderfeedback
  37. 37. Motion Control and feedback Encoder outputs: electrical pulses (e.g. 500 pulses per revolution) Rotation of the motor  linear motion of the table: by the leadscrew The pitch of the leadscrew: horizontal distance between successive threads One thread in a screw  single start screw: Dist moved in 1 rev = pitch Two threads in screw  double start screw: Dist moved in 1 rev = 2* pitch
  38. 38. Example 1 A Stepping motor of 20 steps per revolution moves a machine table through a leadscrew of 0.2 mm pitch. (a) What is the BLU of the system ? (b) If the motor receives 2000 pulses per minute, what is the linear velocity in inch/min ?
  39. 39. Example 2 A DC servo-motor is coupled to a leadscrew (pitch 5mm) of a machine table. A digital encoder, which emits 500 pulses per revolution, is mounted on the leadscrew. If the motor rotates at 600 rpm, find (a) The linear velocity of the table (b) The BLU of the machine (c) The frequency of pulses emitted by the encoder.
  40. 40. Source : Dr.Dimiritis moutrzis
  41. 41. Source : Dr.Dimiritis moutrzis
  42. 42. Source : Dr.Dimiritis moutrzis
  43. 43. Source : Dr.Dimiritis moutrzis
  44. 44. Source : Dr.Dimiritis moutrzis
  45. 45. Source : Dr.Dimiritis moutrzis
  46. 46. Source : Dr.Dimiritis moutrzis
  47. 47. Source : Dr.Dimiritis moutrzis
  48. 48. Source : Dr.Dimiritis moutrzis
  49. 49. Source : Dr.Dimiritis moutrzis
  50. 50. Source : Dr.Dimiritis moutrzis
  51. 51. Source : Dr.Dimiritis moutrzis
  52. 52. Source : Dr.Dimiritis moutrzis
  53. 53. Source : Dr.Dimiritis moutrzis
  54. 54. Source : Dr.Dimiritis moutrzis
  55. 55. Source : Dr.Dimiritis moutrzis
  56. 56. CNC WORK HOLDING DEVICES With the advent of CNC technology, machining cycle times were drastically reduced and the desire to combine greater accuracy with higher productivity has led to the reappraisal of work holding technology. Loading or unloading of the work will be the non-productive time which needs to be minimized. So the work is usually loaded on a special work holder away from the machine and then transferred it to the machine table. The work should be located precisely and secured properly and should be well supported. Turning center work holding methods Machining operations on turning centers or CNC lathes are carried out mostly for axi-symmetrical components. Surfaces are generated by the simultaneous motions of X and Z axes. For any work holding device used on a turning centre there is a direct "trade off" between part accuracy and the flexibility of work holding device used.
  57. 57. WORK HOLDING DEVICES
  58. 58. Work holding methods Advantages Disadvantages Automatic Jaw & chuck changing Adaptable for a range of work-piece shapes and sizes High cost of jaw/chuck changing automation. Resulting in a more complex & higher cost machine tool Indexing chucks Figure 28.1 Very quick loading and unloading of the workpiece can be achieved. Reasonable range of work piece sizes can be loaded automatically Expensive optional equipment. Bar-feeders cannot be incorporated. Short/medium length parts only can be incorporated. Heavy chucks. Pneumatic/Magnetic chucks Figure 28.3 Simple in design and relatively inexpensive. Part automation is possible. No part distortion is caused due to clamping force Limited to a range of flat parts with little overhang. Bar-feeders cannot be incorporated. Parts on magnetic chucks must be ferrous. Heavy cuts must be avoided. Automatic Chucks with soft jaws Adaptable to automation. Heavy cuts can be taken. Individual parts can be small or large in diameter Jaws must be changed manually & bared, so slow part change-overs. A range of jaw blanks required. Expanding mandrels & collets Figure 28.2 Long & short parts of reasonably large size accommodated. Automation can be incorporated. Clamping forces do not distort part. Simple in design Limitation on part shape. Heavy cuts should be avoided. Dedicated Chucks Excellent restraint & location of a wide range of individual & irregular - shaped parts can be obtained. Expensive & can only be financially justified with either large runs or when extremely complex & accurate parts are required. Tool making facilities required. Large storage space. WORK HOLDING DEVICES
  59. 59. WORK HOLDING DEVICES FOR MACHINING CENTER
  60. 60. VISE Magnetic chucks Indexing chucks Pallets Mandrels WORK HOLDING DEVICES
  61. 61. Modular Fixturing
  62. 62. Work holding methods Advantages Disadvantages Modular Fixtures Highly adaptable. Can be purchased in stages to increase its sophistication. Reasonable accuracy. Speedily assembled. Small stores area is required. Can be set-up to a machine more than one part. Proven technology Costly for a complete system. Difficult to automate. Skills required in kit assembly Automatic Vices Relatively inexpensive. Can be operated by mechanical, pneumatic, or by hydraulic control. Quick to operate with ease of set-up. Reasonable accuracy. Easily automated. Simplicity of design. Using multi-vices allows many parts to be machined. Proven Technology Work holding limitations. Clamping force limitations. Jaws can become strained. Work location problems. Limitations on part size. Pneumatic/Magnetic Work holding devices Relatively inexpensive. Reasonable accuracy. Can machine large areas of the work piece. Quick setups. Easily automated. Simplicity of design. Many parts can be machined at one set up. Large surface area is required. Swarf can be a problem. Nonferrous material limitation on magnetic devices. 4/5 axis CNC work holding devices Allows complex geometric shapes to be machined. High accuracy. Opportunity for "one hit" machining. Easily automated. Costly & limited part geometry clamping. Part size limitations. Usually only one part can be machined. Cannot be fitted to all machines. Dedicated Fixturing Large & small parts are easily accommodated. High accuracy of part location. Easily automated. Simplicity of design. Proven technology. Many parts can be machine at one setup good vibration damping capacity Large storage space required. No part flexibility. Heavy fixtures. Tool making facilities required. Work holding devices for Machining center
  63. 63. • Program – A program is a set of instructions or commands given to a computer. • Part program – A program that is used for machining a part. – Program consists of • Dimensional data - the size and shape of the component • Technological data – Sequence of operations, Cutting speed, feed rate etc. • Miscellaneous data – Coolant ON / OFF, Spindle ON / OFF, Tool CLAMP /UNCLAMP etc. Part Programming
  64. 64. Axis and Motion Nomenclature Machine coordinate system? • The direction of each finger represents the positive direction of motion. • The axis of the main spindle is always Z, and the positive direction is into the spindle. • On a mill the longest travel slide is designated the X axis and is always perpendicular to the Z axis. • If you rotate your hand looking into your middle finger, the forefinger represents the Y axis. • The base of your fingers is the start point or (X0, Y0, Z0).
  65. 65. Axis and Motion Nomenclature Rotary Motion • The right-hand rule for determining the correct axis on a CNC machine may also be used to determine the clockwise rotary motion about X, Y, and Z. • To determine the positive, or clockwise, direction about an axis, close your hand with the thumb pointing out. - The thumb may represent the X, Y, or Z direction and the curl of the fingers may represent the clockwise, or positive, rotation about each axis. - These are known as A, B, and C and represent the rotary motions about X, Y, and Z, respectively.
  66. 66. Axis and Motion Nomenclature 1. CNC Mill 2. Vertical CNC Knee Mill 3. CNC Lathe 4. Five Axis CNC contour Mill
  67. 67. CNC Milling Fundamentals Three Cartesian Planes • The three planes in the Cartesian coordinate system are XY, XZ, and YZ. • These are referred to as G17, G18, and G19, respectively, on the mill.
  68. 68. The Part Reference Zero (PRZ) • There are two reference points on a CNC Machine: Machine Reference Zero (MRZ) and the Part Reference Zero (PRZ). All coordinates are based on these two points. - All CNC machine tools require a reference point from which to base coordinates. - It is generally easier to use a point on the workpiece itself for reference, because the coordinates apply to the part anyway – thus the PRZ designation - The PRZ is defined as the lower left-hand corner and the top of the stock of each part CNC Milling Fundamentals
  69. 69. The Part Reference Zero (PRZ) • The advantages of having the PRZ at the lower left top corner are: - Geometry creation is in the positive XY plane for CAD/CAM systems - The corner of the workpiece is easy to find. - All negative Z depths are below the surface of the workpiece. CNC Milling Fundamentals
  70. 70. The Cartesian Graph • Cartesian coordinates were invented by René Descartes, who is famous for the phrase "I think, therefore I am." • Most Cartesian graphs for milling and turning use a three-axis coordinate system, denoted by the X, Y, and Z axes. • These coordinates are used to instruct the machine tool where to move on the workpiece CNC Milling Fundamentals
  71. 71. CNC Milling Fundamentals Absolute Coordinates • Absolute coordinates use the origin as the reference point. • This means that any point on the Cartesian graph can be plotted accurately by measuring the distance from the origin to the point • First in the X direction, then in the Y direction, and then, if applicable, in the Z direction.
  72. 72. Incremental Coordinates • Incremental coordinates use the present position as the reference point for the next movement. • This means that any point in the Cartesian graph can be plotted accurately by measuring the distance between points, generally starting at the origin. CNC Milling Fundamentals
  73. 73. CNC Milling Fundamentals Cartesian Coordinates
  74. 74. CNC Milling Fundamentals Absolute Coordinates – Exercise 1 Fill in the X and Y blanks with the appropriate absolute coordinates for points A through H.
  75. 75. CNC Milling Fundamentals Incremental Coordinates – Exercise 2 Fill in the X and Y blanks with the appropriate incremental coordinates for points A through H.
  76. 76. CNC Turning Fundamentals Axis Coordinate System • CNC lathes share the same two-axis coordinate system. • This allows for the transfer of CNC programs among different machines, as all measurements are derived from the same reference points. • In CNC turning there is a primary, or horizontal, axis and a secondary, or vertical, axis. Because the major axis always runs through the spindle(horizontally), the Z axis is usually the longer one. The X axis is perpendicular to the Z axis (or vertical). • It is important to remember that on most CNC lathes the tool post is on the top, or backside, of the machine, unlike on a conventional lathe.
  77. 77. CNC Turning Fundamentals Cartesian Graph for Turning •When measuring X and Z coordinates, use a central reference point. • Start all measurements at this reference point, the origin point (X0, Z0). • For all our examples the origin is located at the center right-hand endpoint of the workpiece. • Keep in mind that at times the center left-hand endpoint of the workpiece may be used
  78. 78. CNC Turning Fundamentals Diameter Programming •Diameter (or diametrical) programming relates the X axis to the diameter of the workpiece. • For example, if the workpiece has a 5-in outside diameter and you want to command an absolute move to the outside, you would program X5.0
  79. 79. CNC Turning Fundamentals Radial Programming • Radius (or radial) programming relates the X axis to the radius of the workpiece. • For example, for the same 5-in. outside diameter workpiece, you would program X2.5 to move the tool to the outside.
  80. 80. CNC Turning Fundamentals Absolute Coordinates • When plotting points using absolute coordinates, always start at the origin (X0, Z0). • Then travel along the Z axis until you reach a point directly below the point that you are trying to plot. • Write down the Z value and then go up until you reach your point. • Write down the X value. You now have the XZ (or ZX) coordinate for that point.
  81. 81. CNC Turning Fundamentals Incremental Coordinates • The second method for finding points in a Cartesian coordinate system is by using incremental coordinates. • Incremental, or relative, coordinates use each successive point to measure the next coordinate. • Instead of constantly referring back to the origin, the incremental method refers to the previous point
  82. 82. Incremental Coordinates – Exercise 3 Using Incremental Coordinates. Find the diametrical X and Z coordinates for points A through E. CNC Turning Fundamentals
  83. 83. Absolute Coordinates – Exercise 4 Using Absolute Coordinates. Find the diametrical X and Z coordinates for points A through E. CNC Turning Fundamentals
  84. 84. Letter Codes • 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 CNC Program Codes
  85. 85. CNC Program Codes Letter Codes – G Codes
  86. 86. Letter Codes – G & M Codes • 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) CNC Program Codes
  87. 87. Letter Codes – M Codes CNC Program Codes
  88. 88. CNC Program Codes Tool Motion Codes • Generally, three types of tool motion are used on a CNC machine: G00 Rapid tool move. Non-machining command. Each axis trajectory is exhausted as fast as the motor can drive the axes. G01 Straight-line feed move. Linear interpolation. Coordinated moves at a controlled feedrate G02/G03 Two-dimensional arc feed moves. Circular interpolation.
  89. 89. Letter Codes – N Codes • N-codes: Gives an identifying number for each block of information. • It is generally good practice to increment each block number by 5 or 10 to allow additional blocks to be inserted if future changes are required. CNC Program Codes
  90. 90. CNC Program Codes Letter Codes – X Y & Z Codes • X, Y, and Z codes are used to specify the coordinate axis. • Number following the code defines the coordinate at the end of the move relative to an incremental or absolute reference point. • The number may require that a specific format be used (i.e. 3.4 means three numbers before the decimal and four numbers after the decimal).
  91. 91. CNC Program Codes Letter Codes – I J & K Codes • I, J, and K Codes are used to specify the coordinate axis when defining the centre of a circle. • Number following the code defines the coordinate at the end of the move relative to an incremental or absolute reference point. • The number may require that a specific format be used (i.e. 3.4 means three numbers before the decimal and four numbers after the decimal).
  92. 92. CNC Program Codes Letter Codes – F S & T Codes • F-Code: used to specify the feedrate • S-Code: used to specify the spindle speed • T-Code: used to specify the tool identification number associated with the tool to be used in subsequent operations.
  93. 93. Letter Codes – R & P Codes • R-Code: - Retract distance when used with G81, 82, and 83. - Radius when used with G02 and G03. • P-Code: Used to specify the dwell time associated with G04. CNC Program Codes
  94. 94. CNC Program Codes Modal G Codes • Most G Codes set the machine in a mode which stays in effect until it is changed or cancelled by another G Code • These commands are called modal • In the example, G00 and G01 are modal
  95. 95. CNC Program Codes Modal G Codes
  96. 96. Format: N_ G02 X_ Y_ Z_ I_ J_ K_ F_ N_ G02 X_ Y_ Z_ R_ F_ G02 Circular Interpolation CW •Circular Interpolation is more commonly known as radial (or arc) feed moves. • The G02 command is specifically used for all clockwise radial feed moves, whether they are quadratic arcs, partial arcs, or complete circles, as long as they lie in any one plane. • The G02 command is modal and is subject to a user-definable feed rate. CNC Milling Programming
  97. 97. G02 Circular Interpolation CW CNC Milling Programming •The G02 command requires an endpoint and a radius in order to cut the arc. • The start point of this arc is (X1,Y4) and the endpoint is (X4,Y1). • To find the radius, simply measure the incremental distance from the start point to the center point. • This radius is written in terms of the X and Y distances. • To avoid confusion, these values are assigned variables, called I and J, respectively.
  98. 98. G02 Circular Interpolation CW CNC Milling Programming EXAMPLE: G02 X2 Y1 I0 J-1 • The G02 command requires an endpoint and a radius in order to cut the arc. • The start point of this arc is (X1, Y2) and the end-point is (X2, Y1). • To find the radius, simply measure the relative, (or incremental), distance from the start point to the center point. • This radius is written in terms of the X and Y distances. • To avoid confusion, these values are assigned variables called I and J, respectively.
  99. 99. G02 Circular Interpolation CW EXAMPLE: G02 X2 Y1 R1 • You can also specify G02 by entering the X and Y endpoints and then R for the radius. Note: The use of an R value for the radius of an arc is limited to a maximum movement of 90°. • To find I , calculate difference b/w arc start point and center point in the X direction. In this case, both X values are 1, so the I value is 0. • To find J value, calculate difference b/w arc start point and center point in Y direction. In this case, the difference between Y2 and Y1 is down 1 inch, so the J value is –1. CNC Milling Programming
  100. 100. G02 Circular Interpolation Clockwise Sample Program (G02): Workpiece Size: X4, Y3, Z1 Tool: Tool #2, 1/4" Slot Drill Tool Start Position: X0, Y0, Z1 % :1003 N5 G90 G20 N10 M06 T2 N15 M03 S1200 N20 G00 X1 Y1 N25 Z0.1 N30 G01 Z-0.1 F5 N35 G02 X2 Y2 I1 J0 F20 (Arc feed CW, radius I1,J0 at 20 ipm) N40 G01 X3.5 N45 G02 X3 Y0.5 R2 (Arc feed CW, radius 2) N50 X1 Y1 R2 (Arc feed CW, radius 2) N55 G00 Z0.1 N60 X2 Y1.5 N65 G01 Z-0.25 N70 G02 X2 Y1.5 I0.25 J-0.25 (Full circle arc feed move CW) N75 G00 Z1 N80 X0 Y0 N85 M05 N90 M30 CNC Milling Programming
  101. 101. G03 Circular Interpolation Clockwise Format: N_ G03 X_ Y_ Z_ I_ J_ K_ F_or N_ G03 X_ Y_ Z_ R_ F_ •The G03 command is used for all counter clockwise radial feed moves, whether they are quadratic arcs, partial arcs, or complete circles, as long as they lie in any one plane. • The G03 command is modal and is subject to a user-definable feed rate CNC Milling Programming
  102. 102. G02 Circular Interpolation Clockwise EXAMPLE: G03 X1 Y1 I0 J-1 •The G03 command requires an endpoint and a radius in order to cut the arc. • The start point of this arc is (X2, Y2) and the end-point is (X1, Y1). • To find the radius, simply measure the incremental distance from the start point to the center point of the arc. • This radius is written in terms of the X and Y distances. • To avoid confusion, these values are assigned variables called I and J, respectively. CNC Milling Programming
  103. 103. G02 Circular Interpolation Clockwise EXAMPLE: G02 X2 Y1 R1 • You can also specify G02 by entering the X and Y endpoints and then R for the radius. Note: The use of an R value for the radius of an arc is limited to a maximum movement of 90°. • To find I value, calculate difference b/w the arc start point and center point in the X direction. In this case, both X values are 2 so the I value is 0. • To find J value, calculate difference b/w the arc start point and center point in the Y direction. In this case, the difference between Y2 and Y1 is down 1 inch, so the J value is –1. CNC Milling Programming
  104. 104. G03 Circular Interpolation Clockwise •The G03 command requires an endpoint and a radius in order to cut the arc. • The start point of this arc is (X4,Y1) and the endpoint is(X1,Y4). • To find the radius, simply measure the incremental distance from the start point to the center point. • This radius is written in terms of the X and Y distances. • To avoid confusion, these values are assigned variables I and J, respectively. CNC Milling Programming
  105. 105. G03 Circular Interpolation Clockwise Sample Program (G03). Workpiece Size: X4, Y4, Z0.25 Tool: Tool #2, 1/4" Slot Drill Tool Start Position: X0, Y0, Z1 % :1004 N5 G90 G20 N10 M06 T2 N15 M03 S1200 N20 G00 X2 Y0.5 N25 Z0.125 N30 G01 Z-0.125 F5 N35 X3 F15 N40 G03 X3.5 Y1 R0.5 (G03 arc using R value) N45 G01 Y3 N50 G03 X3 Y3.5 I-0.5 J0 (G03 arc using I and J) N55 G01 X2 N60 G03 X2 Y1.5 I0 J-1 (180° arc using I and J) N65 G01 Y0.5 N70 G00 Z0.1 N75 X1.5 Y2.5 N80 G01 Z-0.25 F5 N85 G03 X1.5 Y2.5 I0.5 J0 (Full circle using I and J) N90 G00 Z1 N95 X0 Y0 N100 M05 N105 M30 CNC Milling Programming
  106. 106. G02/G03 Circular Interpolation • Command Format with IJK Method (GI7) G02 (or G03) Xx Yy li Ji Ff on XY-plane (G18) G02 (or G03) Xx Zz li Kk Ff on ZX-plane (G19) G02 (or G03) Yy Zz Jj Kk Ff on YZ-plane • Command Format with R Method (GI7) G02 (or G03) Xx Yy Rr Ff on XY-plane (G18) G02 (or G03) Xx Zz Rr Ff on ZX-plane (G19) G02 (or G03) Yy Zz Rr Ff on YZ-plane CNC Milling Programming
  107. 107. G17 = XY plane G18 = XZ plane G19 = YZ plane G02/G03 Circular Interpolation CNC Milling Programming
  108. 108. CNC Milling Programming
  109. 109. G28 Automatic Return to Reference Format: N_ G28 X_ Y_ Z_ •The G28 command is primarily used before automatic tool changing. • It allows the existing tool to be positioned to the predefined reference point automatically via an intermediate position. • This ensures that when the tool changer is engaged, it is properly aligned with the spindle head. NOTE: When this command is being used, it is advisable for safety reasons to cancel any tool offset or cutter compensation. CNC Milling Programming
  110. 110. G29 Automatic Return from Reference Format: N_ G29 X_ Y_ Z_ •The G29 command can be used immediately after an automatic tool change. • It allows the new tool to be returned from the predefined reference point to the specified point via an intermediate point specified by the previous G28 command. NOTE: When this command is being used, it is advisable for safety reasons to cancel any tool offset or cutter compensation. CNC Milling Programming
  111. 111. G54-G59 Workpiece Coordinate System Format: N_ G54 Through G59 •The G54 – G59 commands are used to reposition the origin per a user- defined working coordinate system. • In CNCs six register sets in the controller hold the values for the working coordinate systems. • The G54 – G59 commands are very useful when multiple workpiece fixtures are used. • On real CNC controllers these values are held in parameter fields which are normally set in the parameters entry screen of the controller. CNC Milling Programming
  112. 112. G92 Repositioning Origin Point Format: N_ G92 X_ Y_ Z_ •The G92 command is used to reposition the origin point. • The origin point is not a physical spot on the machine tool, but rather a reference point to which the coordinates relate. • Generally, the origin point is located at a prominent point or object (for example, front top left corner of the part) so that it is easier to measure from. CNC Milling Programming
  113. 113. G02 Circular Interpolation (CW) Format: N_ G02 X_ Z_ I_ K_ F_ N_ G02 X_ Z_ R_ F_ • G02 command executes all circular or radial cuts in a clockwise motion. • It is specified by the G02 command, followed by the endpoint for the move, the radius (the distance from startpoint to the centerpoint), and a feedrate. • 3 requirements for cutting arcs are: - The endpoint. - The radius R or I for X and K for Z values that represent the incremental distance from the startpoint to the centerpoint. The R value is limited to a maximum of 90°. - The feedrate. CNC Lathe Programming
  114. 114. G02 Circular Interpolation (CW) Format: N_ G02 X_ Z_ I_ K_ F_ N_ G02 X_ Z_ R_ F_ EXAMPLE: N05 G01 X2 Z-1 F0.012 N10 G02 X0 Z0 I-1 K0 or N10 G02 X0 Z0 R0.5 CNC Lathe Programming
  115. 115. G02 Circular Interpolation (CW) Sample Program G02 Work piece Size: Length 4", Diameter 2" Tool: Tool #2, Right-hand Facing Tool Tool Start Position: X2, Z3 % :1002 N5 G20 G40 N10 T0202 N15 M03 N20 G00 X1.7 N22 Z0.1 M08 N25 G01 Z-0.5 F0.012 N30 G00 X2 N35 Z0.1 N40 X1.4 N45 G01 Z-0.25 N50 G00 X2.1 N55 Z-1 N60 G01 X2.0 N65 G02 X0 Z0 I-1.0 K0 (90° CW arc feed move) N70 G00 X2.1 N75 Z-1.0 N80 G01 X2.0 N85 G02 X2.0 Z-2 I0.5 K-0.5 (Partial CW arc feed move) N90 G00 X4.0 Z3.0 M09 N95 T0200 M05 N100 M30 CNC Lathe Programming
  116. 116. G03 Circular Interpolation (CCW) Format: N_ G03 X_ Z_ I_ K_ F_ N_ G03 X_ Z_ R_ F_ •G03 command executes all radial cuts in a counter clockwise motion. • It is specified by the G03 command, followed by the endpoint for the move, the radius (the distance from the startpoint to the center point), and a feed rate. • The radius is specified by defining the incremental distance from the arc’s start-point to its center-point in both the X and Z directions. These values are identified by I and K variables, respectively. The R word, the value of the radius of the arc, can also be used. CNC Lathe Programming
  117. 117. G03 Circular Interpolation (CCW) Format: N_ G03 X_ Z_ I_ K_ F_ N_ G03 X_ Z_ R_ F_ EXAMPLE: N10 G01 X0 Z0 F0.012 N15 G03 X2.0 Z-1.0 I0 K-1.0 In this example, the tool cuts a counterclockwise arc from its present position to (X2, Z–1) at a feedrate of 0.012 ipr CNC Lathe Programming
  118. 118. G03 Circular Interpolation (CCW) Sample Program G03: Workpiece Size: Length 4", Diameter 2" Tool: Tool #2, Right-hand Facing Tool Tool Start Position: X2, Z3 % :1003 N5 G20 G40 N10 T0202 N15 M03 N20 G00 X1.7 N22 Z0.1 M08 N25 G01 Z-0.5 F0.012 N30 G00 X2.0 N35 Z0.1 N40 X1.4 N45 G01 Z-0.25 N50 G00 X1.5 N55 Z0.1 N60 X0 N65 G01 Z0 N70 G03 X2.0 Z-1.0 I0 K-1.0 (90° CCW arc feed move) N75 G01 Z-2.0 N80 G03 X2.0 Z-1.0 I0.5 K0.5 (Partial CCW arc feed move) N85 G00 X4.0 Z3.0 M09 N90 T0200 M05 N95 M30 CNC Lathe Programming
  119. 119. G28 Automatic Return to Reference Point Format: N_ G28 X_ Z_ •The G28 command is commonly used prior to an automatic tool change. • It allows the existing tool to be positioned to the predefined reference point automatically via an intermediate position. • This ensures that when the tool turret is engaged, it is properly aligned and clears the work piece. CNC Lathe Programming
  120. 120. G28 Automatic Return to Reference Point Format: N_ G28 X_ Z_ The G28 command is commonly used prior to an automatic tool change. It allows the existing tool to be positioned to the predefined reference point automatically via an intermediate position. This ensures that when the tool turret is engaged, it is properly aligned and clears the workpiece. CNC Lathe Programming
  121. 121. G28 Automatic Return to Reference Point Format: N_ G28 X_ Z_ Sample Program G28: Workpiece Size: Length 4", Diameter 2.5" Tool: Tool #1, Right-hand Tool Tool Start Position: X2", Z3" Zero Return Position: X2", Z3" % :1028 N5 G20 G40 N10 T0101 N12 M03 M08 N15 G00 X2.25 N20 Z0.1 N25 G01 Z-2.0 F0.012 N30 G28 X4.0 Z0.5 M09 (Rapid move to zero return position) N35 T0100 M05 N40 M30 CNC Lathe Programming
  122. 122. G29 Automatic Return from Reference Point Format: N_ G28 X_ Z_ The G29 command can be used immediately after an automatic tool change. It allows the new tool to be returned from the predefined reference point to the specified point via an intermediate point specified by the previous G28 command. CNC Lathe Programming
  123. 123. G29 Automatic Return from Reference Point Format: N_ G28 X_ Z_ CNC Lathe Programming
  124. 124. G29 Automatic Return from Reference Point Format: N_ G29 X_ Z_ Sample Program G29: Workpiece Size: Length 4", Diameter 2.5" Tools: Tool #1, Right-hand Tool Tool #2, Finishing Tool Tool Start Position: X2", Z3“ Zero Return Position: X2", Z3" % :1029 N5 G20 N10 T0101 N12 M03 M08 N15 G00 X2.25 N20 Z0.1 N25 G01 Z-2.0 F0.012 N30 G28 X4.0 Z0.5 M09 N35 T0100 M05 N40 T0202 N45 M03 M08 N50 G29 X2.25 Z0.1 (Return from zero return position) N55 G01 Z-2.0 N60 G28 X4 Z0.5 M09 N65 T0100 M05 N70 M30 CNC Lathe Programming
  125. 125. G54 – G59 Working Coordinate System Format: N_ G54 through G59 •The G54 – G59 commands are used to reposition the origin as per a user- defined working coordinate system. • Six register sets in the controller which hold the values for the working coordinate systems. • The G54 – G59 commands are very useful when multiple workpiece fixtures are used. CNC Lathe Programming
  126. 126. G98 Set Initial Plane Rapid Default Format: N_ G98 • The G98 command forces the tool to return to the Z initial plane a drilling operation. • This forces the tool up and out of the workpiece. • This setting is normally used when a workpiece has clamps or other obstacles that could interfere with tool movement. • The G98 command is also the system default. CNC Milling Cycles
  127. 127. CNC Milling Cycles G99 Set Rapid to Retract Plane Format: N_ G99 •The G99 command forces the tool to return to the retract plane after a drilling operation. • This forces the tool up and out of the workpiece to the retract plane specified in the drilling cycle, overriding the system default. • This command is usually used on drilling cycles within a pocket, or on workpieces that do not have surface obstacles. • It is quicker than the G98 command because the tool moves only to the retract plane.
  128. 128. CNC Milling Cycles G73 High-Speed Peck Drilling Cycle Format: N_ G73 X_ Y_ Z_ R_ Q_ F_ • During a G73 high-speed peck drilling cycle, the tool feeds in to the peck distance or depth of cut, then retracts a small pre-determined distance, which is the chip- breaking process, and then feeds to the next peck, which takes the tool deeper. • This process is repeated until the final Z depth is reached. Because the tool doesn't retract fully from the hole, as in the G83 cycle, it minimizes cycle time and improves total part machining time.
  129. 129. G80 Cancel Canned Cycle Format: N_ G80 • The G80 command cancels all previous canned cycle commands. Because the canned cycles are modal (refer to the canned cycles on the following pages), they will remain active until canceled by the G80 command. • Canned cycles include tapping, boring, spot facing, and drilling. Note: On most controllers the G00 command will also cancel any canned cycles. CNC Milling Cycles
  130. 130. G81 Drilling Cycle Format: N_ G81 X_ Y_ Z_ R_ F_ • The G81 command invokes a drill cycle at specified locations. • This cycle can be used for bolt holes, drilled patterns, and mold sprues, among other tasks. • This command is modal and so remains active until overridden by another move command or cancelled by the G80 command. Invoking the G81 command requires invoking the Z initial plane, Z depth and Z retract plane parameters CNC Milling Cycles
  131. 131. CNC Milling Cycles G82 Spot Drilling or Counter Boring Cycle Format: N_ G82 X_ Y_ Z_ R_ P_F_ •This cycle follows the same operating procedures as the G81 drilling cycle, with the addition of a dwell. • The dwell is a pause during which the Z axis stops moving but the spindle continues rotating. • This pause allows for chip clearing and a finer finish on the hole. • The dwell time is measured in seconds. • The dwell is specified by the P letter address, followed by the dwell time in seconds. The same Z levels apply to the G82 cycle as to the G81 cycle: Z initial plane, Z depth and Z retract.
  132. 132. G82 Deep Hole Drilling Cycle Format: N_ G83 X_ Y_ Z_ R_ Q_F_ • The G83 command involves individual peck moves in each drilling operation. • When this command is invoked, the tool positions itself as in a standard G81 drill cycle. • The peck is the only action that distinguishes the deep hole drilling cycle from the G81 cycle. • When pecking, the tool feeds in the specified distance (peck distance or depth of cut), then rapids back out to the Z Retract plane. • The next peck takes the tool deeper, and then it rapids out of the hole. This process is repeated until the final Z depth is reached. In the G83 cycle, Q is the incremental depth of cut. CNC Milling Cycles
  133. 133. CNC Lathe Cycles G32 Simple Thread Cycle Format: N_ G32 Z_ K_ F_ The G32 command invokes a simple or basic thread cycle. It automatically synchronizes spindle and axis movements to achieve the desired thread pitch defined by the F word address.
  134. 134. G32 Simple Thread Cycle Sample Program G32EX32: Workpiece Size: Length 4", Diameter 2" Tool: Tool #4, Neutral Tool / Threading Tool Tool Start Position: X2, Z3 % :1040 N5 G20 G40 (Set TNR cancel at beginning) N10 T0101 N15 M03 M08 N20 G00 Z0.1 N25 X2.1 N30 G01 X1.0 F0.012 N35 G32 Z-2.0 F.05 (Machine a single-pass thread) N40 G00 X4.0 N45 T0100 M05 N50 M30 CNC Lathe Cycles
  135. 135. G70 Finishing Cycle Format: N_ G70 P_ Q_ •The G70 command is used immediately after a roughing cycle, such as a G71 Rough Turning, or G72 Rough Facing cycle command. • The remaining material is machined as specified by the P and Q block number values, which point to the start and finish blocks of the desired part profile contour CNC Lathe Cycles
  136. 136. G70 FINISHING CYCLE Format: N_ G70 P_ Q_ P Start block of segment Q End block of segment F Feedrate G71 ROUGH TURNING CYCLE Format: N_ G71_ P_ Q_ U_ W_ D_ F P Start block of segment Q End block of segment U Amount of stock to be left for finishing in X W Amount of stock to be left for finishing in Z D Depth of cut for each pass in thousandths F Feedrate for finish pass CNC Lathe Cycles
  137. 137. G71 Rough Turning Cycle Format: N_ G71_ P_ Q_ U_ W_ D_ F _ •The G71 command automatically generates roughing passes to turn a workpiece to a specified profile, leaving an allowance for finishing. • It reads a program segment specified by the P and Q letter addresses and determines the number of passes, the depth of cut for each pass, and the number of repeat passes for the cycle. • Cutting is done parallel to the Z axis. The U and W signs determine the direction of the cuts. CNC Lathe Cycles
  138. 138. G71 Rough Turning Cycle Sample Program G71: Workpiece Size: Length 4", Diameter 2" Tools: Tool #1, Right-hand Facing Tool Tool #2, Right-hand Finishing Tool Tool Start Position: X2, Z3 % :1071 N5 G90 G20 N10 T0101 N15 M03 N20 G00 X2 Z0.1 M08 N35 G71 P40 Q55 U0.05 W0.05 D625 F0.012 (Rough turning) N40 G01 X0 Z0 N45 G03 X1 Z-0.5 I0 K-0.5 N50 G01 Z-1.0 N55 X2.1 Z-1.5 N60 T0100 G00 X4 Z3 N65 T0202 N70 G00 X2 Z0.1 N75 G70 P40 Q55 F0.006 N80 G00 X4 Z3 M09 N85 T0200 M05 N90 M30 CNC Lathe Cycles
  139. 139. CNC Lathe Cycles G72 Rough Facing Cycle Format: N_ G71_ P_ Q_ U_ W_ D_ F _ P Start block Q End block U Amount of stock to be left for finishing in X W Amount of stock to be left for finishing in Z D Depth of cut for finish pass F Feedrate (this is optional) The G72 command automatically faces off a part to a predefined depth of cut, with preset offsets and feed rates.
  140. 140. G72 Rough Facing Cycle Format: N_ G71_ P_ Q_ U_ W_ D_ F _ • The G72 command automatically faces off a part to a predefined profile, with preset offsets and feedrates leaving an allowance for finishing. • It reads a program segment specified by the P and Q letter addresses and determines the number of passes, the depth of cut for each pass, and the number of repeat passes for the cycle. • Cutting is done parallel to the X axis. The U and W signs determine the direction of the cuts. CNC Lathe Cycles
  141. 141. G72 Rough Facing Cycle Sample Program G72: Workpiece Size: Length 4", Diameter 1" Tools: Tool #1, Right-hand Facing Tool Tool #2, Right-hand Finishing Tool Tool Start Position: X2, Z3 % :1072 N5 G90 G20 N10 T0101 N15 M03 N20 G00 X1 Z0.1 M08 N25 G72 P30 Q50 U0.05 W0.05 D500 F0.012 (Rough facing) N30 G01 X0 Z0.1 N35 X0.25 N40 Z-0.125 N45 X0.5 Z-0.25 N50 G02 X1 Z-0.5 I0.25 K0 N55 G00 X4 Z3 T0100 N60 T0202 N65 G00 X1 Z0.1 N70 G70 P30 Q50 F0.006 N75 G00 X4 N80 Z3 M09 N85 T0200 M05 N90 M30 CNC Lathe Cycles
  142. 142. CNC Lathe Cycles G74 Peck Drilling Cycle Format: N_ G74_ X0 Z_ K_ F _ EXAMPLE: N20 G74 X0 Z-1.0 K0.125 F0.015 In this example, a hole is peck drilled to a total depth of 1 in., using 0.125 in. for each peck •The G74 command executes a peck drilling cycle with automatic retracts and incremental depths of cut. The G74 command is specified by several letter addresses: X0 X always 0 Z Total depth K Peck depth F Feed rate
  143. 143. G74 Peck Drilling Cycle Sample Program G74: Workpiece Size: Length 4", Diameter 1" Tools: Tool #12, Center Drill Tool #10, 1/2" Drill Tool Start Position: X2, Z3 % :1074 N5 G20 G98 N10 T1212 M08 N15 M03 S2000 N20 G00 X0 N25 Z0.1 N30 G01 Z-0.2 F2 N35 G00 Z3 N40 X3 T1200 N45 T1010 N50 G00 X0 N55 Z0.1 N60 G74 X0 Z-1.5 K0.125 F0.5 (Drilling cycle) N65 G00 Z3 N70 X4 M09 N75 T1000 M05 N80 M30 CNC Lathe Cycles
  144. 144. CNC Lathe Cycles G75 Grooving Cycle Format: N_ G75 X_ Z_ F_ D_ I_ K_ X Diameter of groove Z Z position of groove F Incremental retract D Depth/X offset K Z movement I X movement The G75 command is used to machine grooves. EXAMPLE: N25 G75 X0.25 Z-0.75 F0.125 I0.125 K0.125 This command defaults to the last specified feedrate. The F address is used to specify the retract distance, so the feedrate cannot be set within the grooving cycle
  145. 145. CNC Lathe Cycles G75 Grooving Cycle Sample Program G75: Workpiece Size: Length 4", Diameter 1" Tool: Tool #5, Grooving Tool Tool Start Position: X2, Z3 % :1075 N5 G90 G20 N10 T0505 F0.015 N15 M03 N20 G00 Z-0.5 M08 N25 X1.2 N30 G75 X0.5 Z-0.75 F0.125 D0 I0.125 K0.125 (Grooving cycle) N35 G00 X4 N40 Z3 M09 N45 T0500 M05 N50 M30
  146. 146. G76 Threading Cycle Format: N_ G76 X_ Z_ F_ D_ IA_ K_ The G76 command performs all threading operations in a cycle, with automatic depth change and tool path calculation. The G76 command is specified by several letter addresses: X Minor diameter of thread Z Position at end of thread D Depth of first pass in thousandths (the control uses the first depth of cut to determine the number of passes) K Depth of thread F Pitch of thread (thread pitch = 1/thread/in.) A Tool angle (If the tool angle is given, the tool will continue to cut on the leading edge of the tool; if no tool angle is given, the tool will cut on both sides.) EXAMPLE: N25 G76 X0.5 Z-1.0 D625 K0.25 A55 F0.1 In this example, the tool cuts a thread, starting at its present location and ending at the specified XZ endpoint. The D value specifies each cut depth, and the K value defines the overall depth. The A value defines the tool angle, and the F value defines pitch CNC Lathe Cycles
  147. 147. G76 Threading Cycle Format: N_ G76 X_ Z_ F_ D_ IA_ K_ CNC Lathe Cycles
  148. 148. G76 Threading Cycle Sample Program G76: Workpiece Size: Length 4", Diameter 1" Tool: Tool #6, Neutral Tool Tool Start Position: X2, Z3 % :1076 N5 G90 G20 N10 T0606 M08 N15 M03 N20 G00 X1 N25 Z0.1 N25 G76 X0.96 Z-2 D625 K0.125 A55 F0.1 (Threading cycle) N30 G00 X4 N35 Z3 M09 N35 T0600 M05 N40 M30 CNC Lathe Cycles
  149. 149. N10 G17 G54 ;Working plane X/Y, workpiece zero N20 TRANS X20 Y10 ;Absolute offset N30 L10 ;Subprogram call N40 TRANS X55 Y35 ;Absolute offset N50 AROT RPL=45 ;Rotation of the coordinate system through 45° N60 L10 ;Subprogram call N70 TRANS X20 Y40 ;Absolute offset; (cancels all previous offsets) N80 AROT RPL=60 ;Additive rotation through 60° N90 L10 ;Subprogram call N100 G0 X100 Y100 ;Retraction N110 M30 ;End of program Advanced programming command 1. TRANS, ATRANS 2. ROT, AROT Example using the command: A feature(ex:pocket) can be translated or rotated as shown in the figure.
  150. 150. 1. SCALE, ASCALE 2. MIRROR, AMIRROR Advanced programming command Ex for TRANS, AROT and ASCALE Command Ex for MIRROR, AMIRROR Command Ex for SCALE, ASCALE Command A feature(ex:pocket) can be scaled or mirrored as shown in the figure.
  151. 151. Automatic Part Programming Software programs can automatic generation of CNC data Make 3D model Define Tool CNC data Simulate cutting
  152. 152. Programming is where all the machining data are compiled and where the data are translated into a language which can be understood by the control system of the machine tool. The machining data is as follows CNC PART PROGRAMMING (a) Machining sequence classification of process, tool start up point, cutting depth, tool path, etc. (b) Cutting conditions, spindle speed, feed rate, coolant, etc. (c) Selection of cutting tools
  153. 153. While preparing a part program, need to perform the following steps : (a) Determine the startup procedure, which includes the extraction of dimensional data from part drawings and data regarding surface quality requirements on the machined component. (b) Select the tool and determine the tool offset. (c) Set up the zero position for the workpiece. (d) Select the speed and rotation of the spindle. (e) Set up the tool motions according to the profile required. (f) Return the cutting tool to the reference point after completion of work. (g) End the program by stopping the spindle and coolant.
  154. 154. Manual Part Programming The programmer first prepares the program manuscript in a standard format. Manuscripts are typed with a device known as flexo writer, which is also used to type the program instructions To be able to create a part program manually, need the following information : (a)Knowledge about various manufacturing processes and machines. (b) Sequence of operations to be performed for a given component. (c) Knowledge of the selection of cutting parameters. (d) Editing the part program according to the design changes. (e) Knowledge about the codes and functions used in part programs.
  155. 155. Computer Aided Part Programming If the complex-shaped component requires calculations to produce the component are done by the programming software contained in the computer. The programmer communicates with this system through the system language, which is based on words. There are various programming languages developed in the recent past, such as APT (Automatically Programmed Tools), ADAPT, AUTOSPOT, COMPAT-II, 2CL, ROMANCE, SPLIT is used for writing a computer programme, which has English like statements. A translator known as compiler program is used to translate it in a form acceptable to MCU. The programmer has to do only following things : (a) Define the work part geometry. (b) Defining the repetition work. (c) Specifying the operation sequence.
  156. 156. Interactive Graphic System in Computer Aided Part Programming Computer Aided Part Programming
  157. 157. Element for developing part program Type of Dimensioning System We determine what type of dimensioning system the machine uses, whether an absolute or incremental dimensional system CNC Machines Axis Designation The programmer also determines how many axes are availed on machine tool. Whether machine tool has a continuous path and point-to-point control system. NC Words The NC word is a unit of information, such as a dimension or feed rate and so on. A block is a collection of complete group of NC words representing a single NC instruction. An end of block symbol is used to separate the blocks. NC word is where all the machining data are compiled and where the data are translated in to a language, which can be understood, by the control system of the machine tool. Block of Information NC information is generally programmed in blocks of words. Each word conforms to the EIA standards and they are written on a horizontal line. If five complete words are not included in each block, the machine control unit (MCU) will not recognize the information; therefore the control unit will not be activated. It consists of a character N followed by a three digit number raising from 0 to 999.
  158. 158. Block of Information
  159. 159. Standard G and M Codes The most common codes used when programming NC machines tools are G-codes (preparatory functions), and M codes (miscellaneous functions). Other codes such as F, S, D, and T are used for machine functions such as feed, speed, cutter diameter offset, tool number, etc. G-codes are sometimes called cycle codes because they refer to some action occurring on the X, Y, and/or Z- axis of a machine tool. The G-codes are grouped into categories such as Group 01, containing codes G00, G01, G02, G03, which cause some movement of the machine table or head. Group 03 includes either absolute or incremental programming. A G00 code rapidly positions the cutting tool while it is above the workpiece from one point to another point on a job. During the rapid traverse movement, either the X or Y-axis can be moved individually or both axes can be moved at the same time. The rate of rapid travel varies from machine to machine.
  160. 160. Standard G and M Codes
  161. 161. Tape Programming Format Both EIA and ISO use three types of formats for compiling of NC data into suitable blocks of information with slight difference. Word Address Format This type of tape format uses alphabets called address, identifying the function of numerical data followed. This format is used by most of the NC machines, also called variable block format. A typical instruction block will be as below : N20 G00 X1.200 Y.100 F325 S1000 T03 M09 <EOB> or N20 G00 X1.200 Y.100 F325 S1000 T03 M09; The MCU uses this alphabet for addressing a memory location in it. Tab Sequential Format Here the alphabets are replaced by a Tab code, which is inserted between two words. The MCU reads the first Tab and stores the data in the first location then the second word is recognized by reading the record Tab. A typical Tab sequential instruction block will be as below : >20 >00 >1.200 >.100 >325 >1000 >03 >09 Fixed Block Format In fixed block format no letter address of Tab code are used and none of words can be omitted. The main advantage of this format is that the whole instruction block can be read at the same instant, instead of reading character by character. This format can only be used for positioning work only. A typical fixed block instruction block will be as below: 20 00 1.200 .100 325 1000 03 09 <EOB>
  162. 162. Machine Tool Zero Point Setting The machine zero point can be set by two methods by the operator, manually by a programmed absolute zero shift, or by work coordinates, to suit the holding fixture or the part to be machined. Manual Setting The operator can use the MCU controls to locate the spindle over the desired part zero and then set the X and Y coordinate registers on the console to zero. Absolute Zero Shift The absolute zero shift can change the position of the coordinate system by a command in the CNC program. The programmer first sends the machine spindle to home zero position by a command in the program. Then another command tells the MCU how far from the home zero location, the coordinate system origin is to be positioned
  163. 163. Coordinate Word A co ordinate word specifies the target point of the tool movement or the distance to be moved. The word is composed of the address of the axis to be moved and the value and direction of the movement. Example X150 Y-250 represents the movement to (150, 250). Whether the dimensions are absolute or incremental will have to be defined previously using G-Codes. Parameter for Circular Interpolation These parameters specify the distance measured from the start point of the arc to the center. Numerals following I, J and K are the X, Y and Z components of the distance respectively. Spindle Function The spindle speed is commanded under an S address and is always in revolution per minute. It can be calculated by the following formula : Surface cutting speed in m/min = 1000 Spindle Speed / π × Cutter Diameter in mm
  164. 164. Feed Function The feed is programmed under an F address except for rapid traverse. The unit may be in mm per minute or in mm per revolution. The unit of the federate has to be defined at the beginning of the programme. The feed rate can be calculated by the following formula : Feet Rate = Chip Load /Tooth × No. of tooth x Spindle speed Example F100 represents a feed rate of 100 mm/min.
  165. 165. Work Settings and offset All NC machine tools require some form of work setting, tool setting, and offsets to place the cutter and work in the proper relationship. Compensation allows the programmer to make adjustments for unexpected tooling and setup conditions. A retraction point in the Z-axis to which the end of the cutter retracts above the work surface to allow safe table movement in the X-Y axes. It is often called the rapid-traverse distance, retract or work plane. Some manufacturers build a workpiece height distance into the MCU (machine control unit) and whenever the feed motion in the Z-axis will automatically be added to the depth programmed. When setting up cutting tools, the operator generally places a tool on top of the highest surface of the work piece. Each tool is lowered until it just touches the workpiece surface and then its length is recorded on the tool list. Once the work piece has been set, it is not generally necessary to add any future depth dimensions since most MCU do this automatically.
  166. 166. Work settings Offsets
  167. 167. Rapid Positioning This is to command the cutter to move from the existing point to the target point at the fastest speed of the machine. Linear Interpolation This is to command the cutter to move from the existing point to the target point along a straight line at the speed designated by the F address This is to command the cutter to move from the existing point to the target point along a circular arc in clockwise direction or counter clockwise direction. The parameters of the center of the circular arc is designated by I, J and K addresses. I is the distance along the X-axis, J along the Y, and K along the Z. This parameter is defined as the vector from the starting point to the center of the arc.
  168. 168. Circular Interpolation Tool Path without Cutter Compensation Tool Path with Cutter Compensation In NC machining, if the cutter axis is moving along the programmed path, the dimension of the workpiece obtained will be incorrect since the diameter of the cutter has not be taken in to account. What the system requires are the programmed path, the cutter diameter and the position of the cutter with reference to the contour. The cutter diameter is not included in the programme. It has to be input to the NC system in the tool setting process
  169. 169. Symbols used % – Main Programme (1 to 9999) L – Sub program (1 to 999)/Home position N – Sequence of block number. Lf – Block end (EOB) means “; or *” T – Tool number or Tool station number D – Tool offset S – Spindle speed F – Feed M – Switching function G – Transverse commands R – Parameters I, J, K – Circle parameters B/U/R – Radius X/Y/Z – Axis coordinates P – Passes.
  170. 170. The CNC lathe operation such as simple facing, turning, taper turning, thread, boring, parting off etc. The X-axis and Z-axis are taken as the direction of transverse motion of the tool post and the axis of the spindle respectively. To prepare part programs using G-codes and M-codes. The following examples illustrated the part program for different components. Lathe programming Examples
  171. 171. Lathe programming Examples
  172. 172. The CNC milling machine, the motion is possible in three axes, X-axis, Y-axis and Z-axis. The movement of Z-axis is taken as positive when tool moves away from the job or vice versa
  173. 173. FIXED CYCLE/CANNED CYCLE Machining holes is probably the most common operation, mainly done on CNC milling machines and machining centers. Machining on simple hole may require only one tool but a precise and complex hole may require several tools to be completed. Number of holes required for a given job is important for selection of proper programming approach. In the majority of programming applications, hole operations offer a great number of similarities from one job to another. These sequences are referred to in a number of ways like cycle, subroutines and loops, etc. A fixed cycle is a combination of machine moves resulting in a particular machining function such as drilling, milling, boring and tapping. By programming one cycle code number, as many as distinct movements may occur. These movements would take blocks of programme made without using Fixed or Canned cycles. The corresponding instructions of a fixed cycle are already stored in the system memory. The advantages of writing a part programme with these structures are : (a) Reduced lengths of part programme. (b) Less time required developing the programme. (c) Easy to locate the fault in the part programme. (d) No need to write the same instructions again and again in the programme. (e) Less memory required in the control unit.
  174. 174. The following examples are some basic and fixed cycle codes available with a number of machines, assigned by EIA 01 (G81 Drilling Cycle) (All dimensions are in mm). R00 – Dwell time at the starting point for chip removal. R02 – Reference plane absolute with sign. R03 – Final depth of hole absolute with sign. R04 – Dwell time at the bottom of drilled hole for chip breaking. R10 – Retract plane without sign. R11 – Drilling axis number 1 to 3. % 400;
  175. 175. DRILLING CYCLE
  176. 176. Tapping cycle
  177. 177. BORING CYCLE
  178. 178. In a few jobs some portion of the programme needs to be repeated, which do not fit into standardized category. Some of the non-standardized cycles are Do-loops and Subroutines. Do-loop is a number of operations repeated over a number of equal steps for a previously fixed number of times. Do-loops always are implemented on incremental mode because each previous position becomes reference for next iteration. Do-loop is actually jumping back to an already written initial portion of the program for the number of times a loop count DO LOOP
  179. 179. A subroutine is a portion of a programme, complete in itself, which is stored in computer after programming once. It is called with required data when required again in a programme. SUBROUTINE

    Be the first to comment

    Login to see the comments

  • readygone

    Jan. 21, 2019
  • kabilanNj

    Jan. 22, 2019
  • DebashishPanda6

    Feb. 13, 2019
  • PhongHuynh7

    Mar. 26, 2019
  • ShivKumarAhirwar1

    Apr. 9, 2019
  • Kumarsanjeev827

    Jun. 3, 2019
  • GokulSatyaSriramRayu

    Aug. 16, 2019
  • joaograca1088

    Oct. 24, 2019
  • ArbaazKhan101

    Dec. 16, 2019
  • pareshgalachar

    Jan. 18, 2020
  • LuisRenato8

    Mar. 6, 2020
  • ShoaibAli51

    Mar. 12, 2020
  • AnvarSadathAli

    Mar. 30, 2020
  • KhangTruong13

    Apr. 9, 2020
  • HariprasanthThirumur

    Jun. 27, 2020
  • RahulRaj581

    Sep. 5, 2020
  • someshsahu4

    Sep. 21, 2020
  • PramodGawade2

    Oct. 5, 2020
  • mulekano

    Jun. 8, 2021
  • AvinashSuthar2

    Jun. 11, 2021

Cnc machining course from IIT Madras.

Views

Total views

11,993

On Slideshare

0

From embeds

0

Number of embeds

15

Actions

Downloads

975

Shares

0

Comments

0

Likes

43

×