+ All Categories
Home > Engineering > CNC Programming

CNC Programming

Date post: 08-Jan-2017
Category:
Upload: rajguptanitw
View: 214 times
Download: 14 times
Share this document with a friend
42
CNC Programming
Transcript

CAD/CAM Principles and Applications

CNC Programming

13.1 Part Programming Fundamentals Process planningAxes selectionTool selectionCutting process parameters planningJob and tool setup planningMachining path planningPart program writingPart program proving

2

Fig. 13.1 The steps involved in the development of a proven part program in NC machining3

Fig. 13.2 A typical component for NC machining 4

Fig. 13.3 Part for NC machining shown with axes system at the centre 5

Fig. 13.4 Same part as in Fig. 13.3 but with axes system at the bottom left corner6

Fig. 13.5 Tool path of the part for proving the NC part program7

Fig. 13.6 Shaded 3D image of the tool cutting the part for providing more realistic proving of the NC part program (Courtesy Virtual Gibbs Inc.)8

Fig. 13.7 Setup sheet for a machining centre part 9

13.2 Manual Part Programming Methods ISO standards for codingCo-ordinate functionFeed functionSpeed functionTool functionG CodesM Codes10

Some Word addressesA Angular dimension around X axisBAngular dimension around Y axisCAngular dimension around Z axisFFeed functionGPreparatory functionHUnassignedIDistance to arc centre or thread lead parallel to XJDistance to arc centre or thread lead parallel to YKDistance to arc centre or thread lead parallel to ZMMiscellaneous functionNSequence numberOReference rewind stopSSpindle speed functionTTool functionUSecondary motion dimension parallel to X*VSecondary motion dimension parallel to Y*WSecondary motion dimension parallel to Z*XPrimary X motion dimensionYPrimary Y motion dimensionZPrimary Z motion dimension11

G Codes or Preparatory FunctionsG00Point-to-point positioning, rapid traverseG01Line interpolationG02Circular interpolation, clockwise (WC)G03Circular interpolation, anti-clockwise (CCW)G04DwellG13-G16Axis designationG17XY plane designationG18ZX plane designationG19YZ plane designationG33Thread cutting, constant leadG34Thread cutting, linearly increasing leadG35Thread cutting, linearly decreasing leadG40Cutter compensation-cancels to zeroG41Cutter radius compensation-offset leftG42Cutter radius compensation-offset rightG43Cutter compensation-positiveG44Cutter compensation-negative

12

G Codes or Preparatory FunctionsG53Deletion of zero offsetG54-G59Datum point/zero shiftG63Tapping cycleG64Change in feed rate or speedG70Dimensioning in inch unitsG71Dimensioning in metric unitsG80Canned cycle cancelledG81-G89Canned drilling and boring cyclesG90Specifies absolute input dimensionsG91Specifies incremental input dimensionsG92Programmed reference point shiftG94Feed rate/min (inch units when combined with G70)G95Feed rate/rev (metric units when combined with G71)G96Spindle feed rate for constant surface feedG97Spindle speed in revolutions per minute

13

Fig. 13.8 Absolute (G90) and incremental (G91) systems14

N007 G90 G01 X5.0 Y10.0N008 X25.0 Y15.0N009 X35.0 Y5.0

N007 G91 G01 X5.0 Y10.0N008 X20.0 Y5.0N009 X10.0 Y-10.0

Fig. 13.9 XY plane selection for vertical axis milling machines 15

Fig. 13.10 XY plane selection for horizontal axis milling machines16

Fig. 13.11 XZ plane selection for horizontal axis milling machines17

Fig. 13.12 YZ plane selection for horizontal axis milling machines18

Fig. 13.13 Setting the workpiece on the machine table 19

N015 G92 X200.0 Y170.0 Z50.0

Fig. 13.14 Positioning, preparatory function G0020

N105 G90 G00 X150.0 Y30.0

Fig. 13.15 Positioning, preparatory function G00 in 3 dimensions 21

Absolute Programming A to B N110 G90 G00 X50.0 Y45.0 Z40.0N120 X90.0 Y90.0 Z70.0

Incremental Programming A to B N110 G90 G00 X50.0 Y45.0 Z40.0N120 G91 X40.0 Y45.0 Z30.0

Fig. 13.16 Linear interpolation, preparatory function G01 22

If a cut has to be made from D to E N115 G01 X110.0 Y30.0 F250

Fig. 13.17 Circular interpolation, preparatory function G02/G03 23

When the motion is from F to G N125 G02 X65.0 Y60.0 I35.0 J-10.0 F250

When the motion is from G to F N130 G03 X15.0 Y30.0 I-15.0 J-40.0 F250

Fig. 13.18 Circular interpolation in XY plane using G17 plane selection24

Fig. 13.19 Circular interpolation in XZ plane using G18 plane selection25

Miscellaneous Functions, MM00Program stop, spindle and coolant offM01Optional programmable stopM02End of program-often interchangeable with M30M03Spindle on, CWM04Spindle on, CCWM05Spindle stopM06Tool changeM07Coolant supply No. 1 onM08Coolant supply No. 2 onM09Coolant offM13Spindle on, CW + coolant onM14Spindle on, CCW + coolant onM19Spindle stop at specified angular positionM30 Program stop at end tape + tape rewind

26

Fig. 13.20 Example 27

The component to be machined is shown in Fig. 13.20. It is assumed that the pocket is through and hence only outside is to be machined as a finish cut of the pocket. The tool to be used is a 20 mm diameter slot drill. If an end mill is to be used the program should be modified with a hole to be drilled at B first before the end mill is used. The setting is done with point A as reference (0, 0, 0) and the reference axes are along X and Y directions.

28N001 G92 X0 Y0 Z0N002 G90N003 G00 X25.0 Y25.0 Z2.0 T01 S3000 M03N004 G01 Z-12.0 F120N005 Y75.0N006 X65.0N007 G02 Y25.0 I0 J-25.0N008 G01 X25.0N009 Z2.0N010 G00 Z50.0 M05N011 X0 Y0N012 M30(absolute presetting at A)(absolute programming)(tool brought rapidly at B, 2mm above XY plane)(tool goes down to full depth)(proceeds to C)(proceeds towards right to D)(cuts curved profile till E)(proceeds to B)(tool moves 2 mm above the XY plane)(spindle stops and rapidly moves up)(rapid move to start position 0,0)(end of program and tape rewind)

29

N010 G71 G92 X0 Y0 Z0(Set point)N015 G90(Absolute programming)N020 T01 S500 M06(Tool change speed setting)N025 G00 Z2.0 M03(Rapid move to clearance plane)N030 G01 Z-5.0 F100(Feed to the required depth)N035 Y80.0 F120(Cut along straight line)N040 G02 X20.0 Y98.0 R20.0 F100(Circular move)N045 G01 X98.0(Cut along straight line)N050 Y20(Cut along straight line)N055 G02 X80.0 Y2.0 R18.0(Circular move)N060 G01 X18.757(Straight line to the intersection point)N065 X2.0 Y18.757(Straight line to the intersection point)N070 Z2.0 M05(Feed to clearance plane Stop spindle)N075 G0 X0 Y0 Z0(Rapid to set point)N080 M02(End of program)

Fig. 13.26 Tool length compensation 30

13.7 Canned CyclesCanned cycle or fixed cycles are the G-codes used to combine a number of common motions that are used with some types of operations such as drilling of holes.31

Fig. 13.27 Typical motions embedded in G81 canned cycle32

N G81 X Y Z R

Fig. 13.28 Example for canned cycles.33

Without canned cycle:N010 G00 X25.0 Y35.0 Z2 *N015 G01 Z-18.0 F125 *N020 G00 Z2 *N025 X55.0 Y50.0 *N035 G01 Z-18.0 F125 *N040 G00 Z2 *N045 X75.0 Y70.0 *N050 G01 Z-18.0 F125 *N055 G00 Z2.0 *N065 X0 Y0 Z50 *

