<<

CNC Machine Centres

Prof. Janakarajan Ramkumar Professor Department of Mechanical and Design Program IIT Kanpur, India.

Index • CNC machining centres • CNC turning centres • CNC centres • Vertical machining centre • 5-axis machining centre • CNC travelling column • Horizontal machining centre

CNC Machining centres

• The term “machining centres” describes almost any CNC milling and machine that includes an automatic changer and a table that clamps the workpiece in place.

• CNC machine centre is a advance manufacturing which performs wide range of machining operation with accuracy and good quality surface finish.

• The orientation of the is the most fundamental defining characteristic of a CNC machining centres.

CNC Machining centres

Various mechanisms used in CNC machining centers, there main aim is to reduce the production time and gives the best quality results.

1. ATC (Automatic tool changer)

2. APC (Automatic Pallet changer)

3. Feedback systems

4. Servo motors systems

5. Re-circulating Ball screw and Nut CNC Machining centres

CNC machining centers can further be classified based on the rotation of either the work piece Or the rotation of the tool as:

1. CNC turning machines

2. CNC Milling machines

CNC Turning

• The primary function of a CNC Turning Center is that it rotates (or “turns”) your workpiece.

• CNC Turning Machines are one of the oldest and simplest forms of machining parts, called “,” .

• Can be either horizontal or vertical depending on the weight and tolerance of the workpiece.

• Workpeices for this process are usually round, but can be other shapes — like squares or hexagons.

CNC Turning

• The workpiece is held in place by an instrument known as the “chuck.” The chuck then spins at various RPMs (depending on the capability of your machine).

• When this occurs, the machine’s tool moves into the rotating workpiece and begins to shave away material to create the desired shape. CNC Turning

https://giphy.com/explore/cnc CNC Milling machines

• The primary function of a CNC Milling Machine is that your tool will be doing the rotating and moving while your workpiece stays in one spot (generally).

• Milling is a more specific process that is similar to drilling and cutting.

• These machines can also be either horizontal or vertical, again depending on the tolerance and weight of your workpiece.

• This process has many that allow for a variety of shapes, holes, and slots to be cut into the workpiece at many angles.

• These axes provide many different maneuvers, either by the spindle or the bed, to cut the part desired to the exact specifications. CNC Milling machines

https://gfycat.com/gifs/search/milling+machine CNC Turning centre Schematic of a concrete bed of a CNC Turning centre

Rao, CAD/CAM Principles and Applications, 2010, TMH CNC Turning centre

Rao, CAD/CAM Principles and Applications, 2010, TMH CNC Turning centre Spindle design for a CNC turning centre

Rao, CAD/CAM Principles and Applications, 2010, TMH

CNC Turning centre Spindle design with an integral spindle motor and cooling system for CNC Machining centre

https://www.pinterest.com/pin/715368722039972918/ CNC Turning centre Bifurcated column structure for CNC Machining centre to improve torsional rigidity

Rao, CAD/CAM Principles and Applications, 2010, TMH v CNC Machining centres

According to the orientation of spindle, CNC machining centre can be classified as :

• Vertical machining centres (VMCs): generally favour precision while

• Horizontal machining centres (HMCs) generally favour production

• Universal Machining centres (UMC) 5 axis machining centre, which is able to pivot the tool and/or the part in order to mill and at various orientations CNC vertical machining centre • In CNC vertical machining center, the workpiece is held on the table base and the spindle which contains the cutting tool is fixed on vertical spindle Z axis. The table moves in X and Y axis and spindle with cutting tool moves in Z axis. CNC vertical machining centre

• Travelling column

• Gantry structure

• Multiple spindle

CNC vertical machining centre • Present day production vertical axis CNC machining centre Bridgeport VMC 500

https://auctions.charterauctions.co.uk 5-Axis machine

https://i.ytimg.com CNC travelling column

Rao, CAD/CAM Principles and Applications, 2010, TMH CNC travelling column • The possible rotary motions of the tool head of a CNC travelling column

Rao, CAD/CAM Principles and Applications, 2010, TMH 5-Axis CNC travelling column

http://www.asquithbutler.com Gantry cnc machining centre • A gantry type CNC machining centre DMC 65V for high speed machining

https://5.imimg.com 4-axis CNC machine • A 4-spindle CNC machining centre 4CUT for high speed machining

https://5.imimg.com Horizontal Machine centre • Rotary table used in HMC for machining all four faces.

Rao, CAD/CAM Principles and Applications, 2010, TMH Horizontal Machine centre • Spindle swivelling facility in HMC for machining in two different planes (XY as well as XZ)

Rao, CAD/CAM Principles and Applications, 2010, TMH Horizontal Machine centre • Horizontal axis machining centre provided with a 2-axis rotary table

https://encrypted-tbn0.gstatic.com

Horizontal Machine centre • Various planes possible by the 2-axis rotary table with a HMC

Rao, CAD/CAM Principles and Applications, 2010, TMH Horizontal Machine centre • A typical horizontal machining centre with an automatic pallet changer.

Rao, CAD/CAM Principles and Applications, 2010, TMH

Pallet in HMC

• Typical pallet designs used with HMC, a) Pallet with holes; b) pallet with T-slots

Rao, CAD/CAM Principles and Applications, 2010, TMH . Pallet in HMC

• A typical pallet changer with a rotary style pallet changer

Rao, CAD/CAM Principles and Applications, 2010, TMH

Pallet in HMC

• A typical pallet changer with a shuttle pallet changer combined with a 6 pallet carousal.

