+ All Categories
Home > Education > Cnc part programming 4 unit

Cnc part programming 4 unit

Date post: 19-Jan-2017
Category:
Upload: palanivendhan
View: 866 times
Download: 0 times
Share this document with a friend
44
CNC PART CNC PART PROGRAMMING PROGRAMMING
Transcript
Page 1: Cnc part programming 4 unit

CNC PART CNC PART PROGRAMMINGPROGRAMMING

Page 2: Cnc part programming 4 unit

PART PROGRAMPART PROGRAM• A part program is a series of coded instructions A part program is a series of coded instructions

required to produce a part. It controls the movement required to produce a part. It controls the movement of the machine tool and the on/off control of of the machine tool and the on/off control of auxiliary functions such as spindle rotation and auxiliary functions such as spindle rotation and coolant. The coded instructions are composed of coolant. The coded instructions are composed of letters, numbers and symbols and are arranged in a letters, numbers and symbols and are arranged in a format of functional blocks as in the following format of functional blocks as in the following exampleexample

N10 G01 X5.0 Y2.5 F15.0N10 G01 X5.0 Y2.5 F15.0    |       |       |         |        |    |       |       |         |        |    |       |       |         |       Feed rate (15 in/min)    |       |       |         |       Feed rate (15 in/min)    |       |       |        Y-coordinate (2.5")    |       |       |        Y-coordinate (2.5")    |       |      X-coordinate (5.0")    |       |      X-coordinate (5.0")    |      Linear interpolation mode    |      Linear interpolation mode   Sequence number   Sequence number

Page 3: Cnc part programming 4 unit

PROGRAM INPUT PROGRAM INPUT DEVICEDEVICE

• The program input device is the The program input device is the mechanism for part programs to be mechanism for part programs to be entered into the CNC control. Thentered into the CNC control. The e mostmost commonly used program input commonly used program input devices are devices are keyboardskeyboards,, punched tape punched tape reader, diskette drivers, throgh RS reader, diskette drivers, throgh RS 232 serial ports and networks232 serial ports and networks. .

Page 4: Cnc part programming 4 unit

MACHINE CONTROL MACHINE CONTROL UNITUNIT

The machine control unit (MCU) is the heart of a The machine control unit (MCU) is the heart of a CNC system. It is used to perform the following CNC system. It is used to perform the following functions: functions:

• Read coded instructionsRead coded instructions• Decode coded instructions Decode coded instructions • Implement interpolations (linear, circular, and Implement interpolations (linear, circular, and

helical) to generate axis motion commands helical) to generate axis motion commands • Feed axis motion commands to the amplifier circuits Feed axis motion commands to the amplifier circuits

for driving the axis mechanisms for driving the axis mechanisms • Receive the feedback signals of position and speed Receive the feedback signals of position and speed

for each drive axis for each drive axis • Implement auxiliary control functions such as Implement auxiliary control functions such as

coolant or spindle on/off, and tool changecoolant or spindle on/off, and tool change

Page 5: Cnc part programming 4 unit

CNC PROGRAMMINGCNC PROGRAMMING• Offline programmingOffline programming linked to CAD linked to CAD

programs. programs. • Conversational programmingConversational programming by the by the

operator. operator. • MDIMDI ~ Manual Data Input. ~ Manual Data Input. • Manual ControlManual Control using jog buttons or using jog buttons or

`electronic handwheel'. `electronic handwheel'. • Word-Address CodingWord-Address Coding using standard using standard

G-codes and M-codes. G-codes and M-codes.

Page 6: Cnc part programming 4 unit

The position of the tool is The position of the tool is described by using a described by using a Cartesian coordinate Cartesian coordinate

system. If (0,0,0) position system. If (0,0,0) position can be described by the can be described by the

operator, then it is called operator, then it is called floating zerofloating zero..

Page 7: Cnc part programming 4 unit

In defining the motion of In defining the motion of the tool from one point to the tool from one point to another, another, either either absoluteabsolute positioningpositioning mode ormode or incrementalincremental positioningpositioning mode mode can be used.can be used.

Page 8: Cnc part programming 4 unit

1. 1. Absolute positioningAbsolute positioning. In this . In this mode, the desired target position mode, the desired target position of the tool for a particular move is of the tool for a particular move is given relative to the origin point of given relative to the origin point of the program.the program.

2. 2. Incremental positioningIncremental positioning. In this . In this mode, the next target position for mode, the next target position for the tool is given relative to the the tool is given relative to the current tool current tool position.position.

Page 9: Cnc part programming 4 unit

Structure of an NC Part Structure of an NC Part Program:Program:

