EXPERIMENT P3 CNC MACHINING

Similar documents
CNC Programming. Lecture 25. Engineering 475 Automated Production Systems

Presentation on CNC MACHINES. By: Hafiz Muhammad Rizwan

Mach4 CNC Controller Mill Programming Guide Version 1.0

ME 1355 CAD/CAM LABORATORY CNC MILLING PROGRAM. Study of G Codes and M Codes to Write Manual Part Programming for Fanuc Control Systems

Summary Of GCODE Commands By Category (HTT0196)

G and M Programming for CNC Milling Machines. Denford Limited Birds Royd Brighouse West Yorkshire England HD6 1NB Tel: +44 (0)

Course outline. Know Your Machine From A Programmer s Viewpoint 11 If you ve had experience with conventional (non-cnc) machine tools 11

GSK928MA Milling Machine CNC System. User Manual. GSK CNC Equipment

FAGOR CNC 8055 ia-mc Control

Mill Series Training Manual. Haas CNC Mill Programming

UNIT 1 INTRODUCTION TO NC MACHINE TOOLS

Proficiency Test For Machining Center

Sample. CNC Programming product family... CNC Programming: Basics & Tutorial Textbook. & CNC Programming: Reference Book. CNC Programming: Workbook

2.008 Design & Manufacturing II

Machine Tool Control. Besides these TNCs, HEIDENHAIN also supplies controls for other areas of application, such as lathes.

5. Tutorial. Starting FlashCut CNC

Setting up the DeskCNC controller.

Table of Contents Getting Started... 3 The Motors... 4 The Control Board... 5 Setting up the Computer with Mach Starting up the Equipment...

G10 Data Setting Command

Transmitter Interface Program

CNC 8055 / CNC 8055i SELF-TEACHING MANUAL ( TC OPTION) (REF 0607) (Ref 0607)

Shop-Talk Cad/Cam The language between man and machine!

Dev eloping a General Postprocessor for Multi-Axis CNC Milling Centers

HUST Lathe CNC Controller

CNCTRAIN. Cnc Simulation Systems, 1985,2009

Module 5. CNC Machines. Version 2 EE IIT, Kharagpur 1

Electron S.R.L. B55 CNC TRAINING MACHINES

What software do I need to run a CNC mill?

CNC 8055 MC. Self-teaching manual REF. 1010

Short Description Installation Starting Up Configuration. Generalized Postprocessor

SINUMERIK 810/840D DIN Programming for Milling

3300M CNC Control Editing, Part Programming and Running simple program

INTRODUCTION. Definition

CNC Applications. Tool Radius Compensation for Machining Centers

Control systems. CNC 8 x 6 CNX 8 x 9. Operation manual. Production and service: MEFI, s.r.o. Peroutkova 37, Praha 5

AXIS DESIGNATION IN NC PART PROGRAMMING

Part Programming Commands

CAD/CAM DESIGN TOOLS. Software supplied with all new and upgraded Boxford Lathes, Mills and Routers

Renishaw apply innovation TM. Calibrating 5-axis machines to improve part accuracy. 5Align

CNC Machine Control Unit

Easy Machining Center Setup

CNC Applications. Introduction to Machining Centers

H6C-M Mill CNC Controller

TEST PROJECT TEACHER GUIDELINES

INTRODUCTION TO COMPUTER NUMERICAL CONTROL

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

CNC Turning Training CNC MILLING / ROUTING TRAINING GUIDE. Page 1

CHAPTER 11: Flip Flops

Training Document for Integrated Automation Solutions Totally Integrated Automation (TIA) Module S01 Fundamentals of CNC Programming with SinuTrain

Mastercam Instructions. KTH School of Architecture Digital Fabrication Lab - CNC Router Version

TwinCAT NC Configuration

CNC HARDWARE & TOOLING BASICS

TL-Series Sub-Spindle Operator s Addendum

BRIDGEPORT CNC DX32. Programmer s Manual

Computer-Aided Numerical Control (CNC) Programming and Operation; Lathe Introduction, Advanced Mills

Radius Compensation G40, G41, & G42 (cutter radius compensation for machining centers, tool nose radius compensation for turning centers)