Rao, CAD/CAM Principles and Applications, 2010, TMH CNC Turning Centres • Turn mill centres (X, Z, C)

• Multiple axis turning centres (X, Z, C, Y)

• Vertical turning centres

• Twin turret turning centres

• Multiple spindle turning centres

• Integrated material handling

CNC Turning Centres • The slant bed of a CNC turning centre

https://automatecnc.com

CNC Turning Centres • Machining of a key way or drill a hole away from the centre of the workpiece.

Rao, CAD/CAM Principles and Applications, 2010, TMH CNC Turning Centres • The drive for tooling in the turret of a CNC turn mill centre

Rao, CAD/CAM Principles and Applications, 2010, TMH CNC Turning Centres • A tool turret with driven tooling to be used in CNC turn mill centre.

https://www.ctemag.com CNC Turning Centres • Typical shapes of component that can be machined by the combination of X, Z and C-axis movements.

Rao, CAD/CAM Principles and Applications, 2010, TMH . CNC Turning Centres • CNC Turning centre with twin turrets

Rao, CAD/CAM Principles and Applications, 2010, TMH

CNC Turning Centres • Twin spindle CNC Turning centre

https://i.ytimg.com CNC Turning Centres • Twin spindle CNC Turning centre Mazak Dual Turn 20

Rao, CAD/CAM Principles and Applications, 2010, TMH CNC Turning Centres • CNC turn Mill centre with Y-axis, Yamazaki Integrex 30

https://5.imimg.com CNC Turning Centres • The types of machining that can be done using a CNC turn Mill centre with Y-axis

Rao, CAD/CAM Principles and Applications, 2010, TMH CNC Turning Centres

• CNC Vertical turning centre, Yamazaki

https://5.imimg.com CNC Turning Centres • CNC Vertical turning centre with inverted arrangement EMAG VSC 250HDS ,

Rao, CAD/CAM Principles and Applications, 2010, TMH Chip conveyors in CNC machine

Rao, CAD/CAM Principles and Applications, 2010, TMH Summary

• What is CNC machining centres? • What is CNC turning centres? • What is CNC milling centres? • Various Vertical machining centre • 5-axis machining centre • Various Horizontal machining centre • Various pallet changer used in the CNC

Thank You CNC Tooling

Prof. Janakarajan Ramkumar Professor Department of Mechanical IIT Kanpur, India.

Index

• CNC tools • Cutting tools materials • High speed steel tool • Cement carbide tools • Ceramics tools • ISO coding system of tools • Tools magazines • Automatic tool changer (ATC) • Modular accessories in CNC CNC Tools

• The concept of computer numerical control (CNC) incorporates a wide range of machines that perform various functions. These CNC machines are designed with precisely crafted tools to aid in the production process

• If CNC machine is the brain, machine tools are the limbs- converting instructions into actual action.

• These tools perform precise cuts on metal, , steel, aluminum, and a variety of other materials.

• Multi-axis cutting tools can move in many directions, enabling the most precise cuts possible on the materials at-hand. CNC Tools

Although all cutting tools serve one purpose, to cut through a material, there is a huge difference in their purpose.

Normally, for a cutting tool to be effective, it has to:

• be 30% to 50% harder than the material it will work on. • be easily fabricated. • have high thermal conductivity. • have low coefficient of friction. • be very resistance to wear. • be chemically inert and stable. Cutting tool materials

• High Speed Steel • Cemented Carbides • Coated Carbides • Ceramics

High Speed Steel

• It‘s composed of high carbon steel with a reasonable amount of element alloys like chromium, tungsten, and molybdenum.

• With this combination, it improves hardness, wear resistance, and toughness. It also offers higher removal rate for metals and other materials. • To improve its property, you’ve got to apply certain surface treatment.

• This property allows HSS to cut faster than high carbon steel, hence the name high-speed steel. High Speed Steel

• The main use of high-speed steels continues to be in the manufacture of various cutting tools: , taps, milling cutters, tool bits, gear cutters Hobbing, blades, planer and blades, bits, etc.

https://www.banggood.in/Drillpro-8pcs-2-12mm-4-Flute-End-Mill-Cutter-HSS-Straight-Shank-Milling-Cutter-CNC-Tool-p-1376890.html Cemented carbide

• Cemented carbide is a hard material used extensively as cutting tool material, as well as other industrial applications.

• It consists of fine particles of carbide cemented into a composite by a binder metal. Cemented carbides commonly use tungsten carbide (WC), titanium carbide (TiC), or tantalum carbide (TaC) as the aggregate.

• Most of the time, carbide cutters will leave a better surface finish on the part, and allow faster machining than high-speed steel or other tool steels.

• Carbide tools can withstand higher temperatures at the cutter- workpiece interface than standard high-speed steel tools (which is a principal reason for the faster machining). Cemented carbide

• Choose a grade with the lowest cobalt content and the finest grain size consistent with adequate strength to eliminate chipping.

• Use straight WC grades if cratering, seizure or galling are not experienced in case of work materials other than steels.

• To reduce cratering and wear when machining steel, use grades containing TiC.

• For heavy cuts in steel where high temperature and high pressure deform the cutting edge plastically, use a multi carbide grade containing W-Ti-Ta and/or lower binder content. Cemented carbide

https://www.indiamart.com/proddetail/dagalloy-cemented-carbide-tools-8865787888.html Ceramic cutting tools

• Ceramic cutting tools are constructed mainly from alumina (Al2O3) and silicon nitride (SiN).

• Recent advances have also introduced the use of silicon carbide (SiC) and ceramic matrix composites (CMCs) in order to enhance the performance of the cutting tool.

