undertaken at



Under the Guidance of Mr.Sanjeev Kumar Mr.Tejinder Singh HOD



I hereby declare that the project work entitled COMPUTER NUMERICALLY CONTROLLED MACHINES is an authentic record of my own work carried out at BHEL (GO+NDWAL) as requirements of six months Industrial Training for the award of the degree of B.E. at University Institute of Engineering & Technology, Panjab University, Chandigarh under the guidance of Mr.Tejinder Singh and Mr.Sanjeev, during January 4,2013 to July 3, 2013


Date : June 12, 2013

Certified that the above statement made by the student is correct to the best of our knowledge and belief.

Mr.Sanjeev Kumar

Mr.Tejinder Singh HOD





  Introduction Configuration of CNC Systems 12
Input Device Machine Control Unit Machine Tool Driving System Feedback Systems Display Unit 13 15 15 16 17 21


        


23 24 27 29 31 37 41 42 44



showing a growth of 17 per cent over the previous year. 5 . BHEL was established more than 50 years ago when its first plant was setup in Bhopal ushering in the indigenous Heavy Electrical Equipment Industry in India.BHARAT HEAVY ELECTRICALS LTD. A dream which has been more than realized with a well recognized track record of performance it has been earning profits continuously since 1971-72 and achieved a turnover of Rs 2. It finds place among the top class companies of the world for manufacture of electrical equipments.658 crore for the year 2007-08. Bharat Heavy Electricals Limited is country’s ‘Navratna’ company and has earned its place among very prestigious national and international companies.

Power Generation's & Transmission. Transportation. BHARAT HEAVY ELECTRICALS LTD. Telecommunication. Industry. and ISO 14001 certification for environment management and OHSAS – 18001 certification for Occupational Health and Safety Management Systems. The Company today enjoys national and international presence featuring in the “Fortune International -500” and is ranked among the top 10 companies in the world. An Overview: 6 . etc. Renewable Energy. BHEL is the only PSU among the 12 Indian companies to figure in “Forbes Asia Fabulous 50” list.BHEL caters to core sectors of the Indian Economy viz. Defense. manufacturing power generation equipment.. BHEL has already attained ISO 9000 certification for quality management.

vacuum – and SF circuit breakers gas insulated switch gears and insulators. shunt compensation systems (for power factor and voltage improvement) and HVDC systems (for economic transfer of bulk power).      Power Industry Transportation Transmission Defenses etc. dry type transformers. capacitor tanks. making profits continuously since 1971-72. career planning. BHEL has indigenously developed the state-of-the-art 7 . Products manufactured include power transformers. Every participative style of management all these have engendered development of a committed and motivated workforce setting new benchmarks in terms of productivity. The company is striving to give shape to its aspirations and fulfill the expectations of the country to become a global player. A strong engineering base enables the Company to undertake turnkey delivery of electric substances up to 400 kV level series compensation systems (for increasing power transfer capacity of transmission lines and improving system stability and voltage regulation). quality and responsiveness. BHEL business operations cater to core sectors of Indian Economy like.  POWER TRANSMISSION & DISTRIBUTION (T & D) BHEL offer wide ranging products and systems for T & D applications. series – and stunt reactor. employee is given an equal opportunity to develop himself and grow in his career. BHEL's vision is to become a world-class engineering enterprise. The greatest strength of BHEL is its highly skilled and committed employees. Continuous training and retraining.BHEL today is the largest Engineering Enterprise of its kind in India with excellent track record of performance. instrument transformers. a positive work culture. committed to enhancing stakeholder value.

diesel-electric locomotives from 350 HP to 3100 HP.. overhead equipment cars. fluidized bed combustion boilers. sugar. industrial boilers and auxiliaries. In the area of rolling stock. The range of system & equipment supplied includes: captive power plants. electrical multiple units and metro cars. co-generation plants DG power plants. heat exchangers and pressure vessels.  INDUSTRIES BHEL is a major contributor of equipment and systems to industries.controlled shunt reactor (for reactive power management on long transmission lines). valves. electrical machines. light rail systems etc. seamless steel tubes. gas turbines. chemical recovery boilers and process controls. Special well wagons. engineering. The electric and diesel traction equipment on India Railways are largely powered by electrical propulsion systems produced by BHEL. The company also undertakes retooling and overhauling of rolling stock in the area of urban transportation systems. and maintenance and after-sales service of Rolling Stock and traction propulsion systems. petrochemicals. production. BHEL is geared up to turnkey execution of electric trolley bus systems. Water heat recovery boilers. both for mainline and shunting duly applications. installation. fabric filters. electrostatic precipitators. reactors. refinances. Besides traction propulsion systems for in-house use. oil and gas. paper. fertilizer. pumps. industrial steam turbines. centrifugal compressors. BHEL manufactures electric locomotives up to 5000 HP. metallurgical and other process industries. marketing. Rail-cum-road vehicle etc. BHEL is also diversifying in the area of port handing equipment and pipelines transportation system. BHEL manufactures traction propulsion systems for other rolling stock producers of electric locomotives. diesel-electric locomotives.. Presently a 400 kV Facts (Flexible AC Transmission System) project under execution.  TRANSPORTATION BHEL is involved in the development design. cement. 8 . BHEL is also producing rolling stock for special applications viz.

