Presentation on theme: "IE450 Manufacturing Systems"— Presentation transcript:
1 IE450 Manufacturing Systems NC PROGRAMMINGIE450 Manufacturing SystemsR. A. Wysk, Ph.D.Questions and Comments: R. A. Wysk, Ph.D.Last Modified: Dr. R. A. Wysk1
2 Agenda Introduction Types of NC Machines Components of a NC Machine Control MechanismsInterpolationSoftware ComponentsNo other notes have been provided in this presentation. The primary reference for this lecture is Chang et al., Chapter 9 (required reading). Chapter 10 is dealt with in another presentation.1
3 ReadingsChapters 9-10 of Computer Aided Manufacturing, Wang, H.P., Chang, T.C. and Wysk, R. A., 2rd Edition ,1991.There are several references that can be used here. The web site contains a CNC Machining Center User’s Manual. It is operational at this time.
4 Exercise Readiness Assessment Test A.K.A. RAT AS A INDIVIDUAL, prepare a detailed response for the Readiness Assessment test found on the web(ratNC.doc in this module directory)Open Book / Open NotesStudents should understand what operations should be used to produce what feature. Planning a simple prismatic part is a good warm up activity for students. Here I have used the same exercise that was used for the first Lean Manufacturing Module.
5 Objectives To be able to read and interpret an NC part program To be able to create NC part programs for milled partsTo understand the difference between world, machine and part coordinatesTo understand how to set machine offsetsTo execute an NC part program
6 HISTORICAL DEVELOPMENT • 15th century - machining metal.• 18th century - industrialization, production-type machine tools.• 20th century - F.W. Taylor - tool metal - HSSAutomated production equipment -Screw machinesTransfer linesAssembly linesusing cams and preset stopsProgrammable automation -NCPLCRobots
7 NEW NCs or CNCs high speed spindle (> 20,000 rpm) high feed rate drive ( > 600 ipm)high precision ( < " accuracy)
8 NC MACHINES • Computer control • Servo axis control • Tool changers • Pallet changers• On-machine programming• Data communication• Graphical interface
9 Group ExerciseAs a group, discuss how you could justify the purchase of an NC machine.What are the downsides for purchasing an NC machine?Besides direct labor reductions, what other benefits come from NC machines?
10 NC MACHINES MCU - Machine control unit CLU - Control-loops unit DPU - Data processing unitMachineToolMCUCLUDPU
12 NC MACHINE CLASSIFICATIONS 1. Motion control:point to point (PTP)continuous (contouring) path2. Control loops:open loopclosed loop3. Power drives:hydraulic, electric,or pneumatic
13 NC MACHINE CLASSIFICATIONS 4. Positioning systems:incrementalabsolute positioning5. Hardwired NC and softwired Computer Numerical Control (CNC)
14 POINT TO POINT • Moving at maximum rate from point to point. • Accuracy of the destination is important but not the path.• Drilling is a good application.
15 CONTINUOUS PATH Controls both the displacement and the velocity. Machining profiles.Precise control.Use linear and circular interpolators.
16 COMPONENTS OF AN NC MACHINE TOOL Machine tableGearTachometerPositionboxControllertransducerMotorLeadscrewServodriveMagnetics controlcabinet
17 NC MACHINE RATING Accuracy Repeatability Spindle and axis motor horsepowerNumber of controlled axesDimension of workspaceFeatures of the machine and thecontroller.
18 NC ACCURACYAccuracy = control instrumentation resolution and hardware accuracy.Control resolution: the minimum length distinguishable by the control unit (BLU).Hardware inaccuracies are caused by physical machine errors.
19 HARDWARE INACCURACIES Component tolerances:inaccuracies in the machine elements, machine-tool assembly errors, spindle runout, and leadscrew backlash.Machine operation:Tool deflection (a function of the cutting force), produces dimensional error and chatter marks on the finished part.
20 HARDWARE INACCURACIES Thermal error:heat generated by the motor operation, cutting process, friction on the ways and bearings, etc. Use cutting fluids, locating drive motors away from the center of a machine, and reducing friction from the ways and bearings
22 LEADSCREWS pitch (p): the distance between adjacent screw threads Converting the rotational motion of the motors to a linear motion.NutLeadscrewPitchpitch (p): the distance between adjacent screw threadsthe number of teeth per inch (n):n = 1 / pBLU: Basic Length Unit (machine resolution)BLU = p / N
23 CONTROL LOOPS Open loop - No position feedback. Use stepping motor. tablepulsesmotor
24 CONTROL LOOPS A machine has 1 BLU = 0.001".To move the table 5" on X axis at a speed (feed rate) of6 ipm.pulse rate = speed/BLU = 6 ipm/0.001ipp= 6,000 pulse/minpulse count = distance/BLU= 5/0.001 = 5,000 pulses
26 INTERPOLATIONControl multiple axes simultaneously to move on a line, a circle, or a curve.Linear pathPoint-to-point control path
27 INTERPOLATORS Most common : linear and circular Since interpolation is right above the servo level, speed is critical, and the process must not involve excessive computation.Traditional NC interpolators: Digital Differential Analyzer (DDA)Higher order curves, such as Bezier's curve, use off-line approximation algorithms to break the curves into linear or circular segments.
28 COORDINATE SYSTEMS Right hand rule Z axis align with the spindle - +Z moves away from the workpiece or the spindle.X axis - Lathe: perpendicular to the spindle.Horizontal machine: parallel to the table.Vertical machine: +X points to the right.2
29 MACHINE COORDINATES Z X - Primary Feed axis Z - Spindle axis Y - Remaining axisYX3
30 PROGRAM STORAGE Paper tape Paper or Mylar coated paper. Diskettes From other computers through RS 232 or local area network (LAN)4
31 SYMBOLIC CODES ASCII or ISO, use even parity EIA - Binary Coded Decimal (BCD), RS 244A standard, use odd parity.5
32 TAPE INPUT FORMATS EIA RS-274 standard Fixed sequential format Tab sequential formatT0010 T01 T07500 T06250 T T T612Word-address formatN0010 G01 X07500 Y06250 S6126
33 Resources Primary Reference: Chang T-C., Wysk, R. A., and Wang, H-P., “ComputerAided Manufacturing”, Prentice Hall International Seriesin Industrial and Systems Engineering, Upper SaddleValley, NJ ISBN X6
34 Agenda Introduction Absolute and Incremental Programming Elements of NC ProgramNC Words (G, M, T, S, … Codes)ExamplesCutter Compensation and OffsetsConclusionsRefer to Part 1 of presentation – on types of NC machines, servo mechanisms, etc.
35 Introduction to NC programming Manual part programmingComputer-assisted part programmingFormatsFixed-AddressTab-SequentialWord-Address7
36 Manual NC programming Absolute Programming Incremental Programming Example (on Board)Discuss a simple example of moving from one point to another, ask for class input7
37 Basic Elements of NC Program Blocks of CommandsNC WordsNC Function ~ NC word(s)Several Functions in one blockWhen viewing, a block is same as a line of textPre-defined TerminatorOptional Blocks8
38 NC WORDS A G-code program consists the following words: N, G, X, Y, Z, A, B, C, I, J, K, F, S, T, R, MAn EIA standard, RS-273 defines a set of standard codes.7
39 Basic Elements of NC Program a. Preparatory functions: which unit, which interpolator, absolute or incremental programming, which circular interpolation plane, cutter compensation, etc.b. Coordinates: three translational, and three rotational axes.c. Machining parameters: feed, and speed.d. Tool control: tool diameter, next tool number, tool change.e. Cycle functions: drill cycle, ream cycle, bore cycle, mill cycle, clearance plane.f. Coolant control: coolant on/off, flood, mist.g. Miscellaneous control: spindle on/off, tape rewind, spindle rotation direction, pallet change, clamps control, etc.h. Interpolators: linear, circular interpolation8
40 NC WORDS – G codes N code. sequence number example: N0010 G code. preparatory word.*****9
41 NC WORDS- BLUX, Y, Z, A, B, C Codes. coordinate positions of the tool.The coordinates may be specified in decimal number (Decimal Programming), or integer number (BLU Programming).BLU programming: leading zero, trailing zero.In the leading zero format:X00112 Y Z001In the trailing zero format, the program looks like:X11200 Y22750 Z1000010
42 NC WORDS – Circular Interpolation Full circle ONdestination?(5.000,4.000)sequence no.centerN0100 G02 X7.000 Y2.000 I5.000 J2.000Cut from (5.000,4.000) to (7.000,2.000) CWG02 – refers to CW. G01 for CCW. G codes discussed earlier.Ask class for another example(7.000,2.000)(5.000,2.000)11
43 NC WORDS- F and S Codes F Code. feed speed. inch/min (ipm), or ipr. F code must be given before either G01, G02, or G03 can be used.Example:N0100 G02 X7.000 Y2.000 I5.000 J2.000 F6.00S Code. cutting speed code.Programmed in rpm.S code does not turn on the spindle, spindle is turned on by a M code.N0010 S1000Discuss the elements of the example.12
44 NC WORDS- T and R Codes T Code. tool number. Actual tool change does not occur until a tool change M code is specified.R Code. cycle parameter.The cycle may be programmed in one block, such as (cycle programming is vendor specific.):N0010 G81 X1.000 Y2.000 Z0.000 R 1.30013
45 NC WORDS – M CodesM Code. miscellaneous word.14
46 MANUAL PART PROGRAMMING Example 9.1Machined from a 5" x 4" x 2" workpiece. low carbon steel.The process plan:1. Set the lower left bottom corner of the part as the machine zero point (floating zero programming).2. Clamp the workpiece in a vise.3. Mill the slot with a 3/4" four flute flat end mill made of carbide. From the machinability data handbook, the recommended feed is inch/tooth/rev, and the recommended cutting speed is 620 fpm.4. Drill two holes with a 0.75" dia twist drill. Use 0.18 ipr feed and 100 fpm speed.15
47 PART DRAWING A B A l l d i m e n s i o n i n i n c h e s . A l l t o l 1.7534R2holesøABMCAlldimensionininches.Alltolerance.1"16
48 SOLUTION TO EXAMPLE 12 V D 12 x 620 fpm 0.75 inch RPM = = = 3,157 The cutting parameters need be converted into rpm and ipm.Milling:Drilling:12VD12x620fpm0.75inchRPM===3,157rpm12x100fpm0.75inch12VDRPM===509rpm17
51 PART PROGRAM Part program Explanation N0010 G70 G 90 T08 M06 Set the machine to inch formatand absolute dimension programming.N0020 G00 X2.125 Y Z4.000 S3157 Rapid to p1'.N0030 G01 Z1.500 F63 M03 Down feed to p1, spindle CW.N0040 G01 Y4.100 Feed to p2.N0050 G01 X2.625 To p3.N0060 G01 Y1.375 To p4.20
52 PART PROGRAM Part program Explanation N0070 G01 X3.000 To p5. N0080 G03 Y2.625 I3.000 J2.000 Circular interpolation to p6.N0090 G01 Y2.000 To p7.N0100 G01 X2.625 To p8.N0110 G01 Y To p9N0120 G00 Z4.000 T02 M05 To p9', spindle off, tool #2.N0130 F9.16 S509 M06 Tool change, set new feed and speed.N0140 G81 X0.750 Y1.000 Z-0.1 R2.100 M03 Drill hole 1.N0150 G81 X0.750 Y3.000 Z-0.1 R Drill hole 2.N0160 G00 X Y M30 Move to home position, stopthe machine.20
56 Tool Radius Compensation Cutter CompensationShifting tool path so that the actual finished cut is either moved to the left or right of the programmed path.Normally, shifted exactly by tool radiusTool Entry and Exit Issues23
57 Tool Radius Compensation Start of Compensation.G41 (or G42) and G01 in the same block ramp takes place at block N0010.N0010 G01 G42 X0.500 Y1.700N0020 G01 X1.500G41 (or G42) and G01 in separate blocks the compensation is effective from the start.N0010 G41N0020 G01 X0.500 Y1.700N0030 G01 X1.500(0.5, 1.7)G41(1.5, 1.7)G4223
58 Tool Radius Compensation Inside Corner.Cutter path is inside a corner, stops at the inside cutting pointN0010 G41N0020 G01 X1.500 Y2.000N0030 G01 X0.000 Y1.600Use of M96 and M97.Cutting tool that is larger than the height of the step, M97 must be usedN0020 G01 X1.000 Y1.000N0030 G01 Y0.800 M97N0040 G01 X2.000(1.5, 2.0)(0, 1.6)24
59 TOOL-RADIUS COMPENSATION Cancel Tool Compensation.G40 in the same block ramp off block.N0060 G40 X2.000 Y1.700 M02G40 in a block following the last motion, the compensation is effective to the end point (2.000,1.700).N0060 X2.000 Y1.700N0070 G40 M02(2.000, 1.700)(2.000, 1.700)25
60 EXAMPLEA square 2.0 in. x 2.0 in. is to be milled using a 1/2 in. end milling cutter. Write an NC part program to make the square.SolutionLet us set up the lower left corner of the square at (6.0,6.0). Using tool-radius compensation, the square can be produced.26
64 TURNING Programming tool point No compensation needed. Surfaces cut Programmedtool pathSurface created29
65 COMPUTER ASSISTE PART PROGRAMMING Machine-oriented languages - machine specificGeneral-purpose languages - use post processors to generatemachine specific codeTranslate input symbolsArithmetic calculationCutter offset calculationsPost processingPart programLanguageProcessorCL dataPostProcessorCLBCLN-G codeRS-494RS-273
66 Summary NC can reduce machining skill NC can reduce the time required to machine a partNC provides sophisticated contour capabilityNC is a flexible method for manufacture of sophisticated machined components