Chapter 6 Programming of CNC lathes PDF

Title Chapter 6 Programming of CNC lathes
Author suresh kumar
Course Recreational tourism
Institution Pennsylvania College of Technology
Pages 59
File Size 2.1 MB
File Type PDF
Total Downloads 84
Total Views 144

Summary

it is the programming guide for cnc machines...


Description

Chapter 6

MANUAL PART PROGRAMMING AND PROGRAMMING OF LATHES Programming is an important activity in using CNC machines. Programs for machining simple components can be written manually. This chapter deals with the basic principles of programming of CNC machines. The fundamental principles are explained in detail. The programming codes commonly used are discussed with examples. A few examples of programs are also given.

6.1 INTRODUCTION The term CNC programming refers to the methods for generating instructions used to drive and control CNC machine tools. CNC programming techniques can be classified into two groups: i. ii.

Manual part programming CAD/CAM based CNC programming (CAM software)

For components with little geometric complexity the CNC program can be written manually. However when geometrical complexity increases, more sophisticated programming techniques are necessary, particularly for machining aerospace components, manufacture dies and moulds for plastic injection moulding or pressure die casting and tooling for manufacturing automotive body panels. These may involve 3-, 4-, or 5- axis machining. CNC programming has to be done in a methodical manner. The steps in programming include: -

Study of production drawing and other documents prepared by planning department Determination of stock size Study of machine tool specifications and features of control system Sequencing machining processes in an optimum manner Deciding the set ups Tool selection Selection of technological parameters like speed, feed etc Tool path determination Preparation of working sketches and calculations if needed Programme preparation (manually or by computer) Programme transfer to the CNC Tool path simulation/ program simulation Program testing- dry run, and debugging Manufacture of components Documentation for future reference

The previous chapter dealt with the planning aspects in detail. This chapter focuses on program preparation. Tool path simulation and program simulation are discussed in the chapter on CAM software.

6.2 STRUCTURE OF A PART PROGRAM A CNC program is a series of sequential instructions related to machining a part. The instructions, usually called part programs are specified in a format the CNC system can accept, interpret and process. A part programme is written to suit a particular machine and its control system.

6.2.1 Basic Programming Terms A small segment of a CNC program is given below: N40

G90 G00 G54 X20.5 Y40.0 S2000 M03;

N50 N60 N60

G43 Z3.0 H02; G01 Z-40.0 F400.0; G00 Z3.0;

A program consists of several lines. Each line is called a block. For example, N40 G90 G00 G54 X20.5 Y40.0 S2000 M03; is a block. A block is composed of a number of words. Example: Z-40.0. A word is a meaningful combination of characters. In Z-40.0, Z, 4, 0, - are all characters. 6.2.1.1 Character A character is the smallest unit of the CNC program. It may be: -

a digit ( 0 to 9) a letter ( A to Z) a symbol (+, -, %, ( ) etc)

T he combination of digit, letter and symbol is referred to as alphanumerical characters. 6.2.1.2 Word A program word is a combination of alphanumerical characters creating a single instruction which will be decoded by the control system. Typical words indicate axes position, preparatory commands, speed command, feed command, miscellaneous functions etc. Each word normally begins with a capital letter followed by a number representing a program code or actual value. 6.2.1.3 Block A block is a line of the program and is used as a multiple instruction. A block contains the data required for transferring the cutting tool from one point to the next one, including all machining instructions that must be executed either at the point or along the path between points. A block begins with a line number (optional in some systems) and ends with an end of block (EOB) symbol like “;”. The lines or blocks are properly sequenced.

6.2.2 Block Format The block format stipulates the way in which the programming instructions are coded. The format currently in wide use is the word address format. Each word starts with a letter. This is called the address. G, M, X, Y,Z, S, F etc are addresses representing preparatory function, miscellaneous function, X axis movement, Y axis movement, Z axis movement, spindle speed and feed respectively. The letter is followed by the numerical data representing a programming code (in the case of G & M functions) or actual value (in the case of axis position, speed, feed etc). In manual program preparation, the programmer has to determine the machining parameters and the optimal sequence of operations to be performed. Based on this sequence, the tool path is calculated and a program is written. The arrangement of the information within a block is referred to as block format. A typical block form is: G01 X 43.56 Z -39.52

