BASIC CNC PROGRAMMING

23 196 0
BASIC CNC PROGRAMMING

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 1 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) LAB 4 BASIC CNC MACHINES 1.0 OBJECTIVE To understand the concept and principles of computer numerical control (CNC) system, understand the main components of the CNC system, understand the point-to-point system (positioning), understand the contouring system (continuous system), and write a simple CNC milling program. 2.0 INTRODUCTION Automatically controlling a machine tool based on a set of pre-programmed machining and movement instructions is known as numerical control, or NC. A numerical control is a system to control many machine functions and movements which were traditionally performed by skilled machinists. Numerical control developed out of the need to meet the requirements of high production rates, uniformity and consistent part quality. Programmed instructions are converted into output signals which in turn control machine operations such as spindle speeds, tool selection, tool movement, and cutting fluid flow. By integrating a computer processor, computer numerical control, or “CNC” as it is now known, allows part machining programs to be edited and stored in the computer memory as well as permitting diagnostics and quality control functions during the actual machining. CNC machine tools, the modern versions of NC machines have an embedded system involving several microprocessors and related electronics as the Machine Control Unit (MCU). For a CNC machine control unit (MCU) decides cutting speed, feed, depth of cut, tool selection, coolant on off and tool paths. The MCU issues commands in form of numeric data to motors that position slides and tool accordingly. 2.1 Advantage of CNC Machine DISADVANTAGES • CNC machines can be used continuously 24 hours a day, 365 days a year and only need to be switched off for occasional maintenance. • CNC machines are programmed with a design which can then be manufactured hundreds or even thousands of times. Each manufactured product will be exactly the same. • Less skilled/trained people can operate CNCs unlike manual lathes / milling machines etc. which need skilled engineers. Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 2 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) • CNC machines can be updated by improving the software used to drive the machines. • Training in the use of CNCs is available through the use of ‘virtual software’. This is software that allows the operator to practice using the C NC machine on the screen of a computer. The software is similar to a computer game. • CNC machines can be programmed by advanced design software such as Pro/DESKTOP, enabling the manufacture of products that cannot be made by manual machines, even those used by skilled designers / engineers. • Modern design software allows the designer to simulate the manufacture of his/her idea. There is no need to make a prototype or a model. This saves time and money. • One person can supervise many CNC machines as once the y are programmed they can usually be left to work by themselves. Sometimes only the cutting tools need replacing occasionally. • A skilled engineer can make the same component many times. However, if each component is carefully studied, each one will vary s lightly. A CNC machine will manufacture each component as an exact match. 2.2 Disadvantage of CNC Machine • CNC machines are more expensive than manually operated machines, although costs are slowly coming down. • The CNC machine operator only needs basi c training and skills, enough to supervise several machines. In years gone by, engineers needed years of training to operate centre lathes, milling machines and other manually operated machines. This means many of the old skills are been lost. • Less worker s are required to operate CNC machines compared to manually operated machines. Investment in CNC machines can lead to unemployment. • Many countries no longer teach pupils / students how to use manually operated lathes / milling machines etc Pupils / stu dents no longer develop the detailed skills required by engineers of the past. These include mathematical and engineering skills. Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 3 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) 2.3 Applications of CNC Machine The applications of CNC include both for machine tool as well as non-machine tool areas. In the machine tool category, CNC is widely used for lathe, drill press, milling machine, grinding unit, laser, sheet-metal press working machine, tube bending machine etc. Highly automated machine tools such as turning center and machining center which change the cutting tools automatically under CNC control have been developed. In the non-machine tool category, CNC applications include welding machines (arc and resistance), coordinate measuring machine, electronic assembly, tape laying and filament winding machines for composites etc. 3.0 ELEMENTS OF A CNC 3.1 Coordinate System The coordinate system is defined by the definition of the translational and rotational motion coordinates. Each translational axis of motion defines a direction in which the cutting tool moves relative to the work piece. The main three axes of motion are referred to as the X, Y. and Z axes. The Z axis is perpendicular to both X and Y in order to create a right-hand coordinate system, such as shown in Figure 3.1. A positive motion in the Z direction moves the cutting tool away from the workpiece. The location of the origin is generally adjustible. Figure 23.4 shows the coordinate system for turning as in a lathe while Figure 3.2 shows the system for drilling and milling. For a lathe, the infeed/radial axis is the x-axis, the carriage/length axis is the z-axis. There is no need for a y-axis because the tool moves in a plane through the rotational center of the work. Coordinates on the work piece shown below are relative to the work. Fig. 3.1: Co-ordinate system for turning In drilling and milling machines the X and Y axes are horizontal. For example, a positive motion command in the drill moves the X axis from left to right, the Y axis from front to back, and the Z axis toward the top. In the lathe only two axes are required to command the motions of the tool. Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 4 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Fig. 3.2: Co-ordinate system for drilling and milling. Since the spindle is horizontal, the Z axis is horizontal as well. The cross axis is denoted by X. A positive position command moves the Z axis from left to right and the X axis from back to front in order to create the right-hand coordinate system. 3.2 Machine Control Unit The machine control unit (MCU) is a microcomputer that stores the program and executes the commands into actions by the machine tool. The MCU consists of two main units: the data processing unit (DPU) and the control loops unit (CLU). The DPU software includes control system software, calculation algorithms, translation software that converts the part program into a usable format for the MCU, interpolation algorithm to achieve smooth motion of the cutter, editing of part program (in case of errors and changes). The DPU processes the data from the part program and provides it to the CLU which operates the drives attached to the machine leadscrews and receives feedback signals on the actual position and velocity of each one of the axes. A driver (dc motor) and a feedback device are attached to the leadscrew. The CLU consists of the circuits for position and velocity control loops, deceleration and backlash take up, function controls such as spindle on/off.milling machine etc). 3.3 Machine Tool CNC machine tool systems can be classified in various ways such as: 1. Point-to-point or contouring: depending on whether the machine cuts metal while the workpiece moves relative to the tool. 2. Incremental or absolute: depending on the type of coordinate system adopted to parameterize. the motion commands 3. Open-loop or closed-loop: depending on the control system adopted for axis motion control. Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 5 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) 3.3.1 Point-to-Point Systems Point-to-point systems are those that move the tool or the workpiece from one point to another and then the tool performs the required task. Upon completion, the tool (or workpiece) moves to the next position and the cycle is repeated (Figure 3.3). The simplest example for this type of system is a drilling machine where the workpiece moves. In this system, the feed rate and the path of the cutting tool (or workpiece) have no significance on the machining process. The accuracy of positioning depends on the system's resolution in terms of BLU (basic length unit) which is generally between 0 .001" and 0.0001". Each BLU unit corresponds to the position resolution of the axis of motion. For example, 1 BLU = 0.0001" means that the axis will move 0.0001" for every one electrical pulse received by the motor. The BLU is also referred to as Bit (binary digit). Pulse = BLU = Bit Fig. 3.3: Cutter path between holes in a point-to-point system. 3.3.2 Contouring Systems (Straight cut and Continuous Path systems) In contouring systems, the tool is cutting while the axes of motion are moving, such as in a milling machine. All axes of motion might move simultaneously, each at a different velocity. When a nonlinear path is required, the axial velocity changes, even within the segment. For example in Figure 3.4, cutting a circular contour requires sinusoidal rates of change in both axes. The motion controller is therefore required to synchronize the axes of motion to generate a predetermined path, generally a line or a circular arc. A contouring system needs capability of controlling its drive motors independently at various speeds as the tool moves towards the specified position. This involves simultaneous motion control of two or more axes, which requires separate position and velocity loops. It also requires an interpolator program that generates the position and velocity set points for the two drive axes, continuously along the contour. In modern machines there is capability for programming machine axes, either as point-to-point or as continuous (that is contouring). Before the next type of classification is introduced, it is necessary to present the basic coordinate system conventions in a machine tool. Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 6 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Fig. 3.4: Continuous path cutting. 3.4 Programming Systems Two types of programming modes, the incremental system and the absolute system, are used for CNC. Both systems have applications in CNC programming, and no system is either right or wrong all the time. Most controls on machine tools today are capable of handling either incremental or absolute programming as shown in Figure 3.5. Fig. 3.5: Types of CNC programming modes 3.4.1 Incremental system CNC systems are further divided into incremental and absolute systems. In an incremental system the movements in each Part program block are expressed as the displacements along each coordinate axes with reference to the final position achieved at the end of executing the previous program block. In another word, the distance is measured from one point to the next. In incremental positioning, the work coordinates change because each location is the zero point for the move to the next location, Figure 3.6. On some parts, it may be desirable to change from absolute to incremental, or vice versa, at certain points in the job. Inserting the G90 (absolute) or Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 7 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Figure 3.6: Example of incremental programming. the G91 (incremental) command into the program at the point where the change is to be made can do this. 3.4.2 Absolute system An absolute NC system is one in which all position coordinates are referred to one fixed origin called the zero point. The zero point may be defined at any suitable point within the limits of the machine tool table and can be redefined from time to time. Any particular definition of the zero point remains valid till another definition is made. In Figure 3.7, the part zero is used for all positioning for hole locations 1, 2, and 3. Figure 3.7: Example of absolute programming Most modem CNC systems permit application of both incremental and absolute programming methods. Even within a specific part program the method can be changed These CNC systems provide the user with the combined advantages of both methods. The incremental mode has two advantages over the absolute mode. Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 8 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) • Inspection of the program is easier because the sum of position commands for each axis must be zero. A nonzero sum indicates an error. Such an inspection is impossible with the absolute system. • Mirror image programming (for example, symmetrical geometry of the parts) is simple by changing the signs of the position commands. The absolute system has two significant advantages over the incremental system: • Interruptions caused by, for example, tool breakage (or tool change, or checking the parts), and would not affect the position at the interruption. • Easy change of dimensional data 3.5 Interpolation Interpolation consists in the calculation of the coordinated movement of several axes using the programmed parameters, in order to obtain a resulting trajectory, which can be of various types, such as: - Linear interpolation - Circular interpolation 3.5.1 Linear Interpolation Linear interpolation is to command the cutter to move from the existing point to the target point along a straight line at the speed designated by the F address. 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. Therefore, the end point of one line or segment becomes the start point for the next segment, and so on, throughout the entire program. Figure 3.8 shows the example of drawing for linear interpolation process. Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 9 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Figure 3.8: An example of drawing for linear interpolation Example code: % (rewind stop code / parity check) 2000 (program number) N10 G90 N15 G01 X100 F300 N20 G01 Y70 N25 G01 X90 Y 80 N30 G01 X20 N35 G01 X10 Y90 N40 X0 Y80 N45 Y0 N50 M02 3.5.2 Circular Interpolation In circular interpolation the cutter move from the existing point to the target point a long a circular arc in clockwise direction (G02) or counter clockwise direction (G03). The parameters of the centre of the circular arc are designated by I, J and K addresses. I is the distance along the X-axis, J along the Y-axis and K along the Z-axis. This parameter is defined as the vector (magnitude and direction) from the starting point to the centre of the arc. Figure 3.9 shows the example circular interpolation process using counter clockwise direction (G03). Figure 3.9: An example of circular interpolation process. Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 10 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) 3.6 Programming Format Word address is the most common programming format used for CNC programming systems. This format contains a large number of different codes (preparatory and miscellaneous) that transfers program information from the part print to machine servos, relays, micro-switches, etc., to manufacture a part. These codes, which conform to EIA (Electronic Industries Association) standards, are in a logical sequence called a block of information. Each block should contain enough information to perform one machining operation. Every program for any part to be machined must be put in a format that the machine control unit can understand. 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. A variable- block format which uses words (letters) is most commonly used. Each instruction word consists of an address character, such as X, Y, Z, G, M, or S. Numerical data follows this address character to identify a specific function such as the distance, feed rate, or speed value. 3.6.1 Program Definition To enable the machine to operate automatically it is necessary to put into its memory a programm or set of instructions to carry out the required operation. a) Programme A programme is a series of instructions to the machine, set out in sequence to produce a complete machining operation. A programme is made up of a series of blocks. b) Block A block or programme line is a set of instructions to the machine that are carried out simultaneously. A block is made up of one or more Words and is terminated by an End of Block which is the Line Feed Character. c) Word A word is a specific instruction to the machine that will affect a particular machine function. Every word consists of a Letter Code and a Numerical value. CNC information is generally programmed in blocks words. Each word conforms to the EIA standards and they are written on a horizontal line. Figure 3.10 shows an example a complete block of information consists of five words. Figure 3.10: Example of block in formation. [...]... (UniMAP) S Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 LAB 4: CNC MACHINE Drawing No Notes Name Group: Matric No Sequence Pre Misc No Function Function Tools N G M T X Coordinate Y 20 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Z Radius R Date: Feed Rate F Spindle Speed S Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 LAB 4: CNC MACHINE Drawing... Speed S Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 LAB 4: CNC MACHINE Drawing No Notes Name Group: Matric No : Sequence Pre Misc No Function Function Tools N G M T X Coordinate Y 22 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Z Radius R Date: Feed Rate F Spindle Speed S Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 LAB 4: CNC MACHINE Drawing... to be positioned The sample commands may be as follows: N1 G28 X0 Y0 Z0 (sends spindle to home zero position) N2 G92 X4.000 Y5.000 Z6.000 (the position the machine will reference as part zero) 4.0 BASIC CNC PROGRAMMING The program would look something like this: STEP #1: STEP #2: STEP #3: STEP #4: STEP #5: STEP #6: STEP #7: Select cutting tool Turn the spindle on at a certain RPM Turn the coolant on... CNC Machines Laboratory Manual for Engineering Skills ECT112 Figure 4.2: Circular interpolation process using G03 (counter clockwise direction) Calculating the points needed to program the part: 16 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 17 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Lab 4: CNC. .. machine tool Table 3.1: Example of coding functions in CNC machine Function Sequence Number Preparatory Function Coordinate Word Parameters for Circular Interpolation Radius of arc Feedrate Spindle speed Tool Function Miscellaneous Function Address N G X, Y, Z I, J, K R F S T M 11 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Lab 4: CNC Machines Laboratory Manual for Engineering Skills... computer, tape, diskette, or other input media The programmer must first establish a reference point for aligning the workpiece and the machine tool for programming purposes The 13 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 Table 3.3 Example of Miscellaneous commands (M-code) • • • • • • • • • • • • • • • • M00 Program... devices required, and where they are to be located 3.8 Dimensioning Guidelines The system of rectangular coordinates is very important to the successful operation of CNC machines Certain guidelines should be observed when dimensioning parts for CNC machining The following guidelines will insure that the dimensioning language means exactly the same thing to the design engineer, the technician, the programmer,... coordinate registers on the console to zero 14 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 ABSOLUTE ZERO SHIFT - The absolute zero shift can change the position of the coordinate system by a command in the CNC program The programmer first sends the machine spindle to home zero position by a G28 command in the program... (increment dimension system) The word is composed of the address of the axis to be moved and the value and direction of the movement 12 ©2013 ENGINEERING CENTRE, Universiti Malaysia Perlis (UniMAP) Lab 4: CNC Machines Laboratory Manual for Engineering Skills ECT112 Parameters for Circular Interpolation (I, J, K) These parameters specify the distance measured from start point of the arc to the centre Numerals... certain machine tool operations M-codes are not grouped into categories, although several codes may control the same type of operations such as shown in Table 3.3 which controls the machine tool spindle 3.7 Programming for Positioning Before starting to program a job, it is important to become familiar with the part to be produced From the engineering drawings, the programmer should be capable of planning . Programming Systems Two types of programming modes, the incremental system and the absolute system, are used for CNC. Both systems have applications in CNC programming, and no system is either. handling either incremental or absolute programming as shown in Figure 3.5. Fig. 3.5: Types of CNC programming modes 3.4.1 Incremental system CNC systems are further divided into. absolute programming Most modem CNC systems permit application of both incremental and absolute programming methods. Even within a specific part program the method can be changed These CNC systems

Ngày đăng: 10/04/2014, 21:09

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan