1 / 36

General

General. 1- Composition of a part programs. 2- Block Configuration. 3- Part programming Block format : N G X (u) Y (w) Z F M S T N (block number): Each block of information must be allocated a number. Ex: N0010, N0020,

feleti
Download Presentation

General

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. General • 1- Composition of a part programs. • 2- Block Configuration. • 3- Part programming Block format: • N G X(u) Y(w) Z F M S T • N (block number): • Each block of information must be allocated a number. • Ex: N0010, N0020, • It is recommended that the blocks are programmed in increments of 10 to allow for further block insertion. • G (code for preparatory function): • A G code is a command to the control unit to perform some specific task or function. • G code is made from the G address letter and a two digit number: G00, G01 • Some G codes remain active till replaced or cancelled. These are called modal (retained) G codes. • G code from group 0 are non-modal. • XYZ (position co-ordinate data): • These letters refer to movement along the designated axes. • Use XYZ when absolute mode is intended. • Use U,W when incremental mode is intended. • F (feed function): • The movement of the tool at a specified speed for cutting is called the feedrate. • The feedrate is defined using the F address letter followed by a numerical value: F256 • Feedrates can be specified as either millimetre or inches movement per minute or revolution. • Incorrect feedrates may result in damage to the cutting tool or the work piece.

  2. 4- Tool Movement • M code (miscellaneous functions): • are (non-standard) commands to the control unit to perform special tasks. • M codes are defined using the M address letter and a two digit number EX: M03 spindle forward • S (spindle speed function): • The rotational speed of the tool with respect to the work piece being cut is called the spindle speed. • Four digit number following the S code specifies the speed in RPM. • When a move command and a S code is specified in the same block a simultaneous execution of the command is performed. • T (tool function): • A tool from the ATC is selected using the address letter T followed by a number in ATC magazine position. • To command a tool change the M06 code would precede the number of the “new” tool required. Ex: M06 T01 Point-to-Point This is a rapid traverse movement that moves the slide to the next position required. Axes movements are not co-ordinated with each other so care must be taken to avoid collision with clamps. This is used for tool positioning and no cutting should be undertaken. Line Motion (Linear interpolation) Tool moves along the specified straight line with a given feed rate. Line motion is used when the tool is to cut in a straight line under co-ordinated axis movement. Contouring This involves programming that is similar to line motion in that the next position is specified and a feed rate is given but an arc movement is achieved.

  3. 5- SAFETY De to the great cutting forces that these machines are capable of producing and the increased feed rates over conventional machines, great care must be taken at all times as any fault in the program may have disastrous effects on the machine and the operator. • Safety Rules: • Make sure you know how to stop the machine in case of an emergency. • Make sure that the machine guards are in position when machining. • If you suspect something is going wrong, STOP the machine immediately. • Isolate the machine before any adjustments. • Do not attempt to use the machine until you are sure you can use it correctly. • Part programs should be proved prior to machining using a dry run or computer simulation. 6- Program Proving

  4. Methods of checking/verification Graphical simulation: computer graphics are used to simulate the workipece and the cutting tool movements. Any errors in the program will be highlighted prior to the program being entered into the machine and therefore the programmer is able to edit/correct his program.

  5. Y Z X Dry Run: this method of program proving is done on the machine tool but the component or billet to be cut is not installed. As the tool or cutter moves in air the operator looks to see that the cutting tool will not collide with proposed clamping and fixture arrangements or the part. A dry run can be done in single step mode which means that the part program can be run block by block under the control of the operator. All CNC machine controllers have this facility. • DATUM: • Machine datum: defines the zero point of all axes which is fixed by the manufacturer. We can use zero offset facilityto move this datum. • Program/work datum is specifiedby the programmer when the program is written. All subsequent measurements are then made relative to this new “program” datum.

  6. Co-Ordinate Dimensioning: • There are two types of co-ordinate dimensioning systems used in CNC programming: • Incremental: where next position measurements are taken relative to the current position. • - an error made in one dimension will effect subsequent measurements • - if a dimension changes then the rest of dimension will have to be • changed • Absolute: Dimensions are always measured from the same datum position therefore there are no build-up or accumulation of errors between dimensions. Y X 2 1 3 4 5 6 Incremental Absolute

  7. G&N programming for CNC lathe6- Absolute and Incremental Co-ordinates • The addresses X and Z within a program relate to a co-ordinate position from the workpiece datum. • The address U and W within a program relate to the individual axis movements required to reach the new position, from the last position reached by the tool. The address U refers to the X axis and the address W refers to the Z axis. X axis Dia 30 Z axis Dia 20 50 • Four different ways can be used to write a block within a program: • Absolutes/ absolutes G01 X30 Z-50; • Incremental/incremental G01 U10 W-50; • Absolutes/incremental G01 X30 W-50; • Incremental/absolutes G01 U10 Z-50;

  8. List of G Codes (Turning machine) G00 positioning (rapid traverse) G01 liner interpolation (feed) G02 circular interpolation CW G03 circular interpolation CCW G04 dwell G20 inch data input G21 metric data input G28 reference point return G40 tool nose radius compensation cancel G41 tool nose radius compensation left G42 tool nose radius compensation right G50 work coordinate change/Max spindle speed setting G70 finish cycle G71 stock removal in turning –X G72 stock removal in facing-Z G73 pattern repeating G74 Peck drilling in Z axis G75 Grooving in X axis G76 multiple thread cutting cycle G81 deep hole drilling G90 diameter cutting cycle A (outer/inner) G92 thread cutting cycle G94 cutting cycle B (end face cycle) G96 assessed surface speed control G97 Assessed surface speed control cancel G98 feed per minute G99 feed per revolution

  9. G Codes • G00 /Rapid positioning & traverse (modal) • Executes a non cutting movement at a rapid feedrate to a specific coordinate position in the working area (absolutes mode) or a certain distance from previous position (increment mode). • The two axes move completely independent off each other at the maximum feedrate along a non vector path. Dia. X 30 Non vector movement 2.0 G00 X30 Z2 P1 Z 0.0 G00 Z2 X30 G00 is modal 2.0 • G01 /Linear interpolation (modal) • The G01 executes a cutting movement following a straight line at a set feedrate. G01 X(or U) Z(or W) F • The feedrate value programmed into the G01 command is the actual feedrate along the proposed tool path, not the feed rates of the slide. • On two axis movements, the machine controller will calculate the separate feedrates for both the X and Z slides, enabling the actual vector feedrate to equal that stated in the G01 command. • The coordinates can be programmed in absolutes values as X and Y, or incremental values as U and W. • The coordinates may be programmed in mixed modes.to

  10. +X +Z Absolute: G01 Z-25 F0.1; X40 -Z50; Incremental: G01 W-25 F0.1; U15 W-25; Mixed: G01 W-25 F0.1; X40 W-25; Feedrate values are modal. P3 P2 P1 25 Dia 25 50 40 Dia • G02/G03 circular interpolation (modal) • G02 executes a cutting movement following a clockwise circular path at a set feedrate. • G03 executes the cutting movement following an anticlockwise circular path at a set feedrate. • When using absolute position, X & Z values are the dimensions of the end point of the arc in relation to the datum position of the component. • In incremental mode, U & W are the distance the tool moves from the start position of the arc. This can either be a plus value or a minus value depending on the direction of the movement relative to the start position. • G02 X Z R Absolute G03 X Z R • G02 +/-U +/-W R Incremental G03 U W R End R G02 X30 Z-30 R F G02 X30 W-20 R F Start 30 Dia 10 20

  11. +X +Z • When you do not know the radius: A case for I and K • To program an arc when only the arc center is given use the address letter I and K. • I relates to the address X and is the incremental value and direction from the start point of the arc in the X axis to the arc center. • K relates to the address Z and is the incremental value and direction from the start point of the arc in the Z axis to the arc center. Center of ARC I End Absolute G02 X Z I K F; Incremental G02 U W I K F; Start K Finish Start I Z • G04 /Dwell • G04 X-- (Integer time in seconds) G04 X10 • G04 U- (Real time in seconds) G04 X10.5 • G04 P-- (time in milliseconds) G04 P2500 • Used to enter a set time delay into the program. • No decimal points can be used with address P • Dwell is performed at the start of the block in which it is programmed. • G04 is non-modal

  12. G20-G21 / Inch-Metric Data input unit • The machine controller can be programmed in either inch unit input or metric unit input. • G20 Imperial/Inch lowest value 0.0001 • G21 Metric/Millimeter lowest value 0.001 • Do not switch between G20/G21 during a program • The offsets must be set according to the units of measurement being used. • Offsets !!!!!!!!!!!????!! • There are two parameters that are different from tool to tool. These are radius and length. • The offset compensation table is a useful means of overcoming this problem. 40 60 100 100-40-10 100-60-10 50 10 • G28 /Reference point return • G28 X(U) Y(W) • The reference point is a fixed position on the machine to which the tool can be moved. (home position) • G28 instructs the tool to automatically move to this reference point. • X/Y/ can be used to indicate an intermediate point through which the tool will pass before continuing to the reference point.

  13. G28 moves are performed at rapid traverse rates (non-vector tool path) Reference Point Collision Point P2 G28 U0 W0 when no intermediate points are required U&W are set to zero. P1 P3 Reference Point P2 P1 G28 X100 Z-40 To avoid this collision the tool is sent on a path through the intermediate point P2. Dia 80 40 • G50 / 1- Clamping maximum spindle speed. • 2- Coordinate system setting. • 3- Coordinate system shift. • 1- Clamping maximum spindle speed. G50 S____ • The value in word address S specifies the maximum spindle speed measured in RPM. • this command can be used in conjunction with G96 (Constant surfaces speed control) to clamp the spindle speed to the given value. • 2- Coordinate system setting. • This command can be used to specify a user coordinate value to register as the current position of the tool. The tool will think it is at the specified coordinates although it has not actually moved.

  14. 40 40 20 30 30 20 20 10 10 10 10 20 20 30 30 40 40 +Z +Z 20 10 0 10 G50 X10 Z10 • 3- Coordinate system shift. • If incremental word addresses are used to specify the values then this command shifts the coordinate axes by the specified values. 20 10 20 0 10 G50 U10 W10 • G71 / Stock removal in X axis. • G71 is a canned cycle that generates the roughing cuts needed to make a component profile. R R = retract escaping amount. F= feedrate for roughing. U1= depth of cut in X axis (Radius value) U2=finishing allowance in X axis (sign & Mag) W=finishing allowance in Z axis (sign & Mag) U1 r B F F U2 Programmed Path A W

  15. Prior to writing this command the tool is positioned at the start point. The sequence of tool moves are as follows: • A- roughing cycle. • 1- From the start position, the tool moves a distance U2 along the X axis and W along the Z axis at a rapid feed rate. • 2- the tool moves the distance U1 along the X axis towards the billet centerline at a feed rates corresponding to the G code in the ns block. • 3- the tool moves along the Z axis towards the spindle. The feedrate used is a stated in the second block of G71. • 4- at this point the tool retracts in the X and Z axis away from the work at an angle of 45 degrees at a rapid traverse. feedrates. The amount R is stated in the first block of the G71. • 5- the tool then retracts along the Z axis at a rapid feedrate until it reaches the start point of that same diameter. • 6- from this point the above cycle is repeated until the programmed shape between ns and nf has been roughed out. • 7- after all the roughing passes are completed a singled roughing profile pass is performed at G71stated feedrate. when this single pass is complete the tool will retract to the original starting position of the G71. • B-finishing cycle. • 8- if the next block contains G70 the same tool will be used to perform the finishing pass at feedrate and spindle speed contained between ns and nf. • should a different tool be required to perform the finishing pass: • a) The block after nf would instruct the machine to move to a tool change position. • The next block would instruct the machine to change to the tool required for the finishing pass. • The next block would move the tool back to the original G71 starting position. • At this point the finishing pass block would be read into the machine and executed. • 9- When the finishing pass ends the tool will retract to original G71 start position. • G71 command is written in the following format: N ns …………F…..; • G71 U(1) R__; ……….; • G71 P ns Q nf U(2) W_ F_; F …….; • S …….; • Any F or S commands between ns to nf block N nf ……………….; • numbers will only be effective on the finishing pass. Move commands are specified between program block numbers ns to nf.

  16. In canned cycle G71 only an X axis move is permitted in the first block of the finished profile. • Only G00, G01, G02, G03 and G04 can be programmed between ns and nf blocks. 30 12 35 25 Dia 38 Dia 30 Dia 20 Dia 1.5 Chamfer 1 Rad 3 Rad N0050 G00 X38 Z2; start & finished position N0060 G71 U1.5 R0.5; N0070 P80 Q170 U2 W0.1 F0.15; N0080 G01 X16 F0.3; (ns) N0090 Z0.5; N0100 X20 Z-1.5 F0.05; N0110 Z-30 F0.075; N0120 X23; N0130 G03 X25 Z-31 R1; N0140 G01 X30 Z-65; N0150 Z-74; N0160 G02 X36 Z-77 R3; N0170 G01 X38.5; (NF) N0180 G70 P80 Q170; Finish pass • G70 /Finishing Cycle G70 Pns Qnf • After part profile rough cutting has been competed using G71-G72-G73 codes the G70 can be used to perform a finishing pass/cut. • ns = the sequence number of the start block for the finishing pass. • nf = the sequence number of the last block for the finishing pass. • When the finished pass is ended the tool returns to the position it was originally at before G70 was commanded. • F and S between the sequence numbers ns and nf will be effectively in the G70 operation.

  17. 20 Dia 1.5 Chamfer 1.5 Rad 32 Dia 15 15 15 N0070 G00 X16 Z2; N0080 G71 U1.25 R0.5; N0090 G71 P100 Q170 U-1.5 W0.07 F0.075; N0100 G01 X36 F0.3; N0110 Z0.5; N0120 X32 Z-15 F0.05; N0130 Z-15 F0.07; N0140 X20 Z-30; N0150 Z-43.5; N0160 G03 X17 Z-45 R1.5 F0.05; N0170 G01 X15.8; N0180 G70 P100 Q170; • G72 /Stock removal in Z axis • similar to G71except that the cut is applied in the Z axes. • G72 W(1) R__; • G72 Pns Qnf U__ W(2) F__; W1 F= feedrate. r= rapid traverse. W1= depth of cut. U= finishing cut allowance in X axis. R=escaping amount. ns= sequence number of the first block of the programmed finished shape. nf= sequence number of the last block of the programmed finished shape. U= distance and direction of the finished allowance in the X axis. W(2)= finishing cut allowance in Z axis. F=feedrate for roughing. A F r R Programmed Path U B W(2)

  18. Only a Z axis move is allowed in the ns block. • If the finishing pass is required to block G70 Pns Qnf is placed after the G72 command has been completed. U 20 Dia 80 Dia 60 Dia 60 Dia 40 Dia 10 20 10 10 10 N0050 G00 X81 Z2; N0060 G72 W2 R0.5; N0070 G72 P80 Q150 U0.5 W1 F0.1; N0080 G00 Z-60; N0090 G01 X80 F0.2; N0100 X60 W10 F0.075; N0110 W10; N0120 X40 W10; N0130 W20; N0140 X180 W11; N0150 W1; N0160 G70 P80 Q150;

  19. G75 / grooving cycle. • G75 permits grooving in the X axis. • G75 R(1); • G75 X(U) Z(W) P__ Q__ R(2) F__; Q R(2) P X(U) R1 peck return amount. X(U) the diameter of the depth of the groove. Z(W) the width of the groove. P stepover in the X axis measured in microns. Q pecking debt in the Z axis measured in microns. R(1) z(w) • The retract amount R(2) at the base of the groove may be impossible unless a clearance amount has been provided. If no clearance amount has been left the R(2) value must be set to zero or omitted from the block. 3mm wide grooving tool Star position X52 Z-10.5 20 Dia 5 50 Dia 40 N0060 G00 X52 Z-8; N0070 G01 X20 F0.075; N0080 G00 X52; N0090 W-2.5; N0100 G75 R0.5; N0110 G75 X20 Z-40 P5000 Q2500 R0.5 F0.075;

  20. G90 /outer diameter cutting cycle • The command G90 performs the one pass cutting cycle where the cut is applied in the x axis. • G90 is modal. • G90 can also be used to cut tapers. • To sign of R depends on the • direction of path P1. In this example • İt is entered as a minus value. W P4(R) G90 X(U)_ Z(W)_ F_; P1(R) P3(F) U/2 P2(F) X/2 • In this example both U and W are minus. Z W P4(R) U/2 P3(F) G90 X(U) Z(W) R_ F_; P1(R) P2(F) X/2 R Z 25 Dia 8 40 Dia N0060 G00 X41 Z2; N0070 G90 X35 Z-45 F0.1; N0080 X30; N0090 X25 Z-25; N0100 X20; N0110 X20 R-3.512; 20 Dia 25 20

  21. G94 /end face turning cycle • This command performs a one pass face cutting cycle. • The cut is applied in the Z axis. • G94 can also be used for cutting taper profiles. • If repetition of the move is required only the values that changed needs to be entered into the next block. W P1(R) P2(F) U/2 P4(r) P3(F) X G94 X(U) Z(W) F_ Z W P1(R) P2(F) G94 X(U) Z(W) R_ F_ R P3(F) U/2 To sign of R depends on the direction of path P1. In this example It is entered as a minus value. X R Z N0060 G00 X61 Z2; N0070 G94 X20 Z-2.5 F0.1; N0080 Z-5; N0090 Z-7.5; N0100 Z-10; N0110 Z-12.5; N0120 Z-15; N0130 G00 X21 Z5; N0140 Z-2.5; N0150 Z-5; N0160 G94 X10 Z-7.5 R-2.5; N0150 Z-11 R-6; 10 Dia 20 Dia 60 Dia 5 5 5

  22. Spindle speed • this spindle speed specified by the word address S in any block of a program may be interpreted in two ways depending on the mode selected. these are: • G96 / constant surface speed G96 S___; • The spindle speed is calculated so that the surface speed is always the specified value (in S) in relation to the tool position. • The units used will depanned on whether the machine is operating using metric or Imperial measurements. • G96 units can therefore be meters pair minutes, or feet per min. • When using G96, the work datum point must be set so that the center of rotation meets the Z axis. • G50 code defining clamping off maximum spindle speed must be used in conjunction with G96, so as not to overrun the safe maximum spindle speed off the chuck. • G96 is modal. • G97 / spindle speed in Rev Per Minute G97 S__; • Once G97 is entered all subsequent spindle speeds are defined in revolution per minutes. • G97 is the default mode at power up. • G98 / Fee per Minute G98 F__; • This command allows a feedrate written in the units, millimeters per minute or inches per minute to be entered into the machine controller. • G98 is modal therefore if a change to the feedrate is required within a program, only the F value needs to be entered. • G98 is the default condition at power up. • G99 / Per Revolution Feed G99 F__; • G99 results in feed rate of millimeters or inches per revolution depending on the previously selected units. • G99 is modal

  23. M Codes: M?? • Miscellaneous functions, called M codes, are used by the CNC control to command on/off signals to the machine functions. • The functions allocated are constant in most CNC machines however some can vary from one make of the machine to the next. • Only one M code can be programmed within each block. • M00 program stop • M01 optional stop • M02 end of program • M03 spindle forward (clockwise) • M04 spindle reverse (counter clockwise) • M05 spindle stop • M06 automatic tool change • M08 coolant on • M09 coolant off • M10 chuck open • M11 chuck close • M13 spindle forward and coolant on • M14 spindle reverse and coolant on • M25 tailstock quill extend • M26 tailstock quill retract • M30 program stop and reset • M38 door open • M39 door close • M40 parts catcher extend • M41 parts catcher retract • M98 sub program call • M99 sub program end and return Main prog. O0001 N0020 ……; N0030 ……; N0040 M98 P1000; N0090 ……; N0100 ……; N0110 M30; Sub prog. 2 O2000 N0020 ……; N0030 ……; N0040 ……; N0090 ……; N0100 ……; N0110 M99; Sub prog. 1 O1000 N0020 ……; N0030 ……; N0040 M98 P2000; N0090 ……; N0100 ……; N0110 M99;

  24. 7- G&N programming for CNC Milling Machine • DATUM: • Machine datum: Sometimes referred to as the zero datum defines the zero point of all axes which is fixed by the manufacturer. • We can use zero offset facilityto move this datum. • Program datum is specifiedby the programmer when the program is written. All subsequent measurements are then made relative to this new “program” datum. Y Z X

  25. Co-Ordinate Dimensioning: • There are two types of co-ordinate dimensioning systems used in CNC programming: • Incremental: where next position measurements are taken relative to the current position. • - an error made in one dimension will effect subsequent measurements • - if a dimension changes then the rest of dimension will have to be • changed • Absolute: Dimensions are always measured from the same datum position therefore there are no build-up or accumulation of errors between dimensions. Y X 2 1 3 4 5 6 Incremental Absolute

  26. 2 holes on CL, 8 Dia x 10 deep 20 12 30X8X5 deep 147 20 8 8 25 8 98 11

  27. O0001 N0010 G21; metric measure [BILLET X98 Y147 Z36; size of work piece [TOOLDEF T3 D8 Z20; define tool [EDGEMOVE X0 Y0 Z0; force billet datum to be at workpiece datum / for simulation set X datum to 20 / this means we have room tomove to the left the billet N0015 M6 T3; pick tool N0020 G90; Go home - absolute N0040 G00 X-4 Y4 Z-25; 1st move N0050 M03 S1500; Spindle on N0060 G01 X94 F120; 2nd cut N0070 Y143; 3nd cut N0080 X-4; make sure no corner remains N0090 Y139; N0100 X93; 4rd cut complete N0110 G00 Y140; N0120 X4; ready for last cut N0130 G01 Y4; last cut round / N0140 G00 Z10; lift clear N0150 X49 Y20; position over 1st hole N0150 G01 Z-10; N0160 G00 Z10; N0170 Y127; Over 2nd hole N0180 G01 Z-10; N0190 G00 Z10; Retract / N0200 Y73.5; Over the slot center N0210 G01 Z-5; N0220 G91; incremntal N0230 X30; N0240 X-60; N0250 G00 z10; N0260 G90; N0270 M02; N0280 M30

  28. G00 /Rapid positioning & traverse • G00 X10 Y20 Z30 • Executes non cutting movement (point-to-point) at a rapid feed rate. • Axis co-ordinate moves can be absolute or incremental • G00 freezes tool radius compensation and axis movement are independent of each other. • G00 is modal • G01 /Linear interpolationG90 G01 X100 Y50 F170 • Executes cutting movement along a straight line at a given feed rate • Axis co-ordinate moves can be absolute or incremental • G01 is modal • F is modal and is specified as inches per minute (G20) or millimeters per minute (G21) • G02-G03 /Circular interpolation • G02 (CW) and G03(CCW) executes a cutting movements in circular path. • There are four ways to program a CW/CCW circular path: • G90 G02/03 X-- Y-- R-- F-- [can use G91] • arc end point in X&Y (absolute/incremental). R length of arc radius. F feed rate. • G90 G02/G03 X-- Y-- I-- J-- F-- [can use G91] • I-- J-- defines the signed distance of the arc start point from the centre point of the arc. • For arcs exceeding 180 degree the radius value R-- must be specified as negative. • When X or Y are omitted the arc end point is located at the same position as the arc start point and the arc center is commanded by I or J, an arc of 360 degree is assumed.

  29. G04 /Dwell • G04 X-- (time in seconds) G04 X1.5 • G04 P-- (time in 1 milliseconds) G04 P2500 • Used to enter a set time delay into the program. • No decimal points can be used with address P • Dwell is performed at the start of the block in which it is programmed. • G04 is non-modal • G20-G21 /Data input unit • G20 Imperial/Inch lowest value 0.0001 • G21 Metric/Millimeter lowest value 0.001 • Do not switch between G20/G21 during a program • G28 /Reference point return • G28 X-- Y-- Z-- • the reference point is a fixed position on the machine to which the tool can be moved. (home position) • X/Y/Z can be used to indicate an intermediate point through which the tool will pass before continuing to the reference point. • G28 is non-modal • G40-G41-G42 /Cutter compensation • G41/42 the tool is positioned on the left/right hand side of the part (programmed path) as seen following the direction of movement from behind the tool. • G40 cancels cutter compensation • The radius of the tool (amount compensated by) should have been set in the machine controller.

  30. 2 holes on CL, 8 Dia x 10 deep 20 12 30X8X5 deep 147 20 8 8 25 8 98 11 • G40-G41-G42 /Cutter compensation • G41/42 the tool is positioned on the left/right hand side of the part (programmed path) as seen following the direction of movement from behind the tool. • G40 cancels cutter compensation • The radius of the tool (amount compensated by) should have been set in the machine controller. • A start-up or ramping on block must be used to allow the tool time to changefrom moving along he programmed path line to following either side of thepath line. Therefore: • G41/42 must be contained in the block or specified in the previous block and A G01 is specified in the block and the distance of the linear move must be greater than the tool compensation • The tool offset store in the table must not be 00 • G02 or G03 can not be specified in the start-up block • G40/41/42 are modal • G40 can only be performed in a block in which a linear move (G00-G01-G28) is performed

  31. XY G98 G99 R Z=0 Z XY G98 R G99 Z=0 Z Caned cycles (G73-G89) simplifies the program by replacing a number of complex machine sequence blocks with just one block. • G98 - initial point return • G99 - R point level return • G81 /Drilling- spot boring • G90/G91 G98/G99 G81 X-- Y-- Z-- R-- K-- F--; • G90 G81 X10 Y30 Z-17 R2 F75; • G91 G99 G81 X10 Y6 Z-10 R-8 K4 F100; • Rapid position to XY (initial level) • Rapid traverse to R point level • Feed to depth Z • Rapid traverse to initial Z level (G98) or R point (G99). • K defines the number or repeats • G90-G91-G42 /Absolute/incremental data format • Z defines the distance from the R point to the bottom of the hole in incremental mode or the position of the hole bottom in absolute mode. • R defines the distance from the initial level to the R point level in incremental mode or the position of the R point level in absolute mode.

  32. G82 /Drilling- counter boring • G90/G91 G98/G99 G82 X-- Y-- Z-- P-- R-- K-- F--; • Rapid position to XY (initial level) • Rapid traverse to R point level • Feed to depth Z • Dwell for value P • Rapid traverse to initial Z level (G98) or R point (G99). • K defines the number or repeats • G80 /Canned cycle cancel • The data specified (ZPQR) is retained until it is either changed or the canned cycle cancelled. • G73 /high speed peck drilling • G90/G91 G98/G99 G73 X-- Y-- Z- Q-- R-- F--; • Move rapid to XY • Move rapid to R • Feed to a depth of Q • Retract a small distance • Re-feed to a further depth of Q • Retract and repeat till Z is reached • Retract to R or initial level as specified • G 83/deep hole peck drilling • Rapid position to XY • Move rapid to R • Feed to a depth of Q • Retract rapid to R • Rapid traverse back to within 1mm depth of Q cut • Feed to a further depth of Q • Retract to R and repeat till a depth of Z is reached • G 84 /TappingG74 /Counter Tapping • G76 /Fine BoringG 85-G86-G89 /Boring • G 87 /Back boring

  33. G170 - G171 /circular pocket canned cycle • The canned cycle required two blocks G170&G171 • There are three ways to program these canned cycles • G170 R0 P0 Q3 X0 Y0 Z- nI0 J0 K-24; rough cut no allowance • G171 P75 S3000 R75 F250 B J; • For 1st block • R defines the position of the tool to start cycle • P =0 means a roughing cycle • Q defines the peck (vertical cut) increment • XY defines the hole centre • I defines the side finish allowance • J defines the base finish allowance • K defines the radius of the pocket (- means CCW) • For 2nd block • P defines the cut width percentage • S roughing spindle speed • R roughing feed in Z • F roughing feed in XY • B finished spindle speed (ignored when P=0) • J finish feed (ignored when P=0) • When the tool has finished cutting the tool retracts 1mm in the Z axis, moves to the centre of the circular pocket at rapid traverse, retracts again in the Z axis. • G170 R0 P0 Q3 X0 Y0 Z-- I0.5 J0.1 K-24; rough cut WITH • G171 P75 S3000 R75 F250 B3500 J200; finishing allowance • G170 R0 P1 Q3 X0 Y0 Z-6 I0.5 J0.1 K-24; One step finishing cycle • G171 P75 S3000 R75 F250 B3500 J200 • I&J are ignored when P=1 • S&R&F must be entered but ignored for finishing cycle

  34. G172 - G173 /Rectangular pocket canned cycle • The canned cycle required two blocks G170&G171 • G172 I-50 J-50 K0 P0 Q3 R0 X-25 Y-25 Z-6; Roughing cut • G173 I0 K0 P75 T1 S3000 R75 F250 B3500 J200 Z5; • For 1st block • I defines the pocket X length (+ CW/ - CCW) • J defines the pocket Y length • P=0 roughing cycle • Q defines Z peck increment • R defines the absolute Z R point • XYZ absolute position of the pocket corner points • For 2nd block • I pocket side finish allowance (=0 when P=0) • K Pocket base finish allowance (=0 when roughing) • P is the cut width percentage • T is the pocket tool • S roughing spindle speed • R roughing feed for Z • F Rouging feed for X and Y • B finish spindle speed • J finish feed • Z safety Z above R. • G172 I-50 J-50 K0 P0 Q3 R0 X-25 Y-25 Z-6; rough cut WITH finish • G173 I0.5 K0.1 P75 T1 S3000 R75 F250 B3500 J200 Z5; • G172 I-50 J-50 K0 P1 Q3 R0 X-25 Y-25 Z-6; One step finishing cycle • G173 I0.5 K0.1 P75 T1 S3000 R75 F250 B3500 J200 Z5;

  35. G90 /Absolute command Active when machine is first switched on G91 /Incremental command G94 /Feed per minute (G29) F6= 6 inches/min (G21) F150= 150 mm/minute G95 /Feed per revolution of spindle List of G Codes (Milling machine) G00 positioning (rapid traverse) G01 liner interpolation (feed) G02 circular interpolation CW G03 circular interpolation CCW G04 dwell G20 inch data input G21 metric data input G28 reference point return G40/G41/ G73-G89 Canned cycles G73High speed peck drilling G74 Counter tapping G76Fine boring G80Canned cycle cancel G81 Drilling – counter boaring G83Deep hole peck drilling G84 Tapping G85 Boring G86 Boring G87 Peck boring G89 Boring G90 Absolute zero command G91 Incremental command G94 feed per minute G95 feed per revolution G98Return to initial level G99Return to R point G170-G173 Cirular/Rect pockets

More Related