F0.2

M08;

The letter and the number which follows it as a whole is referred to as a 'word'. The first letter of the word is the 'word address'. The word addresses in the block given above are G, X, Z, F and M. Most of the present day CNC machines use a variable block format (Ref.: EIA standard RS-273-A and RS-274-B) which is combination of word address and tab sequential formats followed earlier. In the word address format each word must be headed by a word address. The machine control unit (MCU) uses this address letter to identify the meaning of the word following this letter. In this type of format the words need not be arranged in any specific order within the block since the letter identifies the corresponding word. The address characters, currently used as per DIN 66025 are given in Table 6.1 TABLE 6.1 Address characters as per DIN 66025 Character A B C D&E F G H I J K L M N O P,Q,R S T U,V,W X Y Z

Meaning Rotation about X-axis Rotation about Y-axis Rotation about Z-axis Rotation about additional axes Feed Preparatory function Unassigned Interpolation parameter Interpolation parameter Interpolation parameter Unassigned Miscellaneous function Block number Not used Movements parallel to X, Y and Z Spindle speed Tool Movements parallel to X, Y and Z Movement in X-axis Movement in y-axis Movement in z-axis

6.2.2.1 Format Notation Control system manufacturers specify the input format in an abbreviated form as: X +/- 5 . 3 Here X is the address, +/- denotes the direction of axis movement, 5 the maximum number of digits before the decimal point and 3 the number of digits after the decimal point. In some systems the decimal point is compulsory.

6.3 NOMENCLATURE OF THE CNC

Though there are variations, the prevailing industry trend in this respect is to follow the International Standard ISO/R841. The US standard EIA (Electronic Industries Association) document RS267 formed the basis of the ISO standard. The information in the following paragraphs pertains to the ISO standard. 6.3.1 Co-ordinate System Fixing of the co-ordinate system is the first requirement in part programming. The co-ordinate system for designating the axes is the conventional right hand co-ordinate is shown in the Fig. 6.1 Six representations of the co-ordinate systems are shown in this figure. The relative positive directions of the axes in all cases can be fixed by using the right hand convention as shown in Fig.6.1. All these adopt the same right hand co-ordinate system.

X

Z

Y

z

X

Z

Y

X

Y

Y

X

X

X Y Z

Z

Z

Fig.6.1. Dispositions of Co-ordinates in Right Hand Co-ordinate System

6.3.2 Machine Types It is convenient through not necessary, in the context of the standard, to classify the CNC machines in the following four groups: Group I: Machine tools with rotating tools are classified as group I (i.e., Spindle providing the cutting power). Of these machines, those having vertical spindles as in vertical knee mill, drilling machines, profiling and contour mill, vertical boring mill, tapping machines etc. are grouped as I(a). The vertical spindle machines may be single column type or gantry type. Those with horizontal spindles like horizontal boring machine, horizontal machining centres etc. are grouped as I(b).

+Y +C

+A +B

+X

+Z Direction for Rotary Motions

+Y

+B +C +Z +X +A

Fig. 6.2 Right Hand co-ordinate System

Group II: All Machines tools with rotating workpieces (i.e., spindle generating surface of revolution) like lathes, grinding machines are classified as group II machines. Group III: Machine tools with non-rotating workpieces and non-rotating tools (i.e., no spindles) like shaper, planer are classified as group III machines. Group IV: Machines other than machine tools, like CNC drafting machine are classified as belonging to group IV. 6.3.3 Motion Designation Z-motion shall be designated first and shall be followed by X and then Y motions. 6.3.3.1 Z-axis and motion designation (a) Location: In case of machine groups I & II Z-axis are taken either along the spindle axis or parallel to the spindle axis. In case of machine group III & IV it is taken as the perpendicular to the work holding surface. The axis may or may not pass through the controlled point (i.e., cutting tool tip). (b) Z-axis Direction: For the machine of groups I & II the cutting tools move in the negative Z direction to move a tool into the workpiece. The clearance between tool and workpiece decreases by Z-movement. For other machines the positive Z-motion increases the clearance between the work surface and the tool holder.