EasyC. Programming Tips

FACULTY OF ENGINEERING UNIVERSITY OF STELLENBOSCH USER INSTRUCTIONS FOR LEADWELL VMC40 NUMERICALLY CONTROLED MILLING MACHINE

Queensborough Community College NSF Tech ASCEND

Lathe Series Training Manual. Live Tool for Haas Lathe (including DS)

An overview of Computerised Numeric Control (C.N.C.) and Programmable Logic Control (P.L.C.) in machine automation

Motion Program 1000 Contains the G-code Subroutines OPEN PROG 1000 CLEAR ; G00: Rapid mode (N0 is implied)

Specifications for a Precision CNC Vertical Machining Center. Section I. Mechanical Performance Specifications (must meet or exceed)

SAMSUNG Machine Tools

JCUT CNC Router 3030A/6090/8090/1212/60150/1218/1224/1325/1530/A/B

H6C-T Lathe CNC Controller

CNCTRAIN OVERVIEW CNC Simulation Systems

Cabri Geometry Application User Guide

From Wikipedia, the free encyclopedia

CNC USB Controller Mk1

Working with Machine and Control Definitions

CNC PILOT 4290 NC Software xx V7. User s Manual

User Manual V

Mach3 Tutorial Setting up a basic three axis milling machine. Based on Mach3 2.0

CIM Computer Integrated Manufacturing

The Basics of a Rotary Table with Cross Slide mounted on a Mill Table, Version 2

Understanding Gcode Commands as used for Image Engraving

The Boxford range of 3-axis CNC Machining Centres are

FANUC Series 0 -MODEL D. For Machining Center System USER S MANUAL B-64304EN-2/01

Schedule of Accreditation issued by United Kingdom Accreditation Service 2 Pine Trees, Chertsey Lane, Staines-upon-Thames, TW18 3HR, UK

TRILOGI 5.3 PLC Ladder Diagram Programmer and Simulator. A tutorial prepared for IE 575 by Dr. T.C. Chang. Use On-Line Help

Teachware CNC Technology

LOCATION DEPENDENCY OF POSITIONING ERROR IN A 3-AXES CNC MILLING MACHINE

10. CNC Hardware Basics

"The CNC Baron...in service to the one who commands it!"

SolidWorks. SolidWorks Teacher Guide. and Student Courseware

NX CAM TURBOMACHINERY MILLING PRODUCT REVIEW

A Whole NEW Level of Machining Freedom. SmithyCNC Bed Mills. Product Information

Machine tool probe calibration

SmartCut EVS Series CNC Mills Combination of CNC technology and manual capability SC EVS-350B CNC SC EVS-550B CNC

ISO Dialects for SINUMERIK

PPM Users Manual Signature Software

SAMSUNG Machine Tools

A cut above the rest. sprintcut. CNC Wirecut EDM

CNC-STEP. "LaserProbe4500" 3D laser scanning system Instruction manual

MIME 3330 Mechanics Laboratory LAB 5: ROTATING BENDING FATIGUE

SECTION 13XXX CONTROL DESCRIPTION (DICP Models NC, 412, 622, 826, 1030)

RENISHAW measuring OMP 40 system EN3M0-0 Edgecam Advanced Milling ENS-M0-G EdgeCam Solid Machinist for Granite

Pos. Qty. Article Description Price / Drilling capacity in steel 60 Ø 25 mm Tapping capacity M 20 Milling capacity in steel cm³/min.

PROCESSOR CONFIGURATION SOFTWARE USER GUIDE

Transcription:

P3-1 EXPERIMENT P3 CNC MACHINING Objective: This experiment is designed to introduce the student to a typical Computer Numerical Control (CNC) machine tool. The advantages of such systems are discussed, as well as the basic control functions and machine codes. Background: The concept of computer numerically controlled (CNC) machines dates to the 1950s. Standards were established to allow interchange of CNC programs amongst different machine tools. The basic operation of such a machine tool is described below. Figure 1: CNC/CMM system schematic. A 500 MHz Pentium III based Window NT workstation, with 256 MB RAM and 20 GB of disk space, is at the heart. EdgeCAM is used as the CAD/CAM and Post Processor software. A custom written Microsoft Visual C++ program is used to parse the CL-DATA and/or G-code files. A pipe based interface to the Spatial Technology Inc. ACIS solid modeler is used for CNC geometric verification. The stepper motor based machine tool is controlled in real time, in a separate thread, using the Windows NT multimedia timer. A National Instruments PCI-6503 digital I/O card provides the interface to the stepper motor amplifiers, limit switches, and CMM touch trigger probe system. A variable speed Dremill tool is used as the CNC motor, spindle and chuck. Off the shelf carbide cutters are used for machining. The touch trigger probe system is a Renishaw PH1/TP2. An analog game joystick is used for manual positioning. The working volume of the machine is 100 mm by 100mm by 50 mm. A photograph of the system is shown in Figure 2.

P3-2 Figure 2: CNC/CMM system. Machine Code Typically, the machine code is generated from CAD/CAM software such as EdgeCAM that writes the machine control codes into an intermediate cutter location data (CL-DATA) format. A post processor, translate to the specific machine capabilities, then converts the CLDATA format to the language understood by the machine tool controller. G-Code is the most common machine code using for the machine tool controller. CNC Command Lines Computer Numerical Controllers (CNCs) accept program input line by line. Each line consists of a sequence of <address letter><numerical value> pairs. Comments are enclosed in parenthesis. For example (This is a comment.) Program number Every CNC program begins with the O address letter, which specifies the program number. Usually program numbers are restricted to the range 1-1999. No other address letter can appear on the same line as the program number. The physical end of the program is denoted by a line containing only the % (percent) character. For example, a complete CNC program (that accomplishes nothing), number 43, would be written O43 (This is a program 43.) % Line Number Optionally, each command line can begin with a number, prefixed with the N address letter.

P3-3 Spindle Speed Machine tools are usually equipped with a rotating spindle which turns the cutting tool (milling) or turns the part (lathe). To specify the rotational speed in revolutions per minute, use the S address letter. For example, to specify 2300 rpm, code S2300. Note that the S address letter only specifies the spindle speed. To begin actual rotation, an M address letter must be specified. For clockwise rotation, specify M3. For counterclockwise rotation, specify M4. To stop rotation, specify M5. To stop the spindle at a repeatable orientation, specifty M19. The M19 code is used to orient the spindle in preparation for an automatic tool change, when using boring bars, and when using touch trigger probes. For safety, never specify the S address letter while the spindle is rotating. The M codes are widely used for Programmable Logic Control (PLC) functions such as spindle rotation, tool changing, opening and closing of access doors, pallet changing, coolant on and off, etc. Tool Specification Many machine tools support automatic exchange of cutting tool using the T address letter. This indexes the carousel (milling) to the correct position in preparation for tool exchange. The actual tool exchange occurs when the M6 code is encountered. Cutting Fluid (coolant) Cutting fluid or coolant is widely used. This is controlled using M codes. To obtain flood coolant, code M7. To obtain mist coolant, code M8. To shut off coolant, code M9. Program End Each program should end with the M30 code. This instructs the CNC to complete execution and return to the first line of the program. For example, the following program loads tool number 7 into the spindle, begins spindle rotation at 500 rpm (clockwise), begins flood coolant, stops coolant, stops and orients the spindle, and ends execution: O43 (This is program 43.) T7M6 S500M3 M7 M9 M19 M30 % Units CNC s generally accept length input in either inch (G70) or millimeter (G71) mode. This is specified at the very beginning of the program.