Electrically controlled servo systems permits the slides of amachine tool to be driven simultaneously and at the apporopriate feeds anddirection so that complex shapes can be cut. solar photovoltaic systems. Spindle and Spindle bearings.Drilling machines etc. Guideways. Theinformation stored in the computer can be read by automatic means andconverted into electrical signals.This difference arises from the requirements of higher performance levels. However. 9 . Flame cutters. Gauging. the quality and reliability of these machines depends on the various machine elements and subsystems of the machines.Computer Numerically Control can be applied to milling machines. Grinding machines. Measuringsystems. Boring machines. Feed drives. which operate the electrically controlledservo systems. transportation.Lathe machines. Controls. for example Machinestructure.The control of a machine tool by means of stored information throughthe computer is known as Computer Numerically Controlled.The CNC machines often employ the various mechatronics elements thathave been developed over the years. There are some of the important constituents parts and aspectsof CNC machines to be considered in their designing. RENEWABLE ENERGY Technologies that can be offered by BHEL for exploiting non-conventional and renewable sources of energy include: wind electric generators. solar lanterns and battery-powered road vehicles. infrastructure and other potential areas. Toolmonitoring. The Company has taken up R&D efforts for development of multi-junction amorphous silicon solar cells and fuel based systems. Software and Operator interface.  MISSION The leading Indian engineering enterprise providing quality products systems and services in the fields of energy. often with a single operationand without the need to reorient the workpiece. The design and construction of Computer Numerically Controlled(CNC) machines differs greatly from that of conventional machine tools.

BHEL has proved its capability to undertake projects on fast-track basis. financing packages etc. substation projects.International Operations BHEL has. Azerbaijan. and execution of four prestigious power projects in Oman. switchgears. like transformers. rehabilitation projects. photo-voltaic equipment etc. Some of the other major successes achieved by the Company have been in Australia. In addition to demonstrated capability to undertake turnkey projects on its own. Technology Upgradation and Research & Development To remain competitive and meet customers' expectations. Cyprus. besides a wide variety of products. ranging for the United States in the West to New Zealand in the Far East. Egypt. Executing of Overseas projects has also provided BHEL the experience of working with world renowned Consulting Organisations and inspection Agencies. and development of new products. centrifugal compressors. Apart from over 1110MW of boiler capacity contributed in Malaysia. Greece. quality and other requirements viz extended warrantees. Sri Lanka. Malta. be it captive power plants. associated O&M. BHEL possesses the requisite flexibility to interface and complement with International companies for large projects by supplying complementary equipment and meeting their production needs for intermediate as well as finished products. The company has been successful in meeting varying needs of the industry. The Company has upgraded its products to contemporary levels through continuous in 10 . The Company has been successful in meeting demanding customer's requirements in terms of complexity of the works as well as technological. heat exchangers. These references encompass almost the entire product range of BHEL. castings and forgings. insulators. Iraq etc. Libya. BHEL lays great emphasis on the continuous upgradation of products and related technologies. well-head equipment. valves. Saudi Arabia. Bangladesh. established its references in around 60 countries of the world. hydro and gas-based types. utility power generation or for the oil sector requirements. over the years. covering turnkey power projects of thermal.

The Company has also transferred a few technologies developed in-house to other Indian companies for commercialization. 11 . circulating fluidized bed combustion boilers. The Corporate R&D Division at efforts as well as through acquisition of new technologies from leading engineering organizations of the world. Products developed in-house during the last five years contributed about 8. in the recent past. several state-of-the-art products developed inhouse: low-NQx oil / gas burners. leads BHEL's research efforts in a number of areas of importance to BHEL's product range. petroleum depot automation systems.6% to the revenues in 2000-2001. 36 kV gas-insulated sub-stations. BHEL's Investment in R&D is amongst the largest in the corporate sector in India. spread over a 140 acre complex. Research and product development centers at each of the manufacturing divisions play a complementary role. etc. high-efficiency Pelton hydro turbines. BHEL has introduced.

A Vertical Machining Center 12 . a CNC system receieves numerical data.” In a simple word.PROJECT REPORT CNC SYSTEMS The definition of CNC given by Electronic Industry Association (EIA) is as follows: “A system in which actions are controlled by the direct insertion of numerical data at some point. interpret the data and then control the action accordingly. The system must automatically interpret at least some portion of this data.

DVD. The machine follows a predetermined sequence of machining operations at the predetermined speeds necessary to produce a work piece of the right shape and size and thus according to completely predictable results. Working together. Control algorithm may cause errors while computing. The PLC controls the peripheral actuating elements of the machine such as solenoids. etc. although it was initially developed to control the motion and operation of machine tools. relay coils. It calculates the traversing path of the axes as defined by the inputs. the system resolution and the basic mechanical machine accuracy. USB flash drive. as per the sequence programmed into it. Positioning and part accuracy depend on the CNC system's computer control algorithms. depending on the machining operations. hard disk. but when mechanical machine inaccuracy is present. Computer Numerical Control (CNC) is a specialized and versatile form of Soft Automation and its applications cover many kinds.INTRODUCTION Numerical control (NC) is a method employed for controlling the motions of a machine tool slide and its auxiliary functions with input in the form of numerical data. spindles. but they are very negligible. Though this does not cause point to point positioning error. CD ROM. it will result in poorer part accuracy. Computer Numerical Control may be considered to be a means of operating a machine through the use of discrete numerical values fed into the machine. A computer numerical control (CNC) is a microprocessor-based system to store and process the data for the control of slide motions and auxiliary functions of the machine tools. which will reflect during contouring. The NC controls the spindle movement and the speeds and feeds in machining. The CNC systems are constructed with a NC unit integrated with a programmable logic controller (PLC) and some times with an additional external PLC (non-integrated). etc. where the required 'input' technical information is stored on a kind of input media such as floppy disk. The main advantage of a CNC system lies in the fact that the skills of the operator hitherto required in the operation of a conventional machine is removed and the part production is made automatic. the NC and PLC enable the machine tool to operate automatically. or RAM card etc. A different product can 13 . The CNC system is the heart and brain of a CNC machine which enables the operation of various machine members such as slides.

