GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc...

22
GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS CAD/CAM course | MSc. Production Engineering | By: Dr. Laith Abdullah Mohammed Department of Production Engineering & Metallurgy, University of Technology

Transcript of GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc...

Page 1: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS

CAD/CAM course | MSc. Production Engineering | By: Dr. Laith Abdullah MohammedDepartment of Production Engineering & Metallurgy, University of Technology

Page 2: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

The calculation of successive increments in slide position to reach the programmable point is called interpolation. Common methods of interpolation are linear, circular and helical. Figure shows commonly used interpolation methods. Linear interpolation is shown in Fig.(A). Length 12 represents a linear movement parallel to X axis. Segments 2-3 and 4-5 are movements parallel to Z-axis. Segment 3-4 involves simultaneous movement in X and Z directions. Depending on the feed specified in the block the CNC system will calculate the individual speeds of the slides so that a taper will be cut on the surface of the workpiece. In Fig.(B) the segment 1-2 is turned using clockwise circular interpolation. It may be noted that the slide velocities in each axes will have to continuously vary to obtain the circular profile. This is also true with the counter clockwise (CCW) circular interpolation shown in Fig.(C). Helical interpolation used to cut threads in machining centers is illustrated in Fig.(D).

Interpolation Methods

Dr. Laith Abdullah Mohammed

Page 3: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Dr. Laith Abdullah Mohammed

Page 4: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Axes of movement:

A CNC machine tool may have several controlled axes. If simultaneous movements in 2-axes only are available, the control is called 2-axis control.The CNC lathe will have two axes i.e. X and Z. A turning center will have three axes i.e. X, Z and C. A machining center will usually have three axes (X,Y and Z).

Figure below shows the machining of the surface of a component which requires control in three axes. For machining such curved surfaces a special cutter called ball end mill is recommended. The path of the cutter along one curve segment is illustrated in the figure. The cutter axis is always vertical. It may be noted that different points along the cutting edge cuts the surface depending on the curvature of the surface. Therefore, care must be taken to take into account the cutter radius during the interpolation.

3-Axes Machining

Page 5: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

For ensuring better accuracy, an additional axis is needed in the case of such surfaces. This is shown in Fig. above in which 3 translational axes (X, Y & Z) and a rotational axis (A) are employed. At any point on the surface the tip of the cutter touches the surface and the cutter axis is aligned with the normal to the surface. To achieve this it is necessary to obtain the inclination of the normal to the surface and swivel the spindle about the X axis by that angle.

4-Axis Machining

Dr. Laith Abdullah Mohammed

Page 6: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Machining of several aircraft components require control over five axes A doubly curved surface shown in Fig. below requires 5 axes viz. X, Y, Z (translation), A (rotation about X) and B (rotation about Y). Tool is swiveled with respect to X axis as well as Y-axis so that the axis of the tool and the normal to the surface at the point of cut are collinear. Typical parts that require 5-axis machining are tools for pressing body panels of automobiles, complex parts of aircraft, molds for plastic injection molding, die casting dies, mixed flow impellers, etc. Thus a 5- axis machine will have three translational axes and 2 rotary axes. The rotary axes are provided either on the spindle or on the table or one rotary axis on the table and another rotary axis on the spindle. Parts made in 5-axis machines will require very little subsequent hand finishing.In 5-axis machines, the co-ordinates areto be interpolated depending upon the tolerance(deviation from the theoretical surface) to be maintained in producing the surface.

5-Axis Machining

Page 7: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Canned cyclesA canned cycle is a combination of machine movements that perform machining operations like drilling, milling, boring and tapping. The use of canned cycles reduces programming effort. This also saves the length of program, thus saving space required to store the program.

For example, a drilling cycle consists of the following movements of the tool:• Fast approach to workpiece• Drill at feed rate• Rapid return to initial position or to rapid level.Ordinarily 3 blocks are required to program this drilling operation. Use of a canned cycle reduces this to one block. Once a canned cycle has been called, the system will execute the canned cycle at every subsequent table positioning. Therefore it is very important to call off (cancel) the canned cycle. The code G80 cancels all canned cycles.Canned cycle for drilling is G81.This cycle (G81) is shown in Fig.

Dr. Laith Abdullah Mohammed

Page 8: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Figure below also shows a few other typical canned cycles used in machining centres.

G 81 Drilling / Spot Drilling Cycle G 82 Drilling / Counterboring Cycle

Page 9: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Parametric programming can be compared to any computer programming language like BASIC, C Language, and PASCAL. However, this programming language resides right in the CNC control and can be accessed at G code level, meaning you can combine manual programming techniques with parametric programming techniques. Computer-related features like variables, arithmetic, logic statements, and looping are available. Like computer programming languages, parametric programming comes in several versions. The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from Sodick), and Advanced Programming Language [APL] (from G& L)In addition to having many computer-related features, most versions of parametric programming have extensive CNC-related features. Custom macro, for example, allows the CNC user to access many things about the CNC control (tool offsets, axis position, alarms, generate G codes, and program protection) right from within a CNC program. These things are impossible with only normal G code programming techniques.

Parametric programming

Useful of Parametric Programming in the following fields:•Families of parts•User-created canned cycles•Complex motions

Dr. Laith Abdullah Mohammed

Page 10: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Example: Machine a mill a hole of any size at any location. Notice how similar this program is to a program written in BASIC.

ProgramO0001 (Program number)#100=1. (Diameter of end mill)#101=3.0 (X position of hole)#102=1.5 (Y position of hole)#103=.5 (Depth of counter bored hole)#104=400 (Speed in RPM)#105=3.5 (Feedrate in IPM)#106=3. (Tool length offset number)#107=2.0 (Diameter of counter bored hole)G90 G54 S#104 M03 (Select abs mode, coordinate system, start spindle)G00 X#101 Y#102 (Rapid to hole center)G43 H#106 Z.1 (Instate tool length compensation, rapid to approach Z position)G01 Z-#103 F[#105 / 2]Y[#102 + #107 / 2 - #100 / 2] F#105G02 J-[#107 / 2 - #100 / 2]G01 Y#102G00 Z.1M30

Dr. Laith Abdullah Mohammed

Page 11: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Tool Path Generation

Interpolation Issues

Dr. Laith Abdullah Mohammed

Page 12: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from
Page 13: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from
Page 14: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Dr. Laith Abdullah Mohammed

Page 15: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from
Page 16: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from
Page 17: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Dr. Laith Abdullah Mohammed

Page 18: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Dr. Laith Abdullah Mohammed

Page 19: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Dr. Laith Abdullah Mohammed

Page 20: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Dr. Laith Abdullah Mohammed

Page 21: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Dr. Laith Abdullah Mohammed

Page 22: GENERAL PROGRAMMING FEATURES OF CNC SYSTEMS · The most popular is Custom Macro B (used by Fanuc and Fanuc-compatible controls). Others include User Task (from Okuma), Q Routine (from

Sharp Corners:

When machining sharp corners such as shown below, the actual tool path at thecorner is not sharp. This results in material removed at the corner due to undercut. One way to avoid this is to move the tool very slow near the corner or have the tool go through a loop as shown below.

Dr. Laith Abdullah Mohammed