P3-4 Axis Letters For 3-axis linear, orthogonal axis machines, the axis are labelled X, Y and Z. A right hand rule coordinate system is always used. Units are as previously specified using the G70 or G71 code. The resulting motion depends on which G address letters are in effect (see below). To avoid ambiguity, a decimal point should always be specified, even for integer values. For example, to specify an X value of 21, code X21. (period) rather than X21. Absolute/incremental mode Axis motion can be specified either in absolute coordinate (G90) or incrementally with respect to the current position (G91). The absolute mode is more commonly used. Incremental mode most often is used with subroutines, which are not covered in this brief introductory document. Point to Point (rapid) motion Points to point motion (sometimes referred to as rapid) motion is specified using the G0 code. This causes the specified axes to move from the current position to the specified new position (G90 mode), or incrementally with respect to the current position (G91 mode). Assume, for example, that the machine is currently located at position (X,Y,Z) = (12.0, 14.3, 8.4). To move from this position to (X,Y,Z)=(15.0, 14.3, 10.0), code G90G0X15.Z10. or G91G0X3.Z1.6 Note that the motion is not interpolated. That is, the path from the current to the new position is not guaranteed to be a straight line. The speed of motion (feed rate) is determined by parameters permanently stored within the CNC memory. To obtain interpolated straight line motion at a specified feed rate, use the G1 code and F address letter (see below). Returning to machine home position Every machine has a primary reference or home position. To program a return to home position, code G28. The home position is normally where tool exchanges occur, and hence it is common to code G28 T7M6 Resetting the coordinate system At power up, the machine zero position is identical to the machine home position. This is inconvenient for part programming with EdgeCAM, since it will not be known in advance where a part will be located on the machine. To resolve this, the G92 code can be used to reset the coordinate system registers. The typical procedure is to: 1. 1. Power up and home the machine. 2. 2. Set inch G70 or millimeter G71 mode. 3. 3. Execute G92X0.Y0.Z0. 4. 4. Move the machine to where the part coordinate system origin is to be located. Record the current machine coordinates as (mpx, mpy, mpz). 5. 5. Return the machine to the home position using G28 6. 6. Execute G92X-mpxY-mpyZ-mpz. Note that the negative of the recorded coordinates are used at this step. The remainder of the CNC program can now be written in part coordinates.

P3-5 Drill canned cycle Drilling holes is the most common machining operation, both for metal parts, and applications such as printed circuit boards. The CNC code for drilling is G81. The complete command line is of the form G80XxvalYyvalZzvalRrvalFfvalTtval. The machine will move in point to point (rapid) motion from the current position to the position (xval, yval, rval). It then feeds along the z-axis from the position (xval, yval, rval) to the position (xval, yval, zval) at feed rate fval. For inch (G70) mode, the feed rate is specified in inches per minute. For millimeter (G71) mode, the feed rate is specified in millimeters per minute. When the position (xval, yval, zval) is reached, motion stops for a dwell period of tval seconds. Rapid motion back to the position (xval, yval, zval) then occurs. Omitted address letters cause the previously specified value to be used. The default dwell is zero seconds. This sequence is repeated each time a new line containing an axis letter is encountered, until the G80 (end of canned cycle) code is encountered. At this point, a complete drilling example program can be coded. A description of each line is given in comments on the following line. O43 (specifies the beginning of program number 43) N1G71 (specifies millimeter units) N2G90 (specifies absolute mode) N3G28 (returns to home position) N4G92X345.Y280.Z450. (resets coordinate system for part programming) M5T1M6 (loads tool 1 into the spindle) N6S2000M3 (begins clockwise spindle rotation at 2000 rpm) N7M7 (flood coolant on) N8G0X50.8Y25.4Z1.0 (moves tool to position (50.8, 25.4, 1.0) at rapid rate) N9G81X50.8Y25.4Z-40.0R1.F200.T1. (drills at feed rate 200 mm/min to Z=-40.0, dwells 1 s, retracts to Z=1.) N10G80Z10. (cancels drilling cycle, moves to Z=10.) N11X101.6 (moves tool to (101.6, 25.4, 10.0) at rapid rate) N12G81Z-20.R1.T0. (drills at feed rate 200 mm/min to (101.6, 25.4, -20), zero dwell, retracts to (101,6, 25.4, 1.0)) N14M9 (coolant off) N15M5