• They all exhibit excellent hardness, toughness and thermal conductivity.

• The advantages of using ceramic materials in manufacturing revolve around ceramic’s greater ability to withstand much higher temperatures than tools made from carbide or high-speed steel. Usability of Ceramic

cutting tools

• Use the highest cutting speed recommended and preferably select or round inserts with large nose radius.

• Use rigid machine with high spindle speeds and safe clamping angle.

• Machine rigid work pieces.

• Ensure adequate and uninterrupted power supply.

• Use negative rake angles so that less force is applied directly to the ceramic tip.

• The overhang of the tool holder should be kept to a minimum; not more than 1.5 times the shank thickness. Usability of Ceramic

cutting tools

• Large nose radius and side cutting edge angle on the ceramic insert to reduce the tendency of chipping.

• Always take a deeper cut with a light feed rather than a light cut with heavy feed; ceramic tips are capable of cuts as deep as one-half the width of the cutting surface on the insert.

• Avoid coolants with aluminium oxide based ceramics.

• Review machining sequence while converting to ceramics and if possible introduce or reduce feed rate at entry. Ceramic cutting tools

https://www.ctemag.com/news/articles/ceramic-composite-cutting-tools-are-they-tough-Enough https://www.ceramtec.com/spk-cutting-materials/

ISO coding • The ISO coding system for tungsten carbide inserts used in turning.

TMH, New Delhi, CAD/CAM Principles and Applications by P N Rao, 3rd Ed ISO coding • The ISO coding system for tungsten carbide turning tool holders used in external turning (SCEA - side cutting edge angle, ECEA - end cutting edge angle).

TMH, New Delhi, CAD/CAM Principles and Applications by P N Rao, 3rd Ed Contour capability

• The typical contour capability of external turning tools

TMH, New Delhi, CAD/CAM Principles and Applications by P N Rao, 3rd Ed Contour capability

• The typical contour capability of internal turning tools

TMH, New Delhi, CAD/CAM Principles and Applications by P N Rao, 3rd Ed Tooling used in turning centers

TMH, New Delhi, CAD/CAM Principles and Applications by P N Rao, 3rd Ed Modular tooling

TMH, New Delhi, CAD/CAM Principles and Applications by P N Rao, 3rd Ed Clamping system

The complete tool assembly

TMH, New Delhi, CAD/CAM Principles and Applications by P N Rao, 3rd Ed Retention knob • Retention knob as used in the top of tool assembly for clamping and releasing purpose as used in a CNC machining centre. Digital tool setting system

• Typical digital tool setting system, which is essentially a digital height useful for machining centre tooling Tool setter integrated • Typical tool setter integrated with a CNC turning centre helps in correct positioning of tool Automatic tool changers

• An Automatic tool changer or ATC is used in computerized numerical control (CNC) machine tools to improve the production and tool carrying capacity of the machine.

• ATC changes the tool very quickly, reducing the non-productive time.

• Generally, it is used to improve the capacity of the machine to work with a number of tools.

• It is one more step towards complete automation.

• A tool magazine where sufficient number of tools can be stored.

• The tool adopter that has a provision for pick-up by the tool change arm

Automatic tool changers

https://www.decispindle.com/atc-spindle-motor-deci/ Tool turret

• Typical tool turret used in CNC drilling/ milling machines. CNC drill using a tool turret

Chain type tool magazine 1

• A chain type tool magazine for holding larger number of spindle tooling used in CNC machining centres. Chain type tool magazine 2

Chain type tool magazine 3

Chain type tool magazine

Tool changing

• Stopping the spindle at the correct orientation for the tool change arm to pick the tool from the spindle.

• Tool change arm to move to the spindle.

• Tool change arm to pick the tool from the spindle.

• Tool change arm to index to reach the tool magazine.

• Tool magazine to index into the correct position where the tool from the spindle is to be placed. Tool changing

• Place the tool in the tool magazine.

• Indexing the tool magazine to bring the required tool to the tool change position.

• Tool change arm to pick the tool from the tool magazine.

• Tool change arm to index to reach the spindle.

• New tool is placed in the spindle.

• Tool change arm moves into its parking position. Tool changing arm • One common type of tool change arm used for tool changing with a double gripper . Tool changing Procedure

Disc type tool magazine

Drum type tool magazine • Drum type tool magazine used in CNC turning centres with modular tooling for storing large number of tools. Grid plate • A grid plate with holes which can be used as a machine table.

https://www.ame.com/grid-plates Tombstone

• A tombstone for mounting multiple components on different faces.

https://www.ame.com/tombstones-fixtures Modular

• Modular fixture elements used for supporting complex workpieces.

https://www.ctemag.com/news/articles/modular-fixturing-pros-and-cons Summary

• What are CNC tools? • High speed steel tool • Cement carbide tools • Ceramics tools • What is ISO coding system of tools? • Various tools magazines • What is Automatic tool changer and its working? • Various accessories used in CNC machines?

Thank You CNC Part Programming

Prof. Janakarajan Ramkumar Professor Department of Mechanical IIT Kanpur, India.

Index

• Basic of NC machines • Types of Part programming • Preparatory and Miscellaneous codes • Manual part programming • Computer assisted programming • Part programming using APT • CAD/CAM programming NC part programming

• A group of commands given to the CNC or NC for operating the machine is called the program. • NC part programming creates NC codes, which provide the instructions that drive cutters and control machine operations.

• In general, there are three approaches supporting NC programming: 1. manual, 2. computer-assisted, 3. and CAD/CAM.