(c) When there are several spindles and slides: In such cases, one of the spindles, preferably perpendicular to the work holding surface may be chosen as the principal spindle. The primary Z-motion is then related to this primary spindle. The tool motions of other spindle quills or other slides, which are termed as secondary and tertiary motions, may be designated as U, V, W and P, Q, R respectively. 6.3.4 Rotary Motion Axes. A, B and C, define the primary rotary motions. (a) Location: These motions describe rotation about the axis X,Y and Z or about axes parallel to X, Y, Z respectively. If, in addition to the above mentioned primary rotary motions, there exist secondary rotary motions, whether parallel or not to A, B and C. they are designated as D or E. (b) Direction: Positive (+) A, B and C directions are the directions which advance a right hand screw in the positive X, Y and Z directions. In Fig.6.2 the fingers of the right hand point towards the above mentioned directions, viz., X Y, Z; U, V, W; P, Q, R and A, B, C and are with reference to the point, movement of which is being controlled. This point is mostly the tip of the cutting tool. Many times the tool point may not be moving in the same direction , e.g., the quill of the spindle of a vertical milling machine is moving in Z-direction but not in X and Y directions. In such cases the work surface is generally moved in a direction opposite to the one intended for the tool, e.g. table of the milling machine holding the workpiece may be moved in -X and -Y directions. Such movements of machine elements say -X or -Y denoted as +X' or +Y' respectively. Primed letters are used to all motions to indicate directions for moving work surfaces instead of the tool motion which is in the opposite direction. 6.3.5 Objective Of Axes Designation The conventional mathematical right hand co-ordinate system is, in general is used to designate axes. The machine movements designated as above permit the part programmer to assume safe tool movements relative to the right hand co-ordinate system of a stationary workpiece. The programmer can thus imagine himself to be sitting on the tool and describing all the machining operations. For example,( Fig.6.3) for moving a tool ( say a ball-end mill) in a vertical milling machine from position P to position Q the part programmer specifies the movements from (5, 7, 6) to (8, 8, 5). The actual motions which take place on the machine tool are: Movements of quill Movement of table

(Z) (X) (Y)

6 to 5. The quill goes up by one unit. 5 to 8. Table moves to the left by 3 units. 7 to 8. Table moves by one unit towards the column.

P Q

Z

8 7 6 5 4

7

3 2 1

2

1 0

1

3

2

4

5

8 Y

6

X 5 6 7 8 Fig. 6.3 Moving a Tool from Point P to Q 3

4

6.4 REFERENCE POINTS FOR MANUAL PROGRAMMING

(i) The Machine Datum - M: The machine datum is the origin to the co-ordinate system (See Fig.6.4). For lathes it is on the mounting flange of the main spindle and the tuning axis. It cannot be changed by the user of the machine. It is fixed by the manufacturer and programmed into the computer memory. The point generally has the co-ordinates X = 0, Z = 0.

Fig.6.4 Machine Datum of a Lathe (ii) Machine Reference Point The machine zero or machine reference position is the origin of the machine coordinate system. On all CNC machines, the machine zero is located at the positive end of each travel range. Figure 6.5 (a) shows the machine zero of a vertical machining center with respect to the work volume or envelope.

-X MACHINE ZERO

-Y -Z

WORK VOLUME Fig.6.5 (a) Machine Zero of a Vertical Machining Center During the machine set up, particularly after the power is turned on, the position of all axes has to be preset to be always the same. In modern machines this is achieved by a zero return command. Fanuc and other control systems require the machine zero return command performed at least once for automatic operation. Figure 6.5 (b) shows the machine zero in the top view of a vertical machine when looking at the table and Fig. 6.5 (c) shows the machine zero in the front view.

MACHINE ZERO

TABLE

Y TRAVEL

X TRAVEL

Fig.6.5 (b) Machine Zero of a Vertical Machining Center Top View

SPINDLE CENTRE LINE

Z TRAVEL

MACHINE ZERO

TABLE Fig.6.5 (c) Machine Zero of a Vertical Machining Center Front View A typical procedure to physically reach the machine zero position is: Turn the power on Select machine zero return mode Select first axis move (Z for machining Center and X for lathes) Repeat for all other axes Check the lighted in-position indicators Check display of position on screen Set display zero if necessary

(iii) Workpiece Zero-Point - W: A workpiece is located within the travel limits of a machine. Every workpiece must be mounted in a fixture, pallet or chuck depending on the situation. The location of the part in the fixture and the fixed position of the fixture with respect to the machine table are essential to guarantee consistent results and precision. It is very important to ensure