P3-6 (spindle stop) N16G28 (returns to home position) N17M30 (marks end of program) % Linear Interpolation The ability to simultaneously move more than one axis in coordinated motion is the principal benefit of numerical control. Next to drilling, the most common CNC operation is milling along a straight line, at a specified feed rate. This is accomplished using the G01 code. A typical command line is G01XxvalYyvalZzvalFfval. In G90 (absolute mode), the machine moves from its current position to (xval, yval, zval) at feed rate fval. In G91 (incremental mode), the machine moves from its current position by a delta amount (xval, yval, zval). The feed rate units are inches per minute (G70) mode or millimeters per minute (G71) mode. For example, if the machine is currently located at position (200., 300., 430.) then the absolute mode command lines to move to position (240., 280., 430.) at a feed rate of 350 millimeters per minute are G71 G90 G01X240.Y300.F350. The equivalent incremental mode command lines are G71 G91 G01X40.Y-20.F350. Note that, in either case, because the coordinates do not change, the Z address letter is not required. Circular Interpolation Although a circular motion can always be approximated by a sequence of short linear moves, the frequency with which holes, fillets, etc. are machined led CNC designers to also includes circular interpolation in controllers. Within an individual command line, many controllers are restricted to motion within a single circle quadrant. This will be assumed in the following discussion. Circular interpolation must occur within one of the principal planes. To specify the XY plane, code G17. To specify the ZX plane, code G18. To specify the YZ plane, code G19. Clockwise motion (from the positive Y axis towards the positive X axis in the XY plane) is specified using G02. Counterclockwise motion is specified using G03. The centre of the circle is specified relative to the current position. Use the I address letter for the X axis, the J address letter for the Y axis, and the K address letter for the Z axis. For example, to machine along a counterclockwise arc in the XY plane centred at position (10., 15., 5.) beginning at (20., 15., 5.) ending at (10., 25., 5.) code G91G17G03X10.Y25.I-10.J0.. To machine along a clockwise arc

P3-7 centred at (10., 15., 5.) beginning at (17.071, 22.071, 5.) and ending at (20., 15., 5.) code G91G17G02X20.Y15.I-7.071J-7.071. Feed rates can be specified using Ffval described for linear interpolation. Cutter length and radius compensation For highest part accuracy, it is desirable to delay specification of the exact cutter dimensions until just before execution of the NC program. The G codes G40, G41, G42, G43, G44, and G49 are used for this purpose. These advanced features are not covered in this lab. Theory: Stepper motor driven implementations achieve coordinated motion using the Digital Differential Analyzer (DDA) or reference pulse method. The linear interpolation DDA algorithm is schematically represented in Figure 3. (a) (b) Figure 3. Linear DDA Algorithm: (a) Path Variables; (b) Algorithm Schematic For our laboratory system, the stepper motor resolution is 400 steps per revolution, and the lead screw advances 2 mm per revolution. The linear resolution is therefore d = 200 steps per millimeter, and hence each motor step advances the corresponding axis by 5 micrometers. For a user specified feed rate of F millimeters per minute, the timer callback frequency is f = df /60 Hz, and the callback period is T =60/dF seconds. Illustrating with the XY plane, a path of L steps is separated into components of a steps along the X axis, and b steps along the Y axis. Note that a and b are absolute values. The stepper motor direction is set by a separate electronic signal. The constant value a is loaded into the p x register, and the constant value b is loaded into the p y register. Both the q x and q y registers are initialized to zero. During each callback function execution, the value of the p x register is added to the q x 2 2 register. The q x register overflows when its value exceeds L = a + b. When this occurs, a pulse is sent to advance the X axis stepper motor by one step, and L is subtracted from q x. This

P3-8 architecture achieves an effective X axis step rate of fa /L Hz. The Y axis is handled similarly, achieving an effective Y axis step rate of fb / L. The total effective step rate is therefore the desired L + 2 2 f a + b /L = f Hz. Extension to add a Z axis involves expressing the path length as 2 2 2 = a + b c where c is the Z axis component, and including p z and q z registers. (a) (b) Figure 4: Circular DDA Algorithm: (a) Path Variables; (b) Algorithm Schematic A schematic representation of the circular DDA algorithm is shown in Figure 4. Again the XY plane is used for illustration. As before, the q x and q y registers are initialized to zero. Overflow occurs when the register value exceeds the arc radius R + 2 2 = i j, where i is the X component from the start of the arc to the arc center, and j is the Y component from the start of the arc to the arc center. The difference from the linear interpolation case is that the p register values change. For example, consider a clockwise arc from the 9 o'clock to the 12 o'clock position. For this case, the initial values to load are p x = j and p y = i. Each time a step is issued in the X direction, the p y register is decremented by one. Each time a step is issued in the Y direction, the p x register is incremented by one. Similar situations hold for the other quadrants, and for counterclockwise motion. For arcs in the YZ or ZX plane, k is the Z component from the start of the arc to the arc center.