NC part programming

NC part programming

• The difference between NC machines and conventional machines is in the way in which the various functions and cutter movements are controlled.

• In NC, these motions are controlled by the machine control unit (MCU).

• The MCU (brain of the NC) consists of a DPU (data processing unit) and a CLU (control loop unit).

• DPU reads the part program from tape, or some other media, and decodes the part program statements, processes the decoded information, and passes information to the CLU. NC part programming

• The information includes: position of each axis of the machine, its direction of motion, feed rate, and auxiliary function control signals (e.g., coolant on or off).

• CLU receives data from the DPU, converts them to control signals, and controls the machine via actuation devices that replace the hand wheel of the conventional machine.

• An actuation device could be a servomotor, a hydraulic actuator, or a step motor.

NC part programming

Configuration of a typical NC machine: (a) the machine control unit, (b) hand wheel dial, and (c) closed-loop control.

Chang, 2003. Product Manufacturing and Cost Estimating using CAD/CAE. Elsevier Inc.

NC part programming

• The MCU gives instructions to the servo system, monitors both the position and velocity output of the system, and uses this feedback to compensate for errors between the program command and the system response.

• The instructions given to the servos are modified according to the measured response of the system, called closed-loop control.

• Each axis of motion is equipped with a driving (actuation) device.

• The primary three axes of motion are referred to as the X-, Y-, and Z-axes. They form the machine tool coordinate system. NC part programming

• The XYZ system is a right-hand system and the location of its original may be fixed (older machine) or adjustable (floating zero).

• The Z-axis is the most important axis for machining.

• This axis is always aligned with the spindle that imparts power.

• The spindle may rotate workpiece such as in a or it may rotate a tool as in a milling machine.

NC part programming

• Usually, the direction that moves away from the workpiece is defined as positive.

• On a workpiece-rotating machine (e.g., lathe), the X-axis is the direction of tool movement, and a motion along its positive direction moves the tool away from the workpiece.

• On a milling or drilling machine, the positive X-axis points to the right when the programmer is facing the machine.

• Note that the definition of the positive X-axis is not universal.

• Y-axis is determined by X- and Z-axes through the right-hand rule. NC part programming

• By looking at its cutting path, a NC machine can be a PTP (point-to-point) or continuous path. Types of NC machines: (a) point-to-point and (b) continuous path

Chang, 2003. Product Manufacturing and Cost Estimating using CAD/CAE. Elsevier Inc.

NC part programming

• For a PTP machine, cutter performs operations on the workpiece at specific points.

• The cutter is not always in contact with the workpiece throughout its motion or its path.

• The exact path the tool takes in moving from point to point is in general immaterial (except that tool-traveling time must be minimized and not collide with workpiece and fixtures).

• A hole-drilling machine is a good PTP example.

NC part programming

• For a continuous path NC, the cutter is mostly in contact with the workpiece during its motion or its path.

• The workpiece is being affected throughout the toolpath.

• The entire travel of the cutting tool must be controlled to close accuracy as to both position and velocity.

• In general, mill and lathe are in this category NC part programming

• Among all, the most common ways to classify NC machines is by the number of axes that the control drives simultaneously to move and rotate the cutter with respect to workpiece or vice versa.

• Two-axis NC refers to machines that control cutter motion simultaneously along two orthogonal directions in a ; (i.e., X- and Y-axes).

• The cutter is independently controlled along the third axis, usually the Z- axis.

• Z-axis control is parallel to the normal direction of the X-Y plane. Different axes

NC part programming

• Three-axis motion is most common in many aspects.

• The cutter is generally controlled in three principal directions of the Cartesian coordinate system simultaneously.

• An add-on 4th axis rotary table can convert an existing 3-axis mill center into a full 4-axis CNC machine.

• The rotary table allows spindle access to the workpiece from various angles in one setup that might take several setups with a conventional 3-axis machine.

5-Axis CNC

• A 5-axis CNC mill in general provides simultaneous motion control in three linear directions (X-, Y-, and Z-axes) and two rotations, which usually are C (about Z-axis) and A (about X-axis), or C and B (about Y-axis).

https://xyzmachinetools.com/xyz-umc-5x/ NC part programming

• NC part programming consists of planning and documenting the sequence of processing steps to be performed on an NC machine.

• The outcome is an NC program used to machine a desired part.

• An NC program describes the sequence of actions of the controlled NC machine, which include but are not limited to the following: 1) Tool movements, including direction, velocity, and positioning 2) Tool selection, tool change, tool offsets, and tool compensation 3) Spindle rotation direction and spindle rotation speed 4) Cutting speed for different sequences 5) Application of cutting fluid FIXED ZERO v/s FLOATING ZERO

Fixed zero: • Origin is always located at some position on M/C table (usually at south west corner/Lower left-hand) of the tables & all tool location are defined W.R.T. this zero

Floating Zero: • Very common with CNC M/C used now a days. • Operator sets zero point at any convenient position on M/C table. • The Coordinate system is knows as work coordinate system (WCS) Modal and Non modal commands

• Commands issued in the NC program may stay in effect indefinitely (until they explicitly cancelled or changed by some other command), or they may be effective for only the one time that they are issued.

• The former are referred as Modal commands. Examples include feed rate selection and coolant selection.

• Commands that are effective only when issued and whose effects are lost for subsequent commands are referred to as non-modal commands.

• A dwell command, which instructs the tool to remain in a given configuration for a given amount of time, is an example of a non-modal command. CNC program structure

• There are four basic terms used in CNC programming Character -> Word -> Block -> Program