Commands are input into the controller in units called blocks or statements.

Block Format:

1. Fixed sequential format2. Tab sequential format3. Word address format

Page 10: Cnc part programming 4 unit

EXAMPLEEXAMPLE::Assume that a drilling operation is to be

programmed as:

1. The tool is positioned at (25.4,12.5,0) by a rapid movement.2. The tool is then advanced -10 mm in the z direction at a feed rate of 500 mm/min., with the flood coolant on.3.The is then retracted back 10 mm at the rapid feed rate, and the coolant is turned off.

Page 11: Cnc part programming 4 unit

1. Fixed sequential format1. Fixed sequential format0050 00 +0025400 +0012500 0050 00 +0025400 +0012500 +0000000 0000 00+0000000 0000 000060 01 +0025400 +0012500 -0010000 0060 01 +0025400 +0012500 -0010000 0500 080500 080070 00 +0025400 +0012500 0070 00 +0025400 +0012500 +0000000 0000 09+0000000 0000 092. Tab sequential format

0050 TAB 00 TAB +0025400 TAB +0012500 TAB +0000000 TAB 0060 TAB 01 TAB TAB TAB -0010000 TAB 0500 TAB 080070 TAB 00 TAB TAB TAB -0000000 TAB 0000 TAB 09

3. Word address formatN50 G00 X25400 Y125 Z0 F0N60 G01 Z-10000 F500 M08N70 G00 Z0 M09

Page 12: Cnc part programming 4 unit

Modal commandsModal commands: Commands : Commands issued in the NC program that will issued in the NC program that will stay in effect until it is changed by stay in effect until it is changed by some other command, like, feed some other command, like, feed rate selection, coolant selection, rate selection, coolant selection, etc.etc.

Nonmodal commandsNonmodal commands: Commands : Commands that are effective only when issued that are effective only when issued and whose effects are lost for and whose effects are lost for subsequent commands, like, a subsequent commands, like, a dwell command which instructs dwell command which instructs the tool to remain in a given the tool to remain in a given configuration for a given amount configuration for a given amount of time.of time.

Page 13: Cnc part programming 4 unit

INFORMATION NEEDED by INFORMATION NEEDED by a CNCa CNC

1. Preparatory Information: units, incremental or absolute positioning

2. Coordinates: X,Y,Z, RX,RY,RZ3. Machining Parameters: Feed rate and spindle speed4. Coolant Control: On/Off, Flood, Mist5. Tool Control: Tool and tool parameters6. Cycle Functions: Type of action required7. Miscellaneous Control: Spindle on/off, direction of

rotation, stops for part movementThis information is conveyed to the machine through a

setof instructions arranged in a desired sequence –

Program.

Page 14: Cnc part programming 4 unit

BLOCK FORMATBLOCK FORMAT

Sample BlockSample Block N135 G01 X1.0 Y1.0 Z0.125 F5

• Restrictions on CNC blocks• Each may contain only one tool move• Each may contain any number of non-tool move G-codes• Each may contain only one feedrate• Each may contain only one specified tool or spindle speed• The block numbers should be sequential• Both the program start flag and the program number

must be independent of all other commands (on separate lines)

• The data within a block should follow the sequence shown in the above sample block

Page 15: Cnc part programming 4 unit

WORD-ADDRESS WORD-ADDRESS CODINGCODING

• N5 G90 G20N5 G90 G20• N10 M06 T3N10 M06 T3• N15 M03 S1250N15 M03 S1250• N20 G00 X1 Y1N20 G00 X1 Y1• N25 Z0.1N25 Z0.1• N30 G01 Z-0.125 F5N30 G01 Z-0.125 F5• N35 X3 Y2 F10N35 X3 Y2 F10• N40 G00 Z1N40 G00 Z1• N45 X0 Y0N45 X0 Y0• N50 M05N50 M05• N55 M30N55 M30

Example CNC ProgramExample CNC Program

Each instruction to the machine consists of a letter followed by a number.

Each letter is associated with a specific type of action or piece of information needed by the machine.

Letters used in Codes

N,G,X,Y,Z,A,B,C,I,J,K,F,S,T,R,M

Page 16: Cnc part programming 4 unit

G CodesG Codes• G00G00 Rapid traverseRapid traverse• G01 Linear interpolationG01 Linear interpolation• G02G02 Circular Circular

interpolation, interpolation, CWCW• G03 Circular G03 Circular

interpolation, interpolation, CCWCCW• G04 DwellG04 Dwell• G08 AccelerationG08 Acceleration• G09 DecelerationG09 Deceleration• G17 X-Y PlaneG17 X-Y Plane• G18 Z-X PlaneG18 Z-X Plane• G19 Y-Z PlaneG19 Y-Z Plane• G20 Inch Units (G70)G20 Inch Units (G70)• G21 Metric Units (G71)G21 Metric Units (G71)