Hitachi Seiki VA35 CNC Machining Center 14 .be produced through reprogramming and a low-quantity production run of different products is justified.

Hitachi Seiki VA35 CNC Machining Center 15 .

e. c. shows a schematic diagram of the working principle of a NC axis of a CNC machine and the interface of a CNC control.1 Schematic diagram of a CNC machine tool     Proximity switches Limit switches Relay coils Pressure switches Float switches  A CNC system consists of the following 6 major elements: a. CNC system P L C Command value Servo Drive Servo Motor Spindle Head Encoder N C Velocity Feedbac k Tape Reader Tape Punch Other Devices Tacho Generator Lead Screw Work piece Table Position Feedback  Inputs Output Machine Elements s Fig.CONFIGURATION OF THE CNC SYSTEM Fig. Input Device Machine Control Unit Machine Tool Driving System Feedback Devices Display Unit 16 . f. b. d.

Input Devices
a. Floppy Disk Drive Floppy disk is a small magnetic storage device for CNC data input. It has been the most common storage media up to the 1970s, in terms of data transfer speed, reliability, storage size, data handling and the ability to read and write. Furthermore, the data within a floppy could be easily edited at any point as long as you have the proper program to read it. However,this method has proven to be quite problematic in the long run as floppies have a tendency to degrade alarmingly fast and are sensitive to large magnetic fields and as well as the dust and scratches that usually existed on the shop floor.

b. USB Flash Drive A USB flash drive is a removable and rewritable portable hard drive with compact size and bigger storage size than a floppy disk. Data stored inside the flash drive are impervious to dust and scratches that enable flash drives to transfer data from place to place. In recent years, all computers support USB flash drives to read and write data that make it become more and more popular in CNC machine control unit.

USB Flash Drive c. Serial communication The data transfer between a computer and a CNC machine tool is often accomplished through a serial communication port. International standards for serial communications are

established so that information can be exchanged in an orderly way. The most common interface between computers and CNC machine tools is referred to the EIA Standard RS-232. Most of the personal computers and CNC machine tools have built in RS232 port and a standard RS-232 cable is used to connect a CNC machine to a computer which enables the data transfer in reliable way. Part programs can be downloaded into the memory of a machine tool or 17

uploaded to the computer for temporary storage by running a communication program on the computer and setting up the machine control to interact with the communication software.

SerialCommunication in a Distributed Numerical Control System

Direct Numerical Control is referred to a system connecting a set of numerically
controlled machines to a common memory for part program or machine program storage with provision for on-demand distribution of data to the machines. (ISO 2806:1980) The NC part program is downloaded a block or a section at a time into the controller. Once the downloaded section is executed, the section will be discarded to

leave room for other sections. This method is commonly used for machine tools that do not have enough memory or storage buffer for large NC part programs. Distributed Numerical Control is a hierarchical system for distributing data between a production management computer and NC systems. (ISO 2806:1994) The host computer is linked with a number of CNC machines or computers connecting to the CNC machines for downloading part programs. The communication program in the host computer can utilize two-way data transfer features for production data communication including: production schedule, parts produced and machine utilization etc.


Machine Control Unit (MCU)
The machine control unit is the heart of the CNC system. There are two sub-units in the machine control unit: the Data Processing Unit (DPU) and the Control Loop Unit (CLU).

a. Data Processing Unit On receiving a part programme, the DPU firstly interprets and encodes the part programme into internal machine codes. The interpolator of the DPU then calculate the intermediate positions of the motion in terms of BLU (basic length unit) which is the smallest unit length that can be handled by the controller. The calculated data are passed to CLU for further action.

b. Control Loop Unit The data from the DPU are converted into electrical signals in the CLU to control the driving system to perform the required motions. Other functions such as machine spindle ON/OFF, coolant ON/OFF, tool clamp ON/OFF are also controlled by this unit according to the internal machine codes.

Machine Tool
This can be any type of machine tool or equipment. In order to obtain high accuracy and repeatability, the design and make of the machine slide and the driving lead screw of a CNC machine is of vital importance. The slides are usually machined to high accuracy and coated with anti-friction material such as PTFE and Turcite in order to reduce the stick and slip phenomenon. Large diameter recirculating ball screws are employed to eliminate the backlash and lost motion. Other design features such as rigid and heavy machine structure; short machine table overhang, 19

Three types of electrical motors are commonly used. This is the simplest device that can be applied to CNC 20 . This system usually uses electric motors although hydraulic motors are sometimes used for large machine tools.quick change tooling system. The motor is coupled either directly or through a gear box to the machine lead screw to moves the machine slide or the spindle. etc also contribute to the high accuracy and high repeatability of CNC machines. Different Machine Tools Driving System The driving system is an important component of a CNC machine as the accuracy and repeatability depend very much on the characteristics and performance of the driving system. Stepping Motor A stepping motor is a device that converts the electrical pulses into discrete mechanical rotational motions of the motor shaft. The requirement is that the driving system has to response accurately according to the programmed instructions.

2. low resolution and easy to slip in case of overload. It is not necessary to have any analog-to-digital converter nor feedback device for the control system. stepping motors are not commonly used in machine tools due to the following drawbacks: slow speed. 1. X-Y tape control. low torque. daisy-wheel type printer. and CNC EDM Wire-cut machine. Stepping Motor FEEDBACK SYSTEMS Following are the two types of control systems used in the CNCmachines 1. Closed loop control system.machines since it can convert digital data into actual mechanical displacement. Examples of stepping motor application are the magnetic head of floppy-disc drive and hard disc drive of computer. Open loop control system:21 . Open loop control system. They are ideally suited to open loop systems. However.