• Character is the smallest unit of CNC program. It can have Digit / Letter / Symbol.

• Word is a combination of alpha-numerical characters. This creates a single instruction to the CNC machine.

• Each word begins with a capital letter, followed by a numeral.

• These are used to represent axes positions, federate, speed, preparatory commands, and miscellaneous functions. CNC program structure

• Several commands are grouped together to accomplish a specific machining operation, hence the use of a block of information for each operation.

• Each command gives a specific element of control data, such as dimension or a feed rate. Each command within a block is also called a word.

• The way in which words are arranged within the block is called block format.

• Three different block formats are commonly used, (Fixed sequential format, Tab sequential format and Word address format) Steps in the development of a program

Manual Part Programming Methods

• ISO standards for coding • Co-ordinate function • Feed function • Speed function • Tool function • G Codes • M Codes Some Word addresses

• A Angular dimension around X axis • B Angular dimension around Y axis • C Angular dimension around Z axis • F Feed function • G Preparatory function • H Unassigned • I Distance to arc centre or thread lead parallel to X • J Distance to arc centre or thread lead parallel to Y • K Distance to arc centre or thread lead parallel to Z • Z Primary Z motion dimension Some Word addresses

• M Miscellaneous function • N Sequence number • O Reference rewind stop • S Spindle speed function • T Tool function • U Secondary motion dimension parallel to X* • V Secondary motion dimension parallel to Y* • W Secondary motion dimension parallel to Z* • X Primary X motion dimension • Y Primary Y motion dimension

G Codes or Preparatory Functions

• G00 Point-to-point positioning, rapid traverse • G01 Line interpolation • G02 Circular interpolation, clockwise (WC) • G03 Circular interpolation, anti-clockwise (CCW) • G04 Dwell • G13-G16 Axis designation • G17 XY plane designation • G18 ZX plane designation • G19 YZ plane designation • G33 Thread cutting, constant lead • G34 Thread cutting, linearly increasing lead • G35 Thread cutting, linearly decreasing lead • G40 Cutter compensation-cancels to zero • G41 Cutter radius compensation-offset left • G42 Cutter radius compensation-offset right • G43 Cutter compensation-positive • G44 Cutter compensation-negative

G Codes or Preparatory Functions

• G53 Deletion of zero offset • G54-G59 Datum point/zero shift • G63 Tapping cycle • G64 Change in feed rate or speed • G70 Dimensioning in inch units • G71 Dimensioning in metric units • G80 Canned cycle cancelled • G81-G89 Canned drilling and boring cycles • G90 Specifies absolute input dimensions • G91 Specifies incremental input dimensions • G92 Programmed reference point shift • G94 Feed rate/min (inch units when combined with G70) • G95 Feed rate/rev (metric units when combined with G71) • G96 Spindle feed rate for constant surface feed • G97 Spindle speed in revolutions per minute

Miscellaneous Functions, M • M00 Program stop, spindle and coolant off • M01 Optional programmable stop • M02 End of program-often interchangeable with M30 • M03 Spindle on, CW • M04 Spindle on, CCW • M05 Spindle stop • M06 Tool change • M07 Coolant supply No. 1 on • M08 Coolant supply No. 2 on • M09 Coolant off • M13 Spindle on, CW + coolant on • M14 Spindle on, CCW + coolant on • M19 Spindle stop at specified angular position • M30 Program stop at end tape + tape rewind

Commonly used word addresses

• N-CODE: Sequence number, used to identify each block with in an NC program and provides a means by which NC commands may be rapidly located. It is program line number. It is a good practice to increment each block number by 5 to 10 to allow additional blocks to be inserted if future changes are required.

• G-CODE: Preparatory Word, used as a communication device to prepare the MCU. The G-code indicates that a given control function such as G01, linear interpolation, is to be requested.

• X, Y & Z-CODES: Coordinates. These give the coordinate positions of the tool. Commonly used word addresses

• F-CODE : Feed rate. The F code specifies the feed in the machining operation.

• S-CODE: Spindle speed. The S code specifies the cutting speed of the machining process.

• T-CODE: Tool selection. The T code specifies which tool is to be used in a specific operation.

• M-CODE: Miscellaneous function. The M code is used to designate a particular mode of operation for an NC machine tool.

• I, J & K-CODES: They specify the centre of arc coordinates from starting. CNC program structure

Sequence and format of words:

N3 G2 X+1.4 Y+1.4 Z+1.4 I2.0 J2.0 K2.0 F5 S4 T4 M2 sequence no destination coordinates feed rate tool Other function dist to center of circle preparatory function spindle speed XY plane selection for vertical axis milling machines XY plane selection for horizontal axis milling machines Fig. 13.11 XZ plane selection for horizontal

axis milling machines

YZ plane selection for horizontal

Axis milling machines

G00 Rapid traverse

• When the tool being positioned at a point preparatory to a cutting motion, to save time it is moved along a straight line at Rapid traverse, at a fixed traverse rate which is pre-programmed into the machine's control system. • Typical rapid traverse rates are 10 to 25 m /min., but can be as high as 80 m/min.

• Syntax: N010 [G90/G91] G00 X10 Y10 Z5 G01 Linear interpolation (feed traverse)

• The tool moves along a straight line in one or two axis simultaneously at a programmed linear speed, the feed rate.

• Syntax: N010[G90/G91] G01 X10 Y10 Z5 F25 G02/G03 Circular interpolation

• N__ G02/03 X__ Y__Z__ I__ J__K__ F__ using the arc center or • N__ G02/03 X__ Y__Z__ R__ F__ using the arc radius