• G40 Cutter compensation – G40 Cutter compensation – cancelcancel

• G41 Cutter compensation – G41 Cutter compensation – leftleft

• G42 Cutter compensation- G42 Cutter compensation- rightright

• G70 Inch formatG70 Inch format• G71 Metric formatG71 Metric format• G74 Full-circleG74 Full-circle programming programming

offoff• G75 Full-circle programming G75 Full-circle programming

onon• G80 Fixed-cycle cancelG80 Fixed-cycle cancel• G81-G89 Fixed cyclesG81-G89 Fixed cycles• G90 Absolute dimensionsG90 Absolute dimensions• G91 Incremental dimensionsG91 Incremental dimensions

Page 17: Cnc part programming 4 unit

M CodesM Codes• M00 M00 Program stopProgram stop• M01 M01 Optional program stopOptional program stop• M02 M02 Program endProgram end• M03 M03 Spindle on clockwiseSpindle on clockwise• M04 M04 Spindle on counterclockwiseSpindle on counterclockwise• M05 M05 Spindle stopSpindle stop• M06 M06 Tool changeTool change• M08 M08 Coolant onCoolant on• M09 M09 Coolant offCoolant off• M10 M10 Clamps onClamps on• M11 M11 Clamps offClamps off• M30 M30 Program stop, reset to startProgram stop, reset to start

Page 18: Cnc part programming 4 unit

N CodesN Codes• Gives anGives an identifying number for eachidentifying number for each

block of information.block of information.

• It is generally good practice toIt is generally good practice to increment each block number byincrement each block number by 5 5 or 10 to allow additionalor 10 to allow additional blocks to be blocks to be inserted if futureinserted if future changes are changes are required.required.

Page 19: Cnc part programming 4 unit

X,Y, and Z CodesX,Y, and Z Codes• X, Y, and Z X, Y, and Z codes are used tocodes are used to

specify the coordinate axis.specify the coordinate axis.• Number following the codeNumber following the code defines defines

the coordinate at the endthe coordinate at the end of the of the move relative to anmove relative to an incremental or incremental or absoluteabsolute reference point.reference point.

Page 20: Cnc part programming 4 unit

I,J, and K CodesI,J, and K Codes• I, J, and K I, J, and K codes are used tocodes are used to specify specify

the coordinate axisthe coordinate axis when defining when defining the center of athe center of a circle.circle.

• Number following the codeNumber following the code defines defines the respective coordinatethe respective coordinate for the for the center of the circle.center of the circle.

Page 21: Cnc part programming 4 unit

FF,,SS, and , and TT Codes Codes• F-codeF-code: used to specify the feed: used to specify the feed raterate

• S-codeS-code: used to specify the: used to specify the spindle spindle speedspeed

• T-codeT-code: used to specify the tool: used to specify the tool identification number associatedidentification number associated with with the tool to be used inthe tool to be used in subsequent subsequent operations.operations.

Page 22: Cnc part programming 4 unit

Application of Some CodesApplication of Some CodesG01 Linear InterpolationG01 Linear InterpolationFormat: N_ G01 X_ Y_ Z_ F_Format: N_ G01 X_ Y_ Z_ F_

• Linear Interpolation results in a Linear Interpolation results in a straight line feedstraight line feed move.move.

• Unless tool compensation is used, Unless tool compensation is used, thethe coordinates arecoordinates are associated with associated with the centerline of the tool.the centerline of the tool.

Page 23: Cnc part programming 4 unit

Application of Some CodesApplication of Some CodesG01 Linear InterpolationG01 Linear Interpolation

• . As an example, for the motion that . As an example, for the motion that occurs in occurs in x-y plane with the same x-y plane with the same maximum speed for the x- and y-axis, maximum speed for the x- and y-axis, initial motion is at an angle of 45o to the initial motion is at an angle of 45o to the axes until motion in one of axes until motion in one of

• the axes is completed and then the the axes is completed and then the balance of the motion occurs in the other balance of the motion occurs in the other axis. This is called axis. This is called point-to-point motionpoint-to-point motion..

Page 24: Cnc part programming 4 unit

Application of Some CodesApplication of Some CodesG01 Linear InterpolationG01 Linear Interpolation

5

10

15

20

25

5 10 15 20 25 30

A

B C

Positioning motion from A to CN10 G00 X30000 Y20000 F0

Page 25: Cnc part programming 4 unit