With canned cycle:N010 G81 X25.0 Y35.0 Z-18.0 R2.0 F125 *N015 X55.0 Y50.0 *N020 X75.0 Y70.0 *N025 G80 X0 Y0 Z50 *

Table 13.2 Standard canned cycle motions34Canned cycle Feed from surfaceAt programmed depth (end of feed point)Used fornumberDwellSpindle speedSpindle return motionG80G81G82G83G84G85G86G87G88G89OffConstantConstantIntermittentConstantConstantConstantConstantConstantConstant----Yes----------YesYesStop------Reverse--StopStopStop----RapidRapidRapidFeedFeedRapidManualManualFeedCancel canned cycleDrilling, centre drillingCounter sinking, Counter boringDeep hole drillingTappingReamingBoringMultiple BoringBoringBoring

Fig. 13.35 Cutter radius compensation35

G40: Compensation OFFG41: Cutter is on the left of the programmed pathG42: Cutter is right on the programmed path

Fig. 13.36 Example on cutter radius compensation (G42)36

N030 G42 G00 X110 Y140(Start-up command A-1)N035 G01 X0 F120 (Move 1 2) N040 Y0(Move 2 3)N045 X60(Move 3 4)N050 X110 Y50(Move 4 5)N055 Y140(Move 5 6)N060 G40 G00 X160 Y170(Cancel compensation, 6 A)

Fig. 13.37 Example of cutter radius compensation (G41 & G42)37

Fig. 13.38 Example for contour programming using the cutter radius compensation38

Fig. 13.40 Part drawing for example 13.8 39

A complete part program using the ISO codes for the following component for the different holes present in the component shown in Fig. 13.40. The cutting speed to be used is 50 m/min and the feed rate is 0.08 mm/rev. Use the lower left hand corner of the part as the datum.

Solution40Op. No.DescriptionTool requiredSpindle, RPMFeed, mm/min1020304050Drill two holesCounter bore two holesDrill two holesBore the two holesReam two holesTwist drill 7 mm diaEnd mill 10 mm diaTwist drill 5 mm diaBoring bar 5.5 mm diaReamer 6 mm dia22001590318028902650175125250230210

Given V = 50 m/min and f = 0.08 mm/rev

Feed to be used = 0.080 2200 = 176 mm/min

41%O1308N010 G71 G92 X0 Y0 Z50N015 G90N020 T01 S2200 M06(P N Rao) (September 22, 2008)(Stock 75 x 50 x 20mm)(Drill 7 mm diameter)N025 G81 X12.5 Y37.5 Z-22.0 R2.0 F175 M03N030 X62.5 Y12.5N035 G80 X-50.0 Z50.0(Start drilling)

(End of cycle)N040 T02 S1590 M06N045 G82 X12.5 Y37.5 Z-7.0 P1.0 R2.0 F125N050 X62.5 Y12.5N055 G80 X-50.0 Z50.0(End mill 10 mm diameter)

(End of cycle)N060 T03 S3180 M06N065 G81 X12.5 Y12.5 Z-22.0 R2.0 F250N070 X62.5 Y37.5N075 G80 X-50.0 Z50.0(Drill 5 mm diameter)

(End of cycle)N080 T04 S2890 M06N085 G86 X12.5 Y12.5 Z-22.0 R2.0 F230N090 X62.5 Y37.5N095 G80 X-50.0 Z50.0(Bore 5.5 mm diameter)(Boring cycle)

(End of cycle)N100 T05 S2650 M06N105 G85 X12.5 Y12.5 Z-22.0 R2.0 F210N110 X62.5 Y37.5N115 G80 X-50.0 Z50.0 M05(Reamer 6 mm diameter)(Reaming cycle)

(End of cycle)N120 G00 X-50.0 Y-50.0N130 M02(End of program)

Fig. 13.41 Simulation of the program for example 13.842


Recommended