• The arc center is specified by addresses I, J and K. I, J and K are the X, Y and Z co-ordinates of the arc center with reference to the arc start point.

G02 moves along a CW arc G03 moves along a CCW arc G90 absolute position command

• When using a G90 absolute position command, each dimension or move is referenced from a fixed point, known as ABSOLUTE ZERO (part zero).

• Absolute zero is usually set at the corner edge of a part, or at the center of a square or round part, or an existing bore. ABSOLUTE ZERO is where the dimensions of a part program are defined from.

• Absolute dimensions are referenced from a known point on the part, and can be any point the operator chooses, such as the upper-left corner, center of a round part, or an existing bore.

Syntax: N.. G90 X.. Y.. Z.. A.. B.. C.. G91 incremental position command

• This code is modal and changes the way axis motion commands are interpreted. G91 makes all subsequent commands incremental. Zero point shifts with the new position.

Syntax: N.. G91 X.. Y.. Z.. A.. B.. C..

G70 & G71 (Inch & Metric) G 70 Inch data input

G 71 Metric data input

Syntax : N010 G70 G90 G94 G97 M04 Absolute (G90) and incremental

(G91) systems

N007 G90 G01 X5.0 Y10.0 N008 X25.0 Y15.0 N009 X35.0 Y5.0

N007 G91 G01 X5.0 Y10.0 N008 X20.0 Y5.0 N009 X10.0 Y-10.0 Cutter radius compensation G42

Manual Part Programming Ex.

5” 2.5” p4 p2 p3 p5

1”

Tool size = 0.25 inch, 5” Feed rate = 6 inch per minute, Cutting speed = 300 rpm, Tool start position: 2.0, 2.0 Programming in inches 45°

(4, 4) p1 Motion of tool: p0  p1  p2  p3  p4  p5  p1  p0 p0 (2, 2) 1. Set up the programming parameters

5” 2.5” p4 p2 p3 p5

1”

Programming in inches 5” Use absolute coordinates

Feed in ipm 45° N010 G70 G90 G94 G97 M04 (4, 4) p1 Spindle speed in rpm

p0 (2, 2) Spindle CCW 2. Set up the machining conditions

5” 2.5” p4 p2 p3 p5

1” Machine moves in XY-plane

Use full-circle interpolation 5” Feed rate

Spindle speed 45° N020 G17 G75 F6.0 S300 T1001 M08 (4, 4) p1 Tool no.

p0 (2, 2) Flood coolant ON 3. Move tool from p0 to p1 in straight line

5” 2.5” p4 p2 p3 p5

Linear interpolation 1” target coordinates

5” N030 G01 X3.875 Y3.698

45°

(4, 4) p1

p0 (2, 2) 4. Cut profile from p1 to p2

5” 2.5” p4 p2 p3 p5

1”

Linear interpolation

5” target coordinates

N040 G01 X3.875 Y9.125

45° or (4, 4) p1 N040 G01 Y9.125

p0 (2, 2) X-coordinate does not change  no need to program it 5. Cut profile from p2 to p3

5” 2.5” p4 p2 p3 p5 Linear interpolation

target coordinates 1”

N050 G01 X5.634 Y9.125

5”

y = 9 + 0.125 = 9.125 (6.5 - x)2 + 0.1252 = (1 - 0.125)2 x = 5.634 45° p3 (x, y) (4, 4) p1 (6.5, 9) .125

p0 (2, 2)

1” 6. Cut along circle from p3 to p4

5” 2.5” p4 p2 p3 p5

1”

circular interpolation, CCW motion

5” target coordinates

45° N060 G03 X7.366 Y9.125 I6.5 J9.0

(4, 4) coordinates of center of circle p1

p0 (2, 2) N060 G03 X7.366 Y9.125 I0.866 J-0.125 7. Cut from p4 to p5

5” 2.5” p4 p2 p3 p5

1”

5”

Linear interpolation

45° target coordinates (Y is unchanged)

(4, 4) N070 G01 X9.302 p1

p0 (2, 2) 8. Cut from p5 to p1

5” 2.5” p4 p2 p3 p5

1”

5” Linear interpolation

target coordinates (see step 3) 45° N080 G01 X3.875 Y3.698 (4, 4) p1

p0 (2, 2) 9. Return to home position, stop program

5” 2.5” p4 p2 p3 p5

1” Linear interpolation

5” target coordinates (see step 3)

N090 G01 X2.0 Y2.0 M30

45° end of data

(4, 4) N100 M00 p1

p0 (2, 2) program stop 10. Complete RS-274 program

N010 G70 G90 G94 G97 M04 N020 G17 G75 F6.0 S300 T1001 M08 N030 G01 X3.875 Y3.698 N040 G01 X3.875 Y9.125 N050 G01 X5.634 Y9.125 N060 G03 X7.366 Y9.125 I0.866 J-0.125 N070 G01 X9.302 N080 G01 X3.875 Y3.698 N090 G01 X2.0 Y2.0 M30 Simple G Code Example CNC Lathe

PART PROGRAM 2

Code Explanation N5 Clamping workpiece N5 M12 N10 Changing No.1 tool and executing its offset N10 T0101 N15 Rapidly positioning to A point N15 G0 X100 Z50 N20 Starting the spindle with 600 r/min N20 M3 S600 N25 Cooling ON N25 M8 N30 Approaching B point with 600mm/min N30 G1 X50 Z0 F600 N40 Cutting from B point to C point N40 Y-30 F200 N50 Cutting from C point to D point N50 X80 Y-20 F150 N60 Rapidly retracting to A point N60 G0 X100 Z50 N70 Cancelling the tool offset N70 T0100 N80 Stopping the spindle N80 M5 N90 Cooling OFF N90 M9 N100 Releasing workpiece N100 M13 N110 End of program, spindle stopping and Cooling OFF N110 M30 CNC MILLING EXAMPLE