N10 N10 G00 X1 G00 X1 ZZ11NN115 Z0.15 Z0.1NN2020 G01 Z-0.125 F5 G01 Z-0.125 F5NN225 5 X2 Z2 X2 Z2 F10F10

G01 Linear InterpolationG01 Linear Interpolation

X

Z

Page 26: Cnc part programming 4 unit

G02 Circular G02 Circular InterpolationInterpolation

• G02 is also a preparatory function to G02 is also a preparatory function to specify that the tool should be moved to specify that the tool should be moved to a specified location along a circular path a specified location along a circular path in a clockwise direction. In order to in a clockwise direction. In order to specify the path to the MCU, the end specify the path to the MCU, the end point of the arc and the location of the point of the arc and the location of the center of the arc should be specified. center of the arc should be specified. Within the block in which the G02 code Within the block in which the G02 code is programmed, the center of the arc is is programmed, the center of the arc is given by specifying its location relative given by specifying its location relative to the start of the arc. to the start of the arc.

Page 27: Cnc part programming 4 unit

G02 Circular G02 Circular Interpolation (CW)Interpolation (CW)

• The G02 commandThe G02 command requiresrequires an endpoint and a an endpoint and a radiusradius inin order to cut the order to cut the arc.arc.

• I,J, and K are relativeI,J, and K are relative to to the start point.the start point.

N_ G02 X2 Y1 I0 J-1 F10N_ G02 X2 Y1 I0 J-1 F10oror

N_ G02 X2 Y1 R1N_ G02 X2 Y1 R1

Page 28: Cnc part programming 4 unit

G02 Circular G02 Circular Interpolation (CW)Interpolation (CW)

5

10

15

20

25

5 10 15 20 25 30

C

C

Circular interpolation from A to Babout a circle centered at C N10 G02 X20000 Y10000 I5000 J15000 F2500

A

B

I=5

J=15

Page 29: Cnc part programming 4 unit

The sequence of some machining operations is may be the same for any part and for any machine. For example, drilling a hole involves the following steps:

Position the tool above the point where the hole will be drilled

Set the correct spindle speed

Feed the tool into the workpiece at a controlled feed rate to a predetermined depth

Retract the tool at a rapid rate to just above the point where the hole started

Canned Cycles

Page 30: Cnc part programming 4 unit

Some Commonly Used Canned Cycle

Code Function Down feed At bottom Retraction

 

G81 Drilling Continuous feed

No action Rapid 

G82 Spot face, counterbore

Continuous feed

Dwell Rapid 

G83 Deep hole drilling Peck No action Rapid  

G84 Tapping Continuous feed

Reverse spindle

Feed rate

 

G85 Through boring(in & out)

Continuous feed

No action Feed rate

 

G86 Through boring(in only)

Continuous feed

Stop spindle

Rapid 

Page 31: Cnc part programming 4 unit

G81 ILLUSTRATIONG81 ILLUSTRATION

Page 32: Cnc part programming 4 unit

Three Main parts of a CNC Three Main parts of a CNC programprogram

• N5 G90 G2N5 G90 G211 (Absolute units, (Absolute units, metricmetric))