Although morecostly and complex than open loop system. The correctmovement of slide entirely d epends upon the ability of the drivesystems to move the slide through the required exact distance. sends back a signal to thecontrol unit from a measuring device called as transducer.The most common method of driving the lead screw is by a stepper motor. As there is no check onthe slide position. Thetransducer is attached to the slide ways. these system gives moreaccurate positioning. For this type of system. The signal indicates the actualmovement and position of the slides. The stepper motors are the simplest way for converting detailelectrical signals into proportional movement. Closed loop control system:A closed loop system is as shown in fig. the system accuracy depends upon the motors abilityto step through the exact number of steps provided at the input asshown in fig. this system has feedback.The control unit continues to adjust the position of the slide untilit arrives it’s destination. 2. servomotors are used 22 . Hence there is no measurement of slide position and nofeedback signals for comparison with the input signal.In an open loop system the machine slides are displacedaccording to the information loaded from the part program into thecontrol system.

23 .

a. this error can be compensated for by the machine builder in the machine calibration process. Positional Feed Back Devices There are two types of positional feed back devices: linear transducer for direct positional measurement and rotary encoder for angular or indirect linear measurement. This device cannot measure linear displacement directly so that error may occur due to the backlash of screw and motor etc. Linear Transducer (Courtesy of Heidenhain) Rotary Encoders . positional feed back device and velocity feed back device. Linear Transducers . the positional values and speed of the axes need to be constantly updated. etc would not cause any error in the feed back data.Feedback Device In order to have a CNC machine operating accurately. 24 . Two types of feed back devices are normally used.A rotary encoder is a device mounted at the end of the motor shaft or screw to measure the angular displacement.A linear transducer is a device mounted on the machine table to measure the actual displacement of the slide in such a way that backlash of screws. Generally. This device is considered to be of the highest accuracy and also more expensive in comparison with other measuring devices mounted on screws or motors. motors.

b. the feed rate. Velocity Feedback Device The actual speed of the motor can be measured in terms of voltage generated from a tachometer mounted at the end of the motor shaft. etc. Much other important information about the CNC system can also displayed for 25 . The voltage generated is compared with the command voltage corresponding to the desired speed. the spindle RPM. The difference of the voltages can is then used to actuate the motor to eliminate the error. DC tachometer is essentially a small generator that produces an output voltage proportional to the speed. the Display Unit displays the present status such as the position of the machine slide. When the machine is running. the Display Unit can show the graphics simulation of the tool path so that part programmes can be verified before the actually machining. the part programmes. Tachogenerator (Courtesy of Callan) Display Unit The Display Unit serves as an interactive device between the machine and the operator. In an advanced CNC machine.

error massages and diagnostic data. logic diagram of the programmer controller.maintenance and installation work such as machine parameters. A Display Unit 26 .