CODE EXPLANATION

N5 absolute positioning, metric unit N5 G90 G71 N10 tool change to T1 N10 T1 M6 N15 define work zero point at A N15 G92 X-100 Y86 Z95 N20 rapid traverse to A, spindle on (2500 RPM, CW) N20 G0 X0 Y0 S2500 M3 N25 rapid plunge to 12.5 mm above Z0 N25 Z12.5 N30 feed to Z-12.5, feed rate 150 MMPM N30 G1 Z-12.5 F150 N35 cut line AB to B N35 X-20 Y30 N40 cut arc BC to C N40 G2 X10 Y100 R80 N45 cut line CD to D N45 G1 X140 Y60 N50 cut arc DE to E N50 G2 X150 Y0 R50 N55 cut line EA to A N55 G1 X0 Y0 N60 rapid retract to Z12.5 N60 G0 Z12.5 N65 reference point return in Z direction, spindle off N65 G91 G28 Z0 M5 N70 reference point return in X and Y directions N70 G91 G28 X0 Y0 N75 end of program N75 M30 SAMPLE PROGRAM ON DRILLING

Part program 4

N1 T16 M06 N2 G90 G54 G00 X0.5 Y-0.5 N3 S1450 M03 N4 G43 H16 Z1. M08 N5 G81 G99 Z-0.375 R0.1 F9. N6 X1.5 N7 Y-1.5 N8 X0.5 N9 G80 G00 Z1. M09 N10 G53 G49 Z0. M05 N11 M30 2. Set up the machining conditions Part program 4 Explanation

N1- Tool change (M06) to tool no.16 N2- Tool rapidly moves (G00) to first drilling position X0.5 Y-0.5 while taking into account Zero-offset-no. 1 (G54) N3- Drill starts rotating clockwise (M03) with 1450 rpm (S1450). N4- Drill takes depth Z1. taking into account tool length compensation (G43 H16), coolant is turned on (M08). N5- Drilling cycle (G81) parameters, drill depth (Z) and cutting feed (F) are given, with this command first drill is made at current position (X0.5 Y-0.5). N6- As drilling cycle continues it’s work with every axis movement so next drill is done at X1.5 N7- Third drilling hole at Y-1.5 N8- Fourth drill at X0.5 N9- Drilling cycle is cancelled (G80), Coolant is turned off (M09). N10- Taking Machine-coordinate-system (G53) into account the drill is taken to Z0 position. Tool length compensation is cancelled (G49), cutter rotation is stopped (M05). N11- CNC part-program is ended.

Computer-Assisted Part

Programming

• APT or Automatically Programmed Tool, is a high-level computer programming language most commonly used to generate instructions for numerically controlled machine tools.

• APT uses language statements to define part shape and tool motion as well as machine tool-dependent data (e.g., feed rates and spindle speeds). The general procedures of generating APT source codes involve the following steps: 1. Identify part geometry. 2. Identify cutter motions, feeds, speeds, and cutter parameters. 3. Code the geometry, cutter motions, and general machine instructions into the part programming languages. The code is known as source.

Computer-Assisted Part

Programming

4. Compile or process the source to produce the machine-independent list of cutter movements and auxiliary machine control information, known as the cutter location data file (or CL data).

5.An APT processor program is used to read these statements, interpret the meanings, and perform all the necessary calculations to generate a series of cutter location points that define the toolpath. 6.The generalized APT output (usually in CL data) is converted to the particular format G-code required by the CNC machine using a post- processor program.

7.The CL data file contains (mainly) details of cutter moves, either as a series of absolute linear GOTO moves or relative GODLTA moves. Computer-Assisted Part

Programming

Note that the CL data is different from APT. The CL data is defined by the International Organization for Standardization (ISO).

• 7. Postprocess the CL Data to produce MCD for the particular target CNC machine.

• 8. Transmit the MCD to CNC machine and verify it.

Computer-Assisted Part Programming

• Sequence of activities in computer-assisted part programming Automatically Programmed Tool

• A major advantage of APT is that it has developed into an accepted standard for machine tools, in addition to alleviating the burden of coding at the very basic level.

• A prime disadvantage of APT is that it uses English-like commands to define geometry instead of the much more convenient graphical methods.

• Note that the APT-type programming approach is being gradually replaced by the more advanced CAD/CAM approach. Automatically Programmed Tool

• Desired toolpath and geometry entities identified and labeled

Chang, 2003. Product Manufacturing and Cost Estimating using CAD/CAE. Elsevier Inc.

APT Source code

Chang, 2003. Product Manufacturing and Cost Estimating using CAD/CAE. Elsevier Inc.

CAD/CAM Approach

• The CAD/CAM approach is the most popular and advanced approach in generating CNC codes.

• The process starts with creating a reference (or design) model and workpiece, and then assembling them in assembly mode.

• After the solid models are assembled, users define manufacturing set up, including choosing a workcell (e.g., a 3-axis mill) and coordinate system (or machine zero).

• Then, users create a machining sequence (e.g., a profile-milling sequence). CAD/CAM Approach

• In the meantime, users choose a cutter and specify machining parameters (e.g., federate, spindle speed).

• At this point, a machining sequence is completely defined. CAD/CAM will generate a toolpath; the toolpath was created using Pro/MFG for this example.