P3-9 Example: Linear Interpolation Let (inix iniy iniz) and (finz, finy, finz) be initial and final position, respectively. Let incx, incy and incz are steps counter. For each command line, DDA performs the following procedures. 1) Initialize: incx, incy, incz, qx, qy, and qz = 0. 2) Compute: a. px = finx inix b. py = finy iniy c. pz = finz iniz 2 2 2 d. L = px + py + pz 3) Compute the timer period: 60 Period (ms) = d * D *100 Where d is the step per millimeter (d = 200 steps/mm for our system) 4) Execute time callback function, which it involves the following calculations: a. qx = qx + px b. if (incx < px) and (qx >= L), then: i. qx = qx L; ii. incx = inc X +1/d; iii. the motor in the x-direction takes one step. c. Perform the same calculations in a. and b. for Y and Z-axis platform d. Repeat step a. to c. until the condition of the <if> statement can no longer be satisfy. The following table demonstrates how DDA achieves motion from points (0,0) to (0.015, 0.02). It is equivalent take 3 steps for X axis and 4 steps for Y axis. Clock Pulse Px py qx qy X motor pulse Y motor pulse 1 3 4 3 4 0 0 2 3 4 6 8 1 1 3 3 4 4 7 0 1 4 3 4 7 6 1 1 5 3 4 5 5 1 1

P3-10 Experimental Procedure: The lab experiment will be demonstrated by a T.A. a) Turn On the computer, press Ctrl+Alt+Delete keys and fill in the Username: and Password c) Go to menu bar, click Mode and select Graphics to enable the graphical simulator. d) Go to the menu bar, click CNC and select Run Program. The following dialog will be displayed:

P3-11 Go to the tp directory and select roselin.tp file. This file is in text file format so it can read by any editor software. When Run Program is excuted, the G-Code command line will be readed and excuted from beginning to the end of tp file. To run the tp file line by line. The users can choose Step Program, and excute the signle comman line by pressing key F2 or click on the Single Step that under CNC menu. By clicking Resume, the program is switched to continous mode from single step mode. For each G-Code comman line, it can be read from excute bar. e) To stop the program, the user can select Stop which under CNC menu. f) After the tool path is verified. Now, the users can put the part (blank plastic board) on the machine table. g) Next, turn on the switches in the electronic box. h) Set the software as Graphics and Motors mode. i) Move the tool tips to the origin of machine part coordinate. This could be done by go to CNC, Calibrate and select the axis you would like to move. j) When everything has been set up, the users can start to run the program again.

P3-12 Lab Report: Each student is required to submit his or her individual lab report. This report must include G- Code command line for the experiment demonstration. T.A. will assign the data points for the circular interpolation exercise. References: 1. Y. Koren, Computer Control of Manufacturing Systems, McGraw-Hill, TS176.K6515 1983. 2. I. Zeid, CAD/CAM Theory and Practice, McGraw-Hill, TS155.6.Z45 1991. 3. R. Olexa, The Father of the Second Industrial Revolution, SME Manufacturing Engineering, August 2001.

P3-13 Appendix: Examples of G-code/M-code commands: G code/m code G00 G01 G02 G03 G04 G17 G18 G19 G28 G29 G70 G71 G80 G81 G90 G91 G92 M00 M01 M02 M03 M04 M05 M06 M07 M08 M09 M19 M98 M99 Function Rapid positioning Linear interpolation Circular interpolation clockwise Circular interpolation counterclockwise Dwell XY plane selection ZX plane selection YZ plane selection Return to reference point (home position) Return from reference point Inches input Metric input Canned cycle cancel Drilling cycle Absolute programming Incremental programming Setting of program zero point Program stop Optional stop End of program Spindle start forward (clockwise) Spindle start reverse (counterclockwise) Spindle stop Tool change Flood coolant ON Mist coolant ON Coolant OFF Spindle orientation Transfer to subprogram Transfer to main program (subprogram ends)