that each workpiece of a particular batch is set the same way. Once the set up is established the workpiece reference point can be selected. The workpiece reference point is commonly known as program zero or workpiece zero. In principle the workpiece zero can be selected anywhere. Three factors influencing the choice of workpiece zero are: - Accuracy of machining - Convenience of set up and operation - Safety In the case pf prismatic components machined in a vertical machining center the centre point of the top surface can be taken as the workpiece reference point. This is shown in Fig.6.6.

SPINDLE

Z X

Y WORK PIECE ZERO WORK PIECE

Fig.6.6 Workpiece Reference for a Vertical Machining Center In the case of a horizontal machining center, the workpiece datum for Z axis can be located on the face of the workpiece facing the column. The y-axis zero can be located on the top face of the fixture (i.e. the base of the workpiece). X axis zero can be located conveniently ,say in one corner of the workpiece. Selecting program zero for round parts or patterns (bolt circles, circular pockets etc.), the most useful program zero is at the center of the circle as indicated in Fig.6.7

A

A O

SECTION AA O PROGRAM ZERO

Fig.6.7 Program zero for holes in a pitch circle Program zero position can be built into the special fixtures can be used for setting up the workpieces. It must be mentioned here that a number of workpiece datum can be used in a part program. In the case of CNC lathes program zero selection is simple. The X=0 is generally located on the axis of rotation of the workpiece i.e. the spindle axis. As far as Z axis is concerned three positions are used: - on the face of the chuck - on the face of the jaw - on the finished face of the workpiece These positions are shown in Fig.6.8. In Fig. (a) the datum is on the face of the chuck (point 1). Usually this is the default datum in a lathe. In this case all coordinates of the work piece are positive. In Fig. (b) the datum is located on the face of the soft jaw (point 2). The shifting of the datum can be done in different ways. One method is to write a block of program as given below: G59 Z0 X10.0 ; In Fig. (c) the datum is located on the finished face of the work piece. The shifting of the datum can be done through a program block similar to the previous one. G59 Z0 X110.0 ;

SOFT JAW +X

FINISHED PART

+Z

(a)

1 CHUCK

10

RAW MATERIAL +X

+Z

(b)

2

+X +Z 3

(c)

110

Fig.6.8 Common Workpiece Zero Points for CNC lathes During different machining processes various jaw positions of chucks are used and these are mounted onto the machine spindle. The distance of the face side of the workpiece from the machine datum (X1/X2/X3) differs, depending on the jaw surface which is used for chucking. This has to be considered while programming. This is indicated in Fig 6.9 where the same workpiece mounted in different jaw positions is shown to have different values of work datum. The raw part (blank) is located axially in a shoulder. Correspondingly the position of the jaws in the chuck also changes. The distances X1 and X2 must be accurately measured and incorporated in the program.

2 1

Jaw Chuck Body

Chuck With Jaws Blank

2 1

Finished Part

W

X1

W

X2

Fig.6.9 Different Workpiece Datum Points Depending on Location in the Chuck Jaws Therefore, it is desirable to offset the origin of the co-ordinate system into the workpiece zero point W, instead of the machine reference point which is the usual origin of the machine. It is effected in the program by the use of G-functions (G54 to G59). (iv) Tool Post Reference Point--T: In milling and related operations the reference point of the tool is usually the intersection of the tool center line and the lowest positioned cutting tip. In turning and boring, the most common tool reference point is an imaginary point on the tool insert. For tools like drills, the reference point is the extreme tip of the tool, as measured along the Z-axis. Figure 6.10 shows typical tool reference points.

MILLING TOOLS

LATHE TOOLS

Fig.6.10 Typical Tool Reference Points 6.5 PROGRAMMING USING ABSOLUTE VALUE/PROGRAMMING ON THE BASIS OF REFERENCE VALUES CNC machines allow both absolute and incremental programming. The computer must be, however, informed of the method used so that the data which are put in can be properly interpreted. G functions like G90 (Absolute dimension input) and G91 (Incremental dimension input) are used in several CNC systems for this purpose. Dimensions of the workpiece to be turned are mostly indicated by diameters and to conver...


Similar Free PDFs