• The profile-milling sequence can also be simulated (e.g., in Vericut).

• Note that Vericut is a third-party software that is integrated to Pro/MFG for CNC simulation and G-code verification.

CAD/CAM Approach

• In addition, the toolpath generated can be output as a CL data file.

• The CL data can be converted to MCD using a proper post-processor that supports CNC machines at shop floor.

• As an example, the MCD is post processed for a HAAS CNC mill, which is also called a tap file.

• In the rest of the chapter, we will focus on the CAD/CAM approach from a broader aspect, that is, virtual machining simulations in support of product design

Example 5

The component to be machined is shown in Fig. It is assumed that the pocket is through and hence only outside is to be machined as a finish cut of the pocket. The tool to be used is a 20 mm diameter slot drill. If an end mill is to be used the program should be modified with a hole to be drilled at B first before the end mill is used. The setting is done with point A as reference (0, 0, 0) and the reference axes are along X and Y directions. Part Program 5

Example 6

  Y  R tan    2  Part Program 6

Canned Cycles

• Canned cycle or fixed cycles are the G-codes used to combine a number of common motions that are used with some types of operations such as drilling of holes.

N G81 X Y Z R Canned cycle Example 7

N010 G81 X25.0 Y35.0 Z-18.0 R2.0 F125 * N015 X55.0 Y50.0 * N020 X75.0 Y70.0 * N025 G80 X0 Y0 Z50 * Standard canned cycle motions Canned Feed from At programmed depth Used for cycle surface (end of feed point) number Dwell Spindle Spindle speed return motion G80 Off -- Stop -- Cancel canned cycle G81 Constant -- -- Rapid Drilling, centre drilling G82 Constant Yes -- Rapid Counter sinking, Counter G83 Intermitten -- -- Rapid boring G84 t -- Reverse Feed Deep hole drilling G85 Constant -- -- Feed Tapping G86 Constant -- Stop Rapid Reaming G87 Constant -- Stop Manual Boring G88 Constant Yes Stop Manual Multiple Boring G89 Constant Yes -- Feed Boring Constant Boring F Example 8

The component to be machined is shown in Fig. Write a program using canned cycles to drill all the holes. Part Program 8

Simulation of the program for example

Example 9

A complete part program using the ISO codes for the following component for the different holes present in the component shown in Fig. The cutting speed to be used is 50 m/min and the feed rate is 0.08 mm/rev. Use the lower left hand corner of the part as the datum. Part Program 9

Given V = 50 m/min and f = 0.08 mm/rev 1000 V 1000  50 Spindle speed, N =   2273.64 rpm  D  7

Feed to be used = 0.080 × 2200 = 176 mm/min

Op. Description Tool required Spindle, Feed, No. RPM mm/min 10 Drill two holes Twist drill 7 mm dia 2200 175 20 Counter bore two holes End mill 10 mm dia 1590 125 30 Drill two holes Twist drill 5 mm dia 3180 250 40 Bore the two holes Boring bar 5.5 mm dia 2890 230 50 Ream two holes Reamer 6 mm dia 2650 210 Part Program 9

% O1308 (P N Rao) N010 G71 G92 X0 Y0 Z50 (September 22, 2008) N015 G90 (Stock 75 x 50 x 20mm) N020 T01 S2200 M06 (Drill 7 mm diameter) N025 G81 X12.5 Y37.5 Z-22.0 R2.0 (Start drilling) F175 M03 N030 X62.5 Y12.5 (End of cycle) N035 G80 X-50.0 Z50.0 N040 T02 S1590 M06 (End mill 10 mm N045 G82 X12.5 Y37.5 Z-7.0 P1.0 diameter) R2.0 F125 N050 X62.5 Y12.5 N055 G80 X-50.0 Z50.0 (End of cycle) Part Program 9

N060 T03 S3180 M06 (Drill 5 mm diameter) N065 G81 X12.5 Y12.5 Z-22.0 R2.0 F250 N070 X62.5 Y37.5 (End of cycle) N075 G80 X-50.0 Z50.0 N080 T04 S2890 M06 (Bore 5.5 mm diameter) N085 G86 X12.5 Y12.5 Z-22.0 R2.0 (Boring cycle) F230 N090 X62.5 Y37.5 (End of cycle) N095 G80 X-50.0 Z50.0 N100 T05 S2650 M06 (Reamer 6 mm diameter) N105 G85 X12.5 Y12.5 Z-22.0 R2.0 (Reaming cycle) F210 N110 X62.5 Y37.5 (End of cycle) N115 G80 X-50.0 Z50.0 M05 N120 G00 X-50.0 Y-50.0 N130 M02 (End of program) Fig. 13.41 Simulation of the program for example 13.8

Example 10

N035 X32.0 Z1.0; N040 G97 F0.3; N045 G90 X26.0 Z-25.0; N050 X 22.0 Z-25.0; N055 X19.0 Z-25.0; N060 X16.0 Z-25.0; N065 G00 X40.0 Z50.0; N070 M06 T0202; N075 G42; N080 Z2.0 X-1.0; N085 G01 Z0 F0.3; N090 X13.0; N095 X15.0 Z-2.0; N100 Z-25.0; N105 X31.0; N110 G00 X40.0 Z50.0; Summary

• How the programming works in NC machines? • Various axial motions? • Various types of Part programming? • Various Preparatory and Miscellaneous codes used. • How to do Manual part programming? • What is Computer assisted programming? • How to do Part programming using APT? • CAD/CAM programming Thank you