• N10 M06 T2 N10 M06 T2 (Stop for tool change, (Stop for tool change, use use tool # 2)tool # 2)

• N15 M03 S1200 N15 M03 S1200 (Turn the spindle (Turn the spindle on CW to on CW to 1200 rpm)1200 rpm)

Part 1- Program PetupPart 1- Program Petup

Page 33: Cnc part programming 4 unit

Three Main parts of a CNC Three Main parts of a CNC programprogram

• N20 G00 X1 Y1 N20 G00 X1 Y1 (Rapid to X1,Y1 from origin (Rapid to X1,Y1 from origin point)point)

• N25 Z0.125 N25 Z0.125 (Rapid down to Z0.125)(Rapid down to Z0.125)• N30 G01 Z-0.125 FN30 G01 Z-0.125 F100100 (Feed down to Z-0.125 at (Feed down to Z-0.125 at

100 mm/100 mm/mminin))• N35 G01 X2 Y2 N35 G01 X2 Y2 (Feed diagonally to X2,Y2)(Feed diagonally to X2,Y2)• N40 G00 Z1 N40 G00 Z1 (Rapid up to Z1)(Rapid up to Z1)• N45 X0 Y0 N45 X0 Y0 (Rapid to X0,Y0)(Rapid to X0,Y0)

Part 2- Chip RemovalPart 2- Chip Removal

Page 34: Cnc part programming 4 unit

Three Main parts of a CNC Three Main parts of a CNC programprogram

• N50 M05 N50 M05 (Turn the spindle (Turn the spindle off)off)

• N55 MN55 M000 0 ((PProgramrogram stop stop))

Part 3- System ShutdownPart 3- System Shutdown

Page 35: Cnc part programming 4 unit

EXAMPLE OPERATION on EXAMPLE OPERATION on CNC MILLING MACHINECNC MILLING MACHINE

Page 36: Cnc part programming 4 unit

G-CODE PROGRAMG-CODE PROGRAM• First pass : conventional

mill to a depth of 0.125 around edge profile. Tool 1 is a ½ inch dia. end mill.

% :1002 N5 G90 G20 N10 M06 T1 N15 M03 S1200 N20 G00 X0.125 Y0.125 N30 Z0.125 N35 G01 Z-0.125 F5 N40 X3.875 N45 Y4.125 N50 X0.125 N55 Y0.125

Page 37: Cnc part programming 4 unit

• Second pass: conventional mill to a depth of 0.25 around edge profile.

N35 Z-0.250 N40 X3.875 N45 Y4.125 N50 X0.125 N55 Y0.125 N60 Z0.125

Page 38: Cnc part programming 4 unit

• Third pass: conventional mill to a depth of 0.125 around pocket profile.

N65 G00 X1.25 Y1.0 N70 G01 Z-0.125 F5 N75 X1.75 N80 Y2.5 N85 X1.25 N90 Y1.0 N95 Z0.125

Page 39: Cnc part programming 4 unit

• Fourth pass: climb mill to a depth of 0.125 across remaining material.

N100 Y2.125 N105 X2.625 N110 Z0.125 N115 G00 X-5 Y-5

Z5 N120 M05 N125 M30

Page 40: Cnc part programming 4 unit

Advanced features:Advanced features:

• Execution of the part of the program Execution of the part of the program in a rotated or mirrored position.in a rotated or mirrored position.

• Ability to scale the program and Ability to scale the program and produce larger or smaller programs.produce larger or smaller programs.

• Three dimensional circular Three dimensional circular interpolation which produces a helical interpolation which produces a helical shape.shape.

• Parabolic and cubic interpolation.Parabolic and cubic interpolation.

Page 41: Cnc part programming 4 unit

• NC program preparation may be tedious NC program preparation may be tedious and difficult if the part to be machined and difficult if the part to be machined has a complex geometry. The main has a complex geometry. The main difficulty is to find out the cutter difficulty is to find out the cutter locations during the machining. locations during the machining. Computers may be used to assist the Computers may be used to assist the programmers in preparing the NC codes.programmers in preparing the NC codes.

Computer Aided Part Programming:

Page 42: Cnc part programming 4 unit

Advantages of applying computer-aided Advantages of applying computer-aided part programming include the following:part programming include the following:

• 1. It reduces the manual calculations 1. It reduces the manual calculations involves in determining the geometric involves in determining the geometric characteristics of the part.characteristics of the part.

• It provides the cutter path simulation.It provides the cutter path simulation.• It provides tool collision checking.It provides tool collision checking.• It shortens the program preparation time.It shortens the program preparation time.• It makes the program preparation easier.It makes the program preparation easier.

Page 43: Cnc part programming 4 unit

• The Aerospace Industries Association sponsored the The Aerospace Industries Association sponsored the work that led to the first part programming language, work that led to the first part programming language, developed in MIT in 1955.developed in MIT in 1955.

• This was called:This was called: Automatically Programmed ToolsAutomatically Programmed Tools (APT). (APT).• APT is an English like simple programming language APT is an English like simple programming language

which basically produce the which basically produce the Cutter LocationCutter Location (CL) data. (CL) data. • Using the cutter location data, the program can generate Using the cutter location data, the program can generate

the actual NC codes by using a postprocessor .the actual NC codes by using a postprocessor .

Page 44: Cnc part programming 4 unit

• The output of any CAD package include the geometric data of The output of any CAD package include the geometric data of the part to be machined. Therefore, many CAD/CAM package the part to be machined. Therefore, many CAD/CAM package can produce cutter location (CL) data to be used for NC code can produce cutter location (CL) data to be used for NC code generation.generation.

• There is still to be a process planning module for a workable There is still to be a process planning module for a workable NC code generation. NC code generation.

• Some of the CAD/CAM packages that have the NC code Some of the CAD/CAM packages that have the NC code generation capabilities are Computervision, CATIA, CADAM, generation capabilities are Computervision, CATIA, CADAM, ProEngineer, MechanicalDesktop (Auto Desk).ProEngineer, MechanicalDesktop (Auto Desk).

CAD/CAM Based Part Programming:CAD/CAM Based Part Programming:


Recommended