and C axis). Y Z x Axis of Motion 27 . namely. B. Y and Z axis) and 3 rotational axes (A. 3 linear axes (X. To understand the G-codes and other functions of a CNC Part Programme. To understand the structure of a CNC Part Programme.CNC PART PROGRAMMING Objectives: To understand the Dimension Systems in CNC Part Programming. In other words. motion can be resolved into 6 axes. Axis of motion In generally. all motions have 6 degrees of freedom.

Positioning reference point Systems: 1.Programming Systems Two types of programming modes. and knee are explained here using a vertical milling machine as an example: A workpiece dimensioned in the incremental system mode 28 .Incremental 2.Absolute Most controls on machine tools today are capable of handling either incremental or absolute programming. and no system is either right or wrong all the time. the incremental system and the absolute system. Both systems have applications in CNC programming. Incremental program locations are always given as the distance and direction from the immediately preceding point . spindle. Command codes which tell the machine to move the table. are used for CNC.

• A “X plus” (X+) command will cause the cutting tool to be located to the right of the last point. • A “Z minus” (Z-) moves the cutting tool down or into the workpiece. • A “X minus” (X-) command will cause the cutting tool to be located to the left of the last point. the G91 command indicates to the computer and MCU (Machine Control Unit) that programming is in the incremental mode. • A “Z plus” (Z+) command will cause the cutting tool or spindle to move up or away from the workpiece. 29 . In incremental programming. • A “Y plus” (Y+) command will cause the cutting tool to be located toward the column. • A “Y minus” (Y-) will cause the cutting tool to be located away from the column.

The zero or origin point may be a position on the machine table. • A “X minus” (X-) command will cause the cutting tool to be located to the left of the zero or origin point. A workpiece dimensioned in the absolute system mode.Absolute program locations are always given from a single fixed zero or origin point (Fig. • A “Y plus” (Y+) command will cause the cutting tool to be located toward the column. Note: All dimensions are given from a known point of referenc • A “X plus” (X+) command will cause the cutting tool to be located to the right of the zero or origin point. each point or location on the workpiece is given as a certain distance from the zero or reference point. In absolute dimensioning and programming. such as the corner of the worktable or at any specific point on the workpiece. 30 . 7).

Point-to-point positioning is the process of positioning from one coordinate (XY) position or location to another. or the workpiece mounted on the machine table. the G90 command indicates to the computer and MCU that the programming is in the absolute mode. 9). and continuing this pattern until all the operations have been completed at all programmed locations. CNC POSITIONING SYSTEM Point-To-Point OR Positioning Continuous Path OR Contouring Point-to-Point Positioning Point-to-point positioning is used when it is necessary to accurately locate the spindle. performing the machining operation. 31 . at one or more specific Iocations to perform such operations as drilling.• A “Y minus” (Y-) command will cause the cutting tool to be located away from the column. and punching (Fig. The difference between the two categories was once very distinct. Now. A knowledge of both programming methods is necessary to understand what applications each has in CNC. most control units are able to handle both point-topoint and continuous path machining. boring. In absolute programming. tapping. reaming. Point-to-Point or Continuous Path CNC programming falls into two distinct categories . however.

where the cutting tool is in contact with the workpiece as it travels from one programmed point to the next. involves work such as that produced on a lathe or milling machine. but points 2 and 3 require that motion along both the X and Y axes takes place.The path followed by point-to-point positioning to reach various programmed points (machining locations) on the XY axis. In Fig. above. As the distance in the X direction is greater than in the Y direction. Continuous path positioning is the ability to control motions on two or more machine axes simultaneously to keep a constant cutter-workpiece relationship. Continuous Path (Contouring) Contouring.(Fig. and the machine moves only along the X axis. on next page) 32 . point 1 to point 2 is a straight line. The programmed information in the CNC program must accurately position the cutting tool from one point to the next and follow a predefined accurate path at a programmed feed rate in order to produce the form or contour required. A similar motion takes place between points 3 and 4. Y will reach its 15 position first. leaving X to travel in a straight line for the remaining distance. or continuous path machining.

circular. helical. and most controls are capable of both linear and circular interpolation. This ability to merge individual axis points into a predefined tool path is built into most of today’s MCUs. Helical. There are five methods of interpolation: linear. parabolic. and cubic. and cubic 33 . All contouring controls provide linear interpolation.Fig. parabolic. 10 Types of contour machining (A) Simple contour. (B) complex contour Interpolation The method by which contouring machine tools move from one programmed point to the next is called interpolation.

An example of two-axis linear interpolation. whether the points are close together or far apart . Curves can be produced with linear interpolation by breaking them into short. because a very large number of points would have to be programmed to describe the curve in order toproduce a contour shape. the end point of one line or segment becomes the start point for the next segment. and so on. Circular Interpolation The development of MCUs capable of circular interpolation has greatly simplified the process of programming arcs and circles. Therefore. such as aerospace parts and dies for car bodies. throughout the entire program. This method has limitations. 12). A contour programmed in linear interpolation requires the coordinate positions (XY positions in two-axis work) for the start and finish of each line segment. Linear Interpolation Linear Interpolation consists of any programmed points linked together by straight lines. straight-line segments.interpolation are used by industries that manufacture parts which have complex shapes. To program an arc (Fig. the MCU requires only the coordinate 34 .

positions (the XY axes) of the circle center. etc.. which conform to EIA (Electronic Industries Association) standards. micro-switches. The information required may vary with different MCUs. . are in a logical sequence called a block of information. Each block should contain enough information to perform one machining operation. 35 . and direction of cut. relays. and the direction in which the arc is to be cut (clockwise or counterclockwise) See Fig. For two-dimensional circular interpolation the MCU must be supplied with the XY axis. start point. the radius of the circle. radius. Programming Format Word address is the most common programming format used for CNC programming systems. to manufacture a part. end point. This format contains a large number of different codes (preparatory and miscellaneous) that transfers program information from the part print to machine servos. These codes. the start point and end point of the arc being cut.

M. 13. feed rate. speed. and/or Z axis of a machine tool. The format used on any CNC machine is built in by the machine tool builder and is based on the type of control unit on the machine. and T are used for machine functions such as feed. or S. G02. The code G91. such as X. A variableblock format which uses words (letters) is most commonly used. G. which cause some movement 36 . G03. D. or speed value. tells the control that all measurements are in the absolute mode. Fig. containing codes G00. must be put in a format that the machine control unit can understand. Codes The most common codes used when programming CNC machines tools are G-codes (preparatory functions). tells the control that measurements are in the incremental mode. Y. The address code G90 in a program. G-codes are sometimes called cycle codes because they refer to some action occurring on the X. cutter diameter offset. Numerical data follows this address character to identify a specific function such as the distance. Y. The G-codes are grouped into categories such as Group 01. tool number. Each instruction word consists of an address character. Z. Other codes such as F.Word Address Format Every program for any part to be machined. etc. S. G01. and M codes (miscellaneous functions).

/min (5 and 20 m/min). • G02 (clockwise) and G03 (counterclockwise) are used for arcs and circles (circular interpolation) 37 . • G01 is used for straight-line movement (linear interpolation). Although the rate of rapid travel varies from machine to machine. either the X or Y axis can be moved individually or both axes can be moved at the same time. Group 03 includes either absolute or incremental programming.of the machine table or head. During the rapid traverse movement. The G01. A G00 code rapidly positions the cutting tool while it is above the workpiece from one point to another point on a job. while Group 09 deals with canned cycles. and G03 codes move the axes at a controlled feedrate. G02. it ranges between 200 and 800 in.

) Metric input (mm) Radius programming (**) Return to reference point Return from reference point Thread cutting (**) Cutter compensation cancel Cutter compensation left Cutter compensation right Tool length compensation positive 08 G49 Tool length compensation cancel 38 .G.Codes Group Code Function 01 01 01 01 G00 G01 G02 G03 Rapid positioning Linear interpolation Circular interpolation clockwise (CW) Circular interpolation counterclockwise (CCW) 06 06 G20* G21* G24 00 00 G28 G29 G32 07 07 07 08 (+) direction 08 direction G44 Tool length compensation minus (-) G40 G41 G42 G43 Inch input (in.

G84 03 03 G90 G91 Canned turning cycle (**) Absolute programming Incremental programming (*) . these may be G70 (inch) and G71 (metric) (**) .refers only to CNC lathes and turning centers M CodesCode M00 M01 M02 M03 M04 M05 M06 M08 M09 M10 Function Program stop Optional program stop Program end Spindle on clockwise Spindle on counterclockwise Spindle stop Tool change Coolant on Coolant off Clamps on 39 .on some machines and controls.

the machine control unit (MCU) will not recognize the information. along the Y axis. 17 . reset to start Block of Information CNC information is generally programmed in blocks of five words. M03 Spindle on CW. Each word conforms to the EIA standards and they are written on a horizontal line. Using the example shown in Fig. G01 represents linear interpolation X12345 will move the table 1.2345 in.M11 M30 Clamps off Program stop.6789 in. 40 . in a positive direction along the X axis. Y06789 will move the table 0. the five words are as follows: N001 represents the sequence number of the operation. A complete block of information consists of five words. If five complete words are not included in each block. therefore the control unit will not be activated.

j. It is a good practice to dry run the programme (i) without the workpiece. (ii) without the cutting tools. try the simplest solution first. The tool will be adjusted to this zero point during the machine set up.Steps for CNC Programming and Machining The following is the procedures to be followed in CNC programming and machining. measure tool geometry (lengths. Enter compensation value if necessary. The most important point is to verify the programme by test run it on the machine before the actual machining in order to ensure that the programme is free of mistakes. a. Unless the drawing dimensions are CNC adapted. Determine the machining operations and their sequence. h. Clamp work piece and set up machine. g. Write programme (translate machining steps into programme blocks). b. It is usually longer. f. If many solutions are possible. Start machining. select a suitable programme zero point on the work piece. radii) and note. c. Select cutting tools and determine spindle speeds and feeds. Study the part drawing carefully. Check and test programme. i. rotary table. fixtures etc). but better to proceed in this way. correct and edit programme and check again. If necessary. d. e. k. or (iii) by raising the tool to a safe height. 41 . Determine the method of work clamping (vice. Prepare tool chart or diagram.

Fig. The following guidelines will insure that the dimensioning language means exactly the same thing to the design engineer. 18. Dimension from a specific point on the part surface. the programmer. the technician. Define part surfaces from three perpendicular reference planes. 42 .Programming for Positioning Before starting to program a job. It is the part program that will be sent to the machine control unit by the computer. From the engineering drawings. and where they are to be located. The manuscript must include this along with the types of cutting tools and work-holding devices required. 2. 1. it is important to become familiar with the part to be produced. or other input media. Dimensioning Guidelines The system of rectangular coordinates is very important to the successful operation of CNC machines. Establish reference planes along part surfaces which are parallel to the machine axes. diskette. Visual concepts must be put into a written manuscript as the first step in developing a part program. Certain guidelines should be observed when dimensioning parts for CNC machining. 3. the programmer should be capable of planning the machining sequences required to produce the part. The programmer must first establish a reference point for aligning the workpiece and the machine tool for programming purposes. tape. and the machine operator.

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. MANUAL SETTING .Z0) of machine coordinate system. Stored zero shifts (G54. manually by a programmed absolute zero shift... 5.G59) Programmed zero shift (G92) The relationship between the part zero and the machine system of coordinate R = Reference point (maximum travel of machine) M = Machine zero point (X0. W = Part zero point workpiece coordinate system. or by work coordinates.25 4. Machine Zero Point The machine zero point can be set by three methods—by the operator. Define the part so that a computer numerical control cutter path can be easily programmed.Y0. to suit the holding fixture or the part to be machined. Dimension the part clearly so that its shape can be understood without making mathematical calculations or guesses. 43 .

. 19.Under G54 .000 (the position the machine will reference as part zero) 44 . the coordinate system origin is to be positioned. Under G92 the actual machine coordinates are inserted and used on the G92 line of the part program.000 Z6.000 Y5. The programmer first sends the machine spindle to home zero position by a G28 command in the program. Fig. Then another command (G92 for absolute zero shift) tells the MCU how far from the home zero location.The absolute zero shift can change the position of the coordinate system by a command in the CNC program. G59 the actual machine coordinates of part zero are stored in the stored zero offsets memory and activated in the part program. The sample commands may be as follows: N1 G28 X0 Y0 Z0 (sends spindle to home zero position) N2 G92 X4.. ABSOLUTE ZERO SHIFT .

the power source. This page will explain the function of each of the controller components and how they work together to make a controller system. When you plug a larger device. through which the computer tells the machine what to do. Therefore. cutting. say a printer for example. A power converter. such as the 110V outlet on your wall. you have to use an external power source because the computer is not capable of supplying sufficient power. and other such operations. but you also have to plug a second line to an auxiliary power source. The same conditions are true for CNC devices. the circuitry protection system. motor drivers.ELECTRONICS OF A CNC MACHINE The CNC controller components work together to interpret positioning signals created by a computer and NC software into precise motor control. to direct current (DC) that is more easily used by the machine’s drive motors. The power supply handles large voltages and currents that could be harmful to the NC circuitry. 45 . the power supply unit. They require a low-voltage communication line. and the motor driver. usually referred to as the “power supply unit (PSU). and motors are often separated from the computer with a circuitry protection system that isolates surges in electrical power.  The Components There are three primary CNC controller components that make up a CNC controller. and a power source that provides the power for moving. This condition means that you have to plug that device into the computer as usual.” is often used to change the form of the supplied power from alternating current (AC) from the power grid.  The Power Supply Unit When you plug a small flash drive up to your USB port. the computer powers the device through the port.

the controller box. The “breakout board” provides the circuitry protection and signal distribution inside the controller box. shorts. CNC Controller Components Setup The figure below shows the typical setup of the CNC controller components. In the figure above. The controller box includes a breakout board. The motor drivers may communicate position information one way to the motor (open loop system). you 46 . Fuses are also part of the circuitry protection system. power source (not shown). This isolated your computer from the CNC controller circuit but allows the signals to carry through to your motor drivers. The system is composed of a computer with NC control software. or send and receive position information(closed loop system). and also allows easy hook up of peripherals such as limit switches that feed information back to the computer. and motor drivers. A low-voltage communication signal passes from the computer through the breakout board unchanged to the motor drivers. The motor drivers The motor drivers receives the communication signal and and then coordinates pulses of the desired current and voltage to elicit the movement in the drive motors. such as that for a 3 axis CNC router. and the drive motors. Fuses could save the equipment in case of electrical spikes. or faulty wiring. More on these systems may be found in the drivers sections. depending on the user’s choice of drive system. The Circuitry Protection System The circuitry protection system contains a breakout board to isolate signals from the computer. distribute the signals to the desired drivers.

Although your computer will run on 110VAC. and may be single phase. or higher. some of very high quality and great protection. the CNC machine may run on 110VAC. and lower budget options that do not offer much protection. but this setup puts your computer at risk. etc… This power enters the controller box and will be distributed by the power supply. A little more detail has been added in the figure below to show the conceptual layout of signal wires (light black) and power wires (heavy black). 36V. the computer is fully capable of connecting directly to the drivers and driving the motors. which use a light signals to transmit data across an air gap. The best models employ opto-isolators. There are many types of breakout boards. the power supply will convert the incoming power from alternating current (AC) to direct current (DC). The first figure is an idealized block diagram of your CNC electrical system.can see the computer is connected to the breakout board. such as 12V. These devices provide complete conductive isolation between the controller circuit and your computer. As a note. 24V. or 480VAC. The power supplied depends on you CNC controller components. 47 . For most machines. specifically the motor drivers. three phase. This DC supply will be of a lower voltage. or 220VAC. usually through the printer port (DB25).

The CPU receives input data. The voltage level of the field devices thus normally determines the type of I/O. The field devices are typically selected. In the CPU. current capacities and types of I/O modules are available. relay coils. The inputs can be push buttons. and arithmetic to control. indicator lights.7 gives the generalized PLC block diagram. selector switches. PLCs are now available with increased functions. timing. solenoid valves. A wide variety of voltages. Connections to a computer for hierarchical control are done via the CPU. supplied and installed by the machine tool builder or the end user. power to actuate these devices must also be supplied external to the PLC. PLCs were basically introduced as replacement for hard wired relay control panels. LED displays. position valves. limit switches. etc. So. Fig. all the decisions are made relative to controlling a machine or a process. etc. They were developed to be reprogrammed without hardware changes when requirements were altered and thus are reusable. through digital or analog input/output modules. analog sensor. performs logical decisions based upon stored programs and drives the outputs. relay contacts. various types of machines or processes Programmable Logic Controller (PLC) A PLC matches the NC to the machine. 48 . proximity switches.PROGRAMMABLE LOGIC CONTROLLER “A digitally operating electronic apparatus which uses a programmable memory for the internal storage of instructions by implementing specific functions such as logic sequencing. The I/O structure of the PLCs is one of their major strengths. counting. and not the field devices. The outputs can be motor starters. The PLC power supply is designated and rated only to operate the internal portions of the I/O structures. more memory and large input/output capabilities. float switches.

inputs and outputs.7 Generalized PLC block diagram 49 . the processor the accesses this process image. it starts again at the beginning of the program. The processor then begins a new program scan.e. the processor transfers the contents of the process image output to the output modules and to the external timers and counters. the processor fetches one statement after another from the programming memory and executes it. program completion. processor. i. To execute the program. the processor examines the signal status at all inputs as well as the external timers and counters and are stored in a process image input (PII).e. when a complete program has been scanned. The PLC operates cyclically. Inputs Processor Programmer Logic memory Storage memory Output Field Devices s Power Supply Power Supply Fig. At the beginning of each cycle. The program that determines PLC operation is stored in the internal PLC program memory. i. At the end of a scanning cycle.The principle of operation of a PLC is determined essentially by the PLC program memory. During subsequent program scanning. The results are constantly stored in the process image output (PIO) during the cycle.

This signal is essentially a series of small pulses from 0V to +5V that represent 0’s and 1’s in a binary computer language. either a “0” or a “1” as communicated by the computer and interpreted by the motor driver. The width of the pulse determines the binary code sent.The "Signals" The signal lines coming from the computer operate on 5V DC supplied by the computer communication port. Remember. The signal from the computer to the breakout board is the same as that from the breakout board to the motor driver. and is a square wave form called a Transistor-to-Transistor Logic (TTL) signal. 50 . Therefore. However. More on the signals may be found in the signals page. as discussed previously. the signal coming out of the breakout board is also a 5V TTL signal of the same form. This signal is a form of a Pulse-Width Modulated (PWM) signal where the length of the pulse is varied to indicate information. the signal after the driver has been conditioned as needed to provide the large “move” voltage and current needed to drive the machine. the breakout board provides circuit protection and signal distribution.

Breakout Boards Breakout boards are a common electrical components that take a bundled cable and “breaks out” each conductor to a terminal that can easily accept a hook-up wire for distribution to another device. The breakout board is positioned between your computer or indexer and the motor drivers and serves two purposes in the CNC control system: circuit protection and signal distribution. The image at right shows a simple DB25 breakout circuit board from Winford Engineering. Here we will describe the board’s function in the CNC control system and what you need to know about how to select one to suit your need 51 . They are a common item in electronic projects and enable easy. clean installation of electronic devices.

The machining accuracy of the machine is 0. plastic and other materials.Analysis And Programming Of A Vertical Machining System CNC MACHINING CENTER HITACHI SEIKI VA35 CNC MACHINING CENTER The Hitachi Seiki VA35 CNC (Computer Numeric Controlled) machining center that belongs to the Department of Production Engineering is frequently used for accurate and automated machining of metals as well as for wood.001mm. Figure 4-2 shows various parts of the machine tool 52 .

Hitachi Seiki VA35 CNC Machining Center 53 .

Z Spindle Motors .Y.Y.Z Positions Motor Driver Spindle Motor 54 X.Z X Numerical Control Of The Machine S Y Z EEPROM OR TAPE INPUT Control Microprocessor ROM Spindle Position X.

5 kW (30 min) Spindle speed Spindle speed change Spindle motor 55 .. Japan VA 35–II Fanuc System 6M–B 4000 kg TABLE Working area Maximum carrying capacity 1000*355 mm2 500 Kg STROKES x-axis stroke in the crosswise direction of the table y-axis stroke in the longitudinal direction of the table z-axis stroke in the vertical direction of the spindle head Distance between the spindle nose and top of the table 560 mm 350 mm 400 mm 150-550 mm SPINDLE HEAD Spindle nose contour NT 40 60-600 rpm Stepless (s 4 digit) AC 5. Ltd.MACHINE SPECIFICATIONS GENERAL INFORMATION Manufacturer Model Control unit Weight Hitachi Seiki Co.

CAT 40 95 mm 250 mm 10 kg Random shortest course MAS . they control the movement and machining related functions of the machine tool.Z arguments rapidly moves the bed and the spindle head to the position specified by the arguments. "G00" with X.FEED Least increment 0. M Codes are known as auxiliary functions. the code "G76" followed by some related arguments is used for fine boring. M05 stops the spindle. G Codes define the preparatory functions of the machine. For example "M08" turns on the coolant.1 G CODE AND M CODE The entire functioning of the machine is based on G Code and M Code specifications. They control specific behaviors of the machine. For example.Y. 56 . of tools Shank type Maximum tool diameter Maximum tool length Maximum tool weight Tool selection method Pull stud type 30 BT 40.001 mm 3600 mm/min 13000 mm/min Cutting feed rate Rapid traverse AUTOMATIC TOOL CHANGE (ATC) No. In simple terms.

10 M05. Tool length offset cancel 57 . Unless otherwise stated.25. 4 G90. 2 G28 X0 Y0. X=0 and Y=0 (X and Y movements only) 3 Tool diameter compensation cancel.A Program Used In manufacturing Of Turbine Couplings The listing given below is a program which was used to bore holes in couplings of two turbines which were manufactured in the Engineering Workshops. 3 G40 G49. 9 M98 P151. 7 G00 Z5. 13 G28 X0 Y0. 8 M03 S150. 1 Return to reference point. 1 G28 G91 Z0. 14 M30. 11 M09. 15 % The meaning of each line is given below. 12 G28 G91 Z0. 21 6 G00 x131.05.087 Y177.0 F10. all the dimensions are in mm. It is written in G and M Codes. Incremental programming.818 Z343. 5 G92 X253. Z=0 is the reference point (Z movement only) 2 Return to reference point.

1 G76 G98 X131. Z=343. Y=0 7 Positioning (rapid). Final Z coordinate = -52. Return to initial level in canned cycle after finishing.05 6 Positioning (rapid). Z=5. Radius of boring = 2. 3 Repeat the same in line 2. X=253.0 Q0.5 away from the bored wall of the workpiece. Control unit reset 15 Just display the end of current listing Line 9 in the above program calls the sub program o0151. Y=177. Incremental programming (Z movement only) 13 Return to reference point. Feed rate set to 10 mm/min 8 Spindle rotation CW. The meaning of each line is as follows: 1 Fine boring.0.818. X=131.0 Z-52.5 R2. Before boring tool is taken out.903 Y53.903 and Y=53. 58 .0.4 Absolute programming 5 Programming of absolute zero point.25. Y=0.25 Y0. X=0 and Y=0 14 End of program.384. Starting X.25. 2 Repeat boring for X=119. 2 X119.087. 4 End of sub program.0 (This value does not have any effect on boring since the tool determines the actual radius. 3 (some more x and y values) 4 M99. move it 0.384. speed=150 rpm 9 Sub program (o0151) call-out 10 Spindle stop 11 Mist/coolant off 12 Return to reference point.Y coordinate: X=131.). Z=0.0. This sub program is the actual part of the program which bore holes and is listed below.0.

Generating the program (in G & M Codes) 2. This is finally stored as a text file in the hard drive of the PC. Next. Using this numeric name of the program. it is taken to the front from other programs in the memory and it stays waiting to run. Running the program First a drawing of the machined workpiece is created using AutoCAD in a PC. it is then fed into the machine tool. 1. Sending it to the machine 3. the CNC machine is set to retrieve this file. the contours of the cutting tool are generated. 59 . Through the coaxial cable which links the PC and CNC machine. Pressing the "Start" button sequentially executes the listing. A numeric name for the program is given at the beginning of the file retrieval to figure out the starting point (or the address in the memory) of the retrieving program from earlier read programs. Then using a special routine of AutoCAD.STEPS IN USING THE MACHINE The distinct operations involved in using the CNC machine are listed below in sequence they are done.

ADVANTAGES OF CNC MACHINES CNC machines are widely used in the metal cutting industry and are best used to produce the following types of product: • • • • • • • Parts with complicated contours Parts requiring close tolerance and/or good repeatability Parts requiring expensive jigs and fixtures if produced on conventional machines Parts that may have several engineering changes. 60 .( Printed Circutiry Board). such as during the development stage of In cases where human errors could be extremely costly Parts that are needed in a hurry Small batch lots or short production runs a prototype Some common types of CNC machines and instruments used in industry are as following: • • • • • • • • Drilling Machine Lathe / Turning Centre Milling / Machining Centre Turret Press and Punching Machine Wirecut Electro Discharge Machine (EDM) Grinding Machine Laser Cutting Machine Water Jet Cutting Machine And Most important For Electronics industry is that CNC Milling and Drilling is used for Manufacturing Of PCB ..

Sign up to vote on this title
UsefulNot useful