Module 5 Lecture 3 Numerical Control (NC)-Programming PDF

Summary

This lecture provides information on Computer Numerical Control (CNC) programming, focusing on coordinate systems used in machining. It details the EIA standards, machine axis designation, and methods for specifying part positions and tool movements. The lecture notes are part of a module covering automation, production systems, and computer-integrated manufacturing.

Full Transcript

Ch 7: Computer Numerical Control (CNC) Sections 1. Fundamentals 2. Programming Assoc. Prof. Khalil Al-Hatab Fall 2019/2020 (#) Module 4 - Lecture 2: Numerical Control (NC)-Programming Sections: 1. NC Coor...

Ch 7: Computer Numerical Control (CNC) Sections 1. Fundamentals 2. Programming Assoc. Prof. Khalil Al-Hatab Fall 2019/2020 (#) Module 4 - Lecture 2: Numerical Control (NC)-Programming Sections: 1. NC Coordinate Systems 2. Positioning Systems 3. NC Part Programming Methods a) Manual part programming b) Computer-assisted part programming c) Part programming using CAD/CAM d) Manual data input 4. Examples ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. NC Coordinate Systems ❑ Computer programming follows a set of rules called syntax to combine symbols and words as statements. A program consists of valid statements that are legal constitutions or fragments. For machining programming, the motion nomenclatures and coordinate systems follow the EIA267-C standards by the Electronic Industries Association (EIA). EIA267-C aims to eliminate inconsistencies and misunderstandings among CNC manufacturers, programmers, and users. It simplifies machining programming and facilitates the interchangeability of the programs on different machine tools. ❑ EIA267-C specifies the coordinates and movements of machine tools, so that a programmer can model the machining operations even before the motion of the cutting tool relative to the workpiece is defined. EIA defines 14 standard axes for the motions and positions of the workpiece, cutting tools, and other objects involved in the machining processes (SAE ❑ To program the NC processing equipment, a part programmer must define a standard axis system by which the position of the work head relative to the work part can be specified. NC Coordinate Systems ❑ There are two axis systems used in NC, one for flat and prismatic work parts and the other for rotational parts. Both systems are based on the Cartesian coordinates. ❑ Right hand rule: To distinguish positive from negative angles, ❑ In most machine tool applications, the x- and y-axes are used to move and position the worktable to which the part is attached, and the z-axis is used to control the vertical position of the cutting tool. ❑ The rotational axes can be used for one or both of the following: (1) Orientation of the work part to present different surfaces for machining or (2) Orientation of the tool or work head at some angle relative to the part. Machine Axis Designation Right-Hand Rule: ❑ Machine axes are designated according to the "right-hand rule", When the thumb of right hand points in the direction of the positive X axis, the index finger points toward the positive Y axis, and the middle finger toward the positive Z axis. ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Coordinate Axis System (a) For flat and block-like parts and (b) for rotational parts A rotary table can serve as a programmable ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. fourth axis. NC Coordinate Systems: Machine Axis Designation NC Coordinate Systems NC Coordinate Systems Reference Points ▪ To determine the relative position of an object in different coordinate systems, the following points are usually taken as the references (next Figures): i. Machine Reference Zero (M), unchangeable ref. Point determined by machine manufacturer ii. Part Reference Zero (PRZ) (W) can be freely determined by the programmer and can be moved within program, iii. Tool Reference (R) or (N). ▪ All coordinates of the working positions of a cutting tool are defined based on M and W: 1. All CNC machine tools require a reference point (M) from which to determine the coordinates of working points. 2. It is generally easier to use a point on the workpiece itself for a reference, since the coordinates apply to the part anyway – thus the PRZ designation (W). 3. The PRZ (W) is defined as the lower left-hand corner and the top of the stock of each part. Reference Points ▪ The part programmer must decide where the origin of the coordinate axis system should be located. This decision is usually based on programming convenience (i.e., the origin might be located at one of the corners of the part or at the center of symmetry). ▪ This zero point is communicated to the machine tool operator. At the beginning of the job, the operator must move the cutting tool under manual control (JOG MODE) to some target point on the worktable, where the tool can be easily and accurately positioned. ▪ The target point has been previously referenced to the origin of the coordinate axis system by the part programmer. When the tool has been accurately positioned at the target point, the operator indicates to the MCU where the origin is located for subsequent tool movements. NC Coordinate Systems ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. NC Coordinate Systems ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. NC Coordinate Systems ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. NC Coordinate Systems ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Positive & Negative Movements ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Positioning Systems ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Absolute and Incremental Positioning ❑ Another aspect of motion control is concerned with whether positions are defined relative to the origin of the coordinate system or relative to the previous location of the tool. 1. Absolute positioning: Locations defined relative to origin of axis system 2. Incremental positioning: Locations defined relative to previous position ▪ Example: drilling The workhead is presently at point (20, 20) and is to be moved to point (40, 50) ▪ In absolute positioning, the move is specified by x = 40, y = 50 ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. ▪ In incremental positioning, No portion of this material the inmove may be reproduced, any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. is specified by x = 20, y = 30. Absolute and Incremental Positioning Incremental coordinates ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Absolute coordinates Absolute and Incremental Positioning Dimensioning Systems ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Dimensioning Systems ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Dimensioning Systems ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. The workflow of CNC programming Part Program ▪ A part program is a series of coded instructions required to produce a part. It controls the movement of the machine tool and the on/off control of auxiliary functions such as spindle rotation and coolant. The coded instructions are composed of letters, numbers and symbols and are arranged in a format of functional blocks as in the following example: N10 G01 X5.0 Y2.5 F15.0 | | | | | | | | | Feed rate (15 in/min) | | | Y-coordinate (2.5") | | X-coordinate (5.0") | Linear interpolation mode Sequence number Program Input Devıces ▪ The program input device is the mechanism for part programs to be entered into the CNC control. ▪ The most commonly used program input devices are keyboards, punched tape reader, diskette drivers, throgh RS 232 serial ports and networks. CNC Programming Approaches ▪ Offline programming linked to CAD programs. ▪ Conversational programming by the operator. ▪ MDI ~ Manual Data Input. ▪ Manual Control using jog buttons or `electronic handwheel'. ▪ Word-Address Coding using standard G-codes and M-codes. NC Part Programming Methods 1. Manual (NC) part programming 2. Conversational (shop-floor) programming 3. CAM system programming ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Manual (NC) part programming ▪ Manual programming works well if the part is simple since no advanced programming tool is needed to create programs. Manual programming works well if the part is simple since no advanced programming tool is needed to create programs. Machine operator does part programming at machine. ▪ Operator enters program by responding to prompts and questions by system ▪ Monitor with graphics verifies tool path ▪ Usually for relatively simple parts ▪ Ideal for small shop that cannot afford a part programming staff ▪ To minimize changeover time, system should allow programming of next job while current job is running ▪ Since a manual program is written in the same language the CNC machine is equipped with, the program can be as concise as possible to achieve efficiency of the execution. ▪ However, manual programming could be very tedious and error-prone if a large number of operations are involved. Manual programming is preferable when (i) a program will be for the same parts with a high volume and (ii) the priority of a machining program is the efficiency of machining operations. ▪ In addition, CNC users are expected to understand the techniques of manual programming, so that they are able to check, verify, and make corrections for NC programs when needed. Conversational programming ▪ Conversational programming is supported by CNC machines where graphic and menu-driven functions are used to create programs for parts. A user can check the inputs of the program, visualize the cutting tool path graphically, and simulate what would happen when the program is used to run the machining process. ▪ Conversational programming is widely used in small or medium sized enterprises (SMEs). In SMEs, CNC machine operators usually take full responsibility for the setups of machine tools, fixtures, and tooling, preparing, verifying, and optimizing programs, and finally running CNC machines. In contrast to manual programming, conversational programming helps them to reduce the programming time dramatically. ▪ Note that the capability of conversational programming is provided by CNC machines and varies greatly from one machine vendor to another. From this perspective, a CNC machine with the capability of supporting conversational programming can be treated as a single-purpose CAM system since it provides a convenient way to write programs for parts from the same type of machines. ▪ Conversational programming used to be the only way to program some legacy machine tools, but modern CNC machines support both conversational programming and offline programming. CAM System Programming ▪ A CAM system prepares CNC programs on a much higher level than manual programming and conversational programming. It has gradually gained popularity. ▪ A CAM system facilitates CNC programming mainly on three aspects: a) Do mathematical calculation of tool paths automatically, b) Create generic programs that can be compatible with different machine types, c) Provide the library with reusable functional modules and routines for common machining operations. ▪ In programming by a CAM system, users create NC programs based on CAD models of parts in an off-line mode. The CAM system is capable of generating the programs in G- code, which is similar to manually created NC programs. The verified programs in a CAM system can be downloaded and directly transferred to machine tools. ▪ CAM can be non-graphic-based or graphic-based. Early CAM systems were non-graphic- based and created the programs in BASIC, C Language, or other languages; those systems were not user-friendly. Recent CAM systems are graphic-based and CNC programs can be created interactively. ▪ Users can get feedback visually at every programming step. Off-line programming by a CAM system can minimize programming and debugging time for the preparation of CNC programs. Program Structure A CNC program consists of a series of blocks. Each line in a program corresponds to a block. A block consists of one or several instructions or words that are separated by spaces or tab characters. Therefore, it is not possible to use a space within a word. A word is a character for a single function; for example; ‘X’ is the displacement along the X-axis and ‘F’isthe feed-rate. ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Program Structure Binary Coded Decimal System ▪ Each of the ten digits in decimal system is coded with four-digit binary number ▪ The binary numbers are added to give the value ▪ BCD is compatible with 8 bits across tape format, the original storage medium for NC part programs ▪ Eight bits can also be used for letters and symbols ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Program Structure Creating Instructions for NC ▪ Bit - 0 or 1 = absence or presence of hole in the tape ▪ Character - row of bits across the tape ▪ Word - sequence of characters (e.g., y-axis position) ▪ Block - collection of words to form one complete instruction ▪ Part program - sequence of instructions (blocks) ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Program Structure INFORMATION NEEDED by a CNC 1. Preparatory Information: units, incremental or absolute positioning 2. Coordinates: X,Y,Z, RX,RY,RZ 3. Machining Parameters: Feed rate and spindle speed 4. Coolant Control: On/Off, Flood, Mist 5. Tool Control: Tool and tool parameters 6. Cycle Functions: Type of action required 7. Miscellaneous Control: Spindle on/off, direction of rotation, stops for part movement This information is conveyed to the machine through a set of instructions arranged in a desired sequence – Program. Program Structure CNC Prg. Syntax Regulations The maximum block length must not exceeded four lines. If max. length exceeded alarm 650 occurs. Every block starts with a block number. After the block numbers follows the G command. Words consists of coordinates X(U), Z(W). For G02, G03 program interpolation parameter I and K are placed after X(U), Z(W). The F word (feed, thread pitch). The S word (cutting speed). The T word (tool address). The M word (additional functions). ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Program Structure Block Format: A block in a CNC program is similar to a sentence in the English language. The sentences in English are separated by periods while the blocks in a CNC program are separated by the end-of-block (EOB) character. A block includes all the information contained between successive EOB characters Sample 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 Program Structure Block Format: Program Structure Block Format: Program Structure Block Format There are three types of Block Format: 1. Fixed sequential format 2. Tab sequential format 3. Word address format Example: 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. Program Structure Block Format Example: 1. Fixed sequential format 0050 00 +0025400 +0012500 +0000000 0000 00 0060 01 +0025400 +0012500 -0010000 0500 08 0070 00 +0025400 +0012500 +0000000 0000 09 2. Tab sequential format 0050 TAB 00 TAB +0025400 TAB +0012500 TAB +0000000 TAB 0060 TAB 01 TAB TAB TAB -0010000 TAB 0500 TAB 08 0070 TAB 00 TAB TAB TAB -0000000 TAB 0000 TAB 09 3. Word address format N50 G00 X25400 Y125 Z0 F0 N60 G01 Z-10000 F500 M08 N70 G00 Z0 M09 Program Structure Word-address Codıng Example CNC Program Each instruction to the machine consists N5 G90 G20 of a letter followed by a number. N10 M06 T3 N15 M03 S1250 Each letter is associated with a specific N20 G00 X1 Y1 type of action or piece of information N25 Z0.1 needed by the machine. N30 G01 Z-0.125 F5 N35 X3 Y2 F10 Letters used in Codes N40 G00 Z1 N45 X0 Y0 N,G,X,Y,Z,A,B,C,I,J,K,F,S,T,R,M N50 M05 N55 M30 Program Structure Block Format Organization of words within a block in NC part program ▪ Also known as tape format because the original formats were designed for punched tape ▪ Word address format - used on all modern CNC controllers ▪ Uses a letter prefix to identify each type of word ▪ Spaces to separate words within the block ▪ Allows any order of words in a block ▪ Words can be omitted if their values do not change from the previous block ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Structure of an NC Part Program: Program Numbers Commands are input into the controller in units called blocks or statements. O6999 Program structure. Every program consists of:. 1. Program Start. The program start is the program number. The O0256 program number begins with character/letter O. O0255 2. Program Contents. NC blocks. 3. Program End. M30 for a main program O0000 M17 for a sub-program G Codes ▪ G00 Rapid traverse ▪ G01 Linear interpolation ▪ G02 Circular interpolation, CW ▪ G03 Circular interpolation, CCW ▪ G04 Dwell ▪ G08 Acceleration ▪ G09 Deceleration ▪ G17 X-Y Plane ▪ G18 Z-X Plane ▪ G19 Y-Z Plane ▪ G20 Inch Units (G70) ▪ G21 Metric Units (G71) ▪ G40 Cutter compensation – cancel ▪ G41 Cutter compensation – left ▪ G42 Cutter compensation- right ▪ G70 Inch format ▪ G71 Metric format ▪ G74 Full-circle programming off ▪ G75 Full-circle programming on ▪ G80 Fixed-cycle cancel ▪ G81-G89 Fixed cycles ▪ G90 Absolute dimensions ▪ G91 Incremental dimensions G Codes M Codes ▪ M00 Program stop ▪ M01 Optional program stop ▪ M02 Program end ▪ M03 Spindle on clockwise ▪ M04 Spindle on counterclockwise ▪ M05 Spindle stop ▪ M06 Tool change ▪ M08 Coolant on ▪ M09 Coolant off ▪ M10 Clamps on ▪ M11 Clamps off ▪ M30 Program stop, reset to start Self-holding Functions (G/M Codes) The majority of G and M commands and other words are self- holding, remain active until overwritten or deactivated/deselected. Aimed to simplify and to reduce programming tasks. Modal commands: Commands issued in the NC program that will stay in effect until it is changed by some other command, like, feed rate selection, coolant selection, etc. Nonmodal commands: Commands that are effective only when issued and whose effects are lost for subsequent commands, like, a dwell command which instructs the tool to remain in a given configuration for a given amount of time. Example: G41 can be deactivated by issuing G40 command. Self-holding Functions (G/M Codes) Take-over of G00 commands in block N0110 In block N0120 G00 is deactivated by G01. G01 is active. Example 1: N0100 G00 X50. Z+10. N0110 X36. Z+2. N0120 G01 X40. Z-10. F… N0050 M03 M03 activated at N0050 and N0060 … effective from N0050 through Example 2: … N120. M03 deactivated at N0120 M04 N0120 by M04 command ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. N Codes ▪ Gives an identifying number for each block of information. ▪ It is generally good practice to increment each block number by 5 or 10 to allow additional blocks to be inserted if future changes are required. X,Y, and Z Codes ▪ X, Y, and Z codes are used to specify the coordinate axis. ▪ Number following the code defines the coordinate at the end of the move relative to an incremental or absolute reference point. I,J, and K Codes ▪ I, J, and K codes are used to specify the coordinate axis when defining the center of a circle. ▪ Number following the code defines the respective coordinate for the center of the circle. F,S, and T Codes ▪ F-code: used to specify the feed rate ▪ S-code: used to specify the spindle speed ▪ T-code: used to specify the tool identification number associated with the tool to be used in subsequent operations. Application of Some Codes G01 Linear Interpolation Format: N_ G01 X_ Y_ Z_ F_ ▪ Linear Interpolation results in a straight line feed move. ▪ Unless tool compensation is used, the coordinates are associated with the centerline of the tool. Application of Some Codes G01 Linear Interpolation ▪ As an example, for the motion that occurs in x-y plane with the same maximum speed for the x- and y-axis, initial motion is at an angle of 45o to the axes until motion in one of the axes is completed and then the balance of the motion occurs in the other axis. This is called point-to-point motion. Application of Some Codes G01 Linear Interpolation 25 B C 20 15 10 Positioning motion from A to C A N10 G00 X30000 Y20000 F0 5 5 10 15 20 25 30 G01 Linear Interpolation X N10 G00 X1 Z1 Z N15 Z0.1 N20 G01 Z-0.125 F5 N25 X2 Z2 F10 G02 Circular Interpolation ▪ G02 is also a preparatory function to specify that the tool should be moved to a specified location along a circular path in a clockwise direction. In order to specify the path to the MCU, the end point of the arc and the location of the center of the arc should be specified. Within the block in which the G02 code is programmed, the center of the arc is given by specifying its location relative to the start of the arc. G02 Circular Interpolation (CW) ▪ The G02 command requires an endpoint and a radius in order to cut the arc. ▪ I,J, and K are relative to the start point. N_ G02 X2 Y1 I0 J-1 F10 or N_ G02 X2 Y1 R1 G02 Circular Interpolation (CW) Circular interpolation from A to B about a circle centered at C N10 G02 X20000 Y10000 25 I5000 J15000 F2500 I=5 A C 20 15 J=15 10 B C 5 5 10 15 20 25 30 G17-G19 Default coordinate planes for a mill machine Types of Words N - sequence number prefix G - preparatory words ▪ Example: G00 = PTP rapid traverse move X, Y, Z - prefixes for x, y, and z-axes F - feed rate prefix S - spindle speed T - tool selection M - miscellaneous command ▪ Example: M07 = turn cutting fluid on ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Types of Words ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Example: Word Address Format N001 G00 X070 Y030 M03 N002 Y060 ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Program Structure ▪ Adequate for simple jobs, e.g., PTP drilling ▪ Linear interpolation G01 G94 X050.0 Y086.5 Z100.0 F40 S800 ▪ Circular interpolation G02 G17 X088.0 Y040.0 R028.0 F30 ▪ Cutter offset G42 G01 X100.0 Y040.0 D05 ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Program Structure Canned Cycles ▪ 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 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 & Continuous feed No action Feed rate out) G86 Through boring(in only) Continuous feed Stop spindle Rapid G81 Illustratıon Three Main Parts of a CNC Program Part 1- Program Setup ▪ N5 G90 G21 (Absolute, metric units) ▪ N10 M06 T2 (Stop for tool change, use tool # 2) ▪ N15 M03 S1200 (Turn the spindle on CW to 1200 rpm) Three Main Parts of a CNC Program Part 2- Chip Removal ▪ N20 G00 X1 Y1 (Rapid to X1,Y1 from origin point) ▪ N25 Z0.125 (Rapid down to Z0.125) ▪ N30 G01 Z-0.125 F100 (Feed down to Z-0.125 at 100 mm/min) ▪ N35 G01 X2 Y2 (Feed diagonally to X2,Y2) ▪ N40 G00 Z1 (Rapid up to Z1) ▪ N45 X0 Y0 (Rapid to X0,Y0) Three Main Parts of a CNC Program Part 3- System Shutdown ▪ N50 M05 (Turn the spindle off) ▪ N55 M00 (Program stop) Example Operatıon on CNC Mıllıng Machıne G-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 G-Code Program ▪ 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 G-Code Program ▪ 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 G-Code Program ▪ 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 Computer-Assisted Part Programming ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Computer-Assisted Part Programming ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Computer-Assisted Part Programming ▪ Manual part programming is time-consuming, tedious, and subject to human errors for complex jobs ▪ Machining instructions are written in English-like statements that are translated by the computer into the low- level machine code of the MCU ▪ APT (Automatically Programmed Tool) ▪ The various tasks in computer-assisted part programming are divided between ▪ The human part programmer ▪ The computer ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Computer-Assisted Part Programming ▪ Sequence of activities in computer-assisted part programming ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Part Programmer's Job ▪ Two main tasks of the programmer: 1. Define the part geometry 2. Specify the tool path ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Defining Part Geometry ▪ Underlying assumption: no matter how complex the part geometry, it is composed of basic geometric elements and mathematically defined surfaces ▪ Geometry elements are sometimes defined only for use in specifying tool path ▪ Examples of part geometry definitions: P4 = POINT/35,90,0 L1 = LINE/P1,P2 C1 = CIRCLE/CENTER,P8,RADIUS,30 ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Specifying Tool Path and Operation Sequence ▪ Tool path consists of a sequence of points or connected line and arc segments, using previously defined geometry elements ▪ Point-to-Point command: GOTO/P0 ▪ Continuous path command GOLFT/L2,TANTO,C1 ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Other Functions in Computer- Assisted Part Programming ▪ Specifying cutting speeds and feed rates ▪ Designating cutter size (for tool offset calculations) ▪ Specifying tolerances in circular interpolation ▪ Naming the program ▪ Identifying the machine tool ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Cutter Offset Cutter path must be offset from actual part outline by a distance equal to the cutter radius ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Computer Tasks in Computer- Assisted Part Programming 1. Input translation – converts the coded instructions in the part program into computer-usable form 2. Arithmetic and cutter offset computations – performs the mathematical computations to define the part surface and generate the tool path, including cutter offset compensation (CLFILE) 3. Editing – provides readable data on cutter locations and machine tool operating commands (CLDATA) 4. Postprocessing – converts CLDATA into low-level code that can be interpreted by the MCU ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Statements in the APT Language ▪ There are four basic types of statements in the APT language: 1. Geometry statements, also called definition statements; are used to define the geometry elements that comprise the part. 2. Motion commands; are used to specify the tool path. 3. Postprocessor statements; control the machine tool operation, for example, to specify speeds and feeds, set tolerance values for circular interpolation, and actuate other capabilities of the machine tool. 4. Auxiliary statements; a group of miscellaneous statements used to name the part program, insert comments in the program and accomplish similar functions. ▪ APT vocabulary words consist of six or fewer characters. The characters are almost always letters of the alphabet. Geometry Statements ▪ The points, lines, and surfaces must be defined in the program prior to specifying the motion statements. The general form of an APT geometry statement is: SYMBOL = GEOMETRY TYPE/descriptive data ▪ as an example; ▪ A symbol can be any combination of six or fewer alphabetical and numerical characters, at least one of which must be alphabetical. Also the symbol cannot be an APT vocabulary word. Some examples are presented in the following Table: Geometry Statements Geometry Statements Geometry Statements Motion Commands ▪ All APT motion statements follow a common format, just as geometry statements have their own format. The general form of an APT motion command is: MOTION COMMAND/descriptive data ▪ As an example; GOTO/P1 ▪ At the beginning of the sequence of motion statements, the tool must be given a starting point. This is likely to be the target point, the location where the operator has positioned the tool at the start of the job. The part programmer keys into this starting position with the following statement: FROM/PTARG ▪ Where FROM is an APT vocabulary word indicating that this is the initial point from which all others will be referenced; and PTARG is the symbol assigned to the starting point. Another way to make this statement is the following: FROM/-20.0, -20.0, 0 ▪ The FROM statement occurs only at the start of the motion sequence Motion Commands ▪ It is appropriate to distinguish between point-to-point motions and contouring motions. ▪ Point-to-point motions ▪ There are two commands; GOTO and GODLTA. ▪ The GOTO statement instructs the tool to go to a particular point location specified in the descriptive data. Two examples are: GOTO/P2 GOTO/25.0, 40.0, 0 ▪ The GODLTA command specifies an incremental move for the tool. To illustrate, the following statement instruct the tool to move from its present position by a distance of 50 mm in x-direction, 120 mm in y-direction, and 40 mm in z-direction; GODLTA/50.0, 120.0, 40.0 ▪ The GODLTA statement is useful in drilling and related machining operations. The tool can be directed to go to a given hole location; then the GODLTA command can be used to drill the hole, as in the following sequence; GOTO/P2 GODLTA/0, 0, -50.0 GODLTA/0, 0, 50.0 Motion Commands ▪ Contouring motions ▪ These are more complicated than PTP commands are because the tool’s position must be continuously controlled throughout the move. ▪ The tool is directed along two intersecting surfaces until it reaches a third surface, as shown in the following Figure; 1. Drive surface; this is the surface that guides the side of the cutter. It is pictured as a plane in our Figure. 2. Part surface; this is the surface, again pictured as a plane, on which the bottom or nose of the tool is guided. 3. Check surface; this is the surface that stops the forward motion of the tool in the execution of the current command. One might say that this surface “checks” the advance of the tool. Motion Commands Motion Commands ▪ Initialization of APT contouring motion sequence: ✓ With reference to the Figure, the sequence takes the following form: FROM/PTARG GO/TO, PL1, TO, PL2, TO, PL3 ✓ The three surfaces included in the GO statement must be specified in the order; (1) drive surface, (2) part surface, and (3) check surface. ✓ Note that GO/TO is not the same as the GOTO command. GOTO is used only for PTP motions. The GO/ command is used to initialize a sequence of contouring motions and may take alternative forms such as GO/ON, GO/TO, or GO/PAST. Motion Commands ▪ It is not necessary to redefine the part surface in every motion command after it has been initially defined as long as it remains the same in subsequent commands; GORGT/PL3, PAST, PL4 ▪ In engineering drawing, the sides of the part appear as lines, although they are three-dimensional surfaces on the physical part. In cases like this, it is more convenient for the programmer to define the part profile in terms of lines and circles rather than planes and cylinders. ▪ APT language system allows this because in APT, lines are treated as planes and circles are treated as cylinders, which are both perpendicular to the x-y plane. Hence, the planes around the part outline can be replaced by lines (L1, L3, and L4). The commands can be replaced by the following; FROM/PTARG GO/TO, L1, TO, PL2, TO, L3 GORGT/L3, PAST, L4 ▪ Plane PL2 has not been converted to a line. As the “part surface” in the motion statement, it must maintain its status as a plane parallel to the x- and y-axes. Postprocessor and Auxiliary statements ▪ Postprocessor statements control the operation of the machine tool and play a supporting role in generating the tool path. Such statements are used to define cutter size, specify speeds and feeds, turn coolant flow on and off, and control other features of the m/c tool. The general form of the postprocessor statement is: POSTPROCESSOR COMMAND/descriptive data ▪ In some commands, the descriptive data is omitted. Some examples of the postprocessor statements are the following: Postprocessor and Auxiliary statements ▪ Auxiliary statements are used to identify the part program, specify which postprocessor to use, insert remarks into the program, and so on. Some examples are following: Postprocessor and Auxiliary statements ▪ Another APT statements are found in the Appendix (ref. Groover, p. 196 – 209). ▪ Write the APT program to: Drill the shown holes (Example 1). ▪ Mill the shown shape (Example 2). Solution of Example 1: Solution of Example 1: ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Solution of Example 2: Solution of Example 2: Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. NC Part Programming Using CAD/CAM ▪ Geometry definition ▪ If the CAD/CAM system was used to define the original part geometry, no need to recreate that geometry as in APT ▪ Automatic labeling of geometry elements ▪ If the CAD part data are not available, geometry must be created, as in APT, but user gets immediate visual feedback about the created geometry ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Tool Path Generation Using CAD/CAM ▪ Basic approach: enter the commands one by one (similar to APT) ▪ CAD/CAM system provides immediate graphical verification of the command ▪ Automatic software modules for common machining cycles ▪ Profile milling ▪ Pocket milling ▪ Drilling bolt circles ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Examples of Machining Cycles in Automated NC Programming Modules Pocket milling Contour turning ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Methods ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Examples of Machining Cycles in Automated NC Programming Modules Facing and shoulder facing Threading (external) ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. Programming Exampes ©2008 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. For the exclusive use of adopters of the book Automation, Production Systems, and Computer-Integrated Manufacturing, Third Edition, by Mikell P. Groover. APT Programming Example Cylindrical Part F 25 Raw Material 70 F 22.5 F 17.5 Finished Part 20 30 APT Programming Example Cylindrical Part O0013 N0005 G53 N0010 T0303 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 N0050 X50.0 Z50.0 N0060 T0404 N0070 G57 G00 X22.50 Z2.0 S500 N0080 G01 Z-30.0 F100 N0090 G00 X23.0 Z2.0 S500 N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650 N0110 G00 Z2.0 N0120 X50.0 Z50.0 N0130 M30 Please sign up to the lab demo and watch this program running APT Program Interpretation O0013 Program identification number APT Program Interpretation O0013 N0005 G53 To cancel any previous working zero point APT Program Interpretation O0013 N0005 G53 N0010 T0303 N0010 Sequence number T0303 Select tool number 303 APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.0 Z0.0 S500 M04 G57 To set the working zero point as saved G00 Rapid movement (no cutting) X26.0 X location (as a diameter; 13 form zero) x Z0.0 Z location +ve S500 Spindle speed is 500 rpm M04 Rotate spindle counterclockwise (0,0) +ve z APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 G01 Linear interpolation (cutting) X-0.20 Move only in x direction until you pass the center by 0.1 mm (facing) F100 Set feed rate to 100 mm/min. APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 G00 Move rapidly away from workpiece (no cutting) Z2.0 the movement is 2 mm away from the face. APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 N0050 X50.0 Z50.0 Go to a safe location away from the workpiece [x = 50 (25 from zero), z = 50] to change the tool. APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 N0050 X50.0 Z50.0 N0060 T0404 T0404 Select tool number 404 APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 N0050 X50.0 Z50.0 N0060 T0404 N0070 G57 G00 X22.50 Z2.0 S500 G57 PS0 G00 Rapid movement (no cutting) X22.50 X location (as a diameter; 11.25 form zero) Z2.0 Z location S500 Spindle speed is 500 rpm APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 N0050 X50.0 Z50.0 N0060 T0404 N0070 G57 G00 X25.00 Z2.0 S500 M04 N0080 G01 Z-30.0 F100 G01 Linear interpolation (cutting) Z-30 Move only in z direction (external turning) F100 Set feed rate to 100 mm/min. APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 N0050 X50.0 Z50.0 N0060 T0404 N0070 G57 G00 X25.00 Z2.0 S500 M04 N0080 G01 X22.5 Z-70.0 F100 N0090 G00 X23.0 Z2.0 S500 G00 Move rapidly away from workpiece (no cutting) to location x= 23.0 (11.50 from zero) and z = 2.0. APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 N0050 X50.0 Z50.0 N0060 T0404 N0070 G57 G00 X25.00 Z2.0 S500 M04 N0080 G01 X22.5 Z-70.0 F100 N0090 G00 X26.0 Z2.0 S500 N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650 G84 Turning cycle for machining the step X17.5 final diameter Z-20 length of step is 20 mm D0=200 Finish allowance in X direction (0.2 mm) D2=200 Finish allowance in Z direction (0.2 mm) D3=650 Depth of cut in each pass (0.65 mm) APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 N0050 X50.0 Z50.0 N0060 T0404 N0070 G57 G00 X25.00 Z2.0 S500 M04 N0080 G01 X22.5 Z-70.0 F100 N0090 G00 X26.0 Z2.0 S500 N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650 N0110 G00 Z2.0 G00 Move rapidly away from workpiece (no cutting) Z2.0 the movement is 2 mm away from the face. APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 N0050 X50.0 Z50.0 N0060 T0404 N0070 G57 G00 X25.00 Z2.0 S500 M04 N0080 G01 X22.5 Z-70.0 F100 N0090 G00 X26.0 Z2.0 S500 N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650 N0110 G00 Z2.0 N0120 X50.0 Z50.0 X50.0 Z50.0 Move to the tool changing location APT Program Interpretation O0013 N0005 G53 N0010 T0404 N0020 G57 G00 X26.00 Z0.0 S500 M04 N0030 G01 X-0.20 F100 N0040 G00 Z2.0 N0050 X50.0 Z50.0 N0060 T0404 N0070 G57 G00 X25.00 Z2.0 S500 M04 N0080 G01 X22.5 Z-70.0 F100 N0090 G00 X26.0 Z2.0 S500 N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650 N0110 G00 Z2.0 N0120 X50.0 Z50.0 T00 N0130 M30 M30 Program End Programming Example Raw Material Finished Part y Programming Example G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 x N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X-8 Y0 Z-0.5 ZFeed 150 N005 G01 X70 Y0 Z-0.5 XYFeed 75 N006 G01 X70 Y60 Z-0.5 XYFeed 75 N007 G01 X30 Y60 Z-0.5 XYFeed 75 N008 G01 X0 Y40 Z-0.5 XYFeed 75 N009 G01 X0 Y0 Z-0.5 XYFeed 75 N010 G81 R3 E9 N7 Z-0.5 N011 M05 N012 M02 y Programming Example Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 x N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 N007 G01 X50 Y15 Z10 ZFeed 150 N008 G01 X50 Y15 Z-10 ZFeed 75 N009 G01 X50 Y15 Z10 ZFeed 150 N010 G01 X50 Y45 Z10 ZFeed 150 N011 G01 X50 Y45 Z-10 ZFeed 75 N012 G01 X50 Y45 Z10 ZFeed 150 N013 M05 N014 M02 Program Interpretation G55 X200 Y80 Setting the datum to the lower left corner of the work piece Program Interpretation G55 X200 Y80 Program 1 Program Identification Number Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N001 Sequence Number M06 Tool Change (End Mill with Diameter=12mm T1 Tool Number Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 Start rotating the spindle clockwise with 400 rpm Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 Go to Safe Position with feed 150mm/min Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X-8 Y0 Z-0.5 ZFeed 150 Lower the end mill to determine the depth of cut Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X-8 Y0 Z-0.5 ZFeed 150 N005 G01 X70 Y0 Z-0.5 XYFeed 75 Move from the lower left corner of the work piece to the right lower one cutting with feed=75mm/min Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X-8 Y0 Z-0.5 ZFeed 150 N005 G01 X70 Y0 Z-0.5 XYFeed 75 N006 G01 X70 Y60 Z-0.5 XYFeed 75 Move from the lower left corner of the work piece to the right lower one cutting with feed=75mm/min Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X-8 Y0 Z-0.5 ZFeed 150 N005 G01 X70 Y0 Z-0.5 XYFeed 75 N006 G01 X70 Y60 Z-0.5 XYFeed 75 N007 G01 X30 Y60 Z-0.5 XYFeed 75 Cutting the horizontally up to X=30 Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X-8 Y0 Z-0.5 ZFeed 150 N005 G01 X70 Y0 Z-0.5 XYFeed 75 N006 G01 X70 Y60 Z-0.5 XYFeed 75 N007 G01 X30 Y60 Z-0.5 XYFeed 75 N008 G01 X0 Y40 Z-0.5 XYFeed 75 Cutting to X=0 & Y=40 Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X-8 Y0 Z-0.5 ZFeed 150 N005 G01 X70 Y0 Z-0.5 XYFeed 75 N006 G01 X70 Y60 Z-0.5 XYFeed 75 N007 G01 X30 Y60 Z-0.5 XYFeed 75 N008 G01 X0 Y40 Z-0.5 XYFeed 75 N009 G01 X0 Y0 Z-0.5 XYFeed 75 Complete the countering Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X-8 Y0 Z-0.5 ZFeed 150 N005 G01 X70 Y0 Z-0.5 XYFeed 75 N006 G01 X70 Y60 Z-0.5 XYFeed 75 N007 G01 X30 Y60 Z-0.5 XYFeed 75 N008 G01 X0 Y40 Z-0.5 XYFeed 75 N009 G01 X0 Y0 Z-0.5 XYFeed 75 N010 G81 R3 E9 N7 Z-0.5 Repeat 7 times blocks from N003 to N009 with incremental offset of Z=-0.5 Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X-8 Y0 Z-0.5 ZFeed 150 N005 G01 X70 Y0 Z-0.5 XYFeed 75 N006 G01 X70 Y60 Z-0.5 XYFeed 75 N007 G01 X30 Y60 Z-0.5 XYFeed 75 N008 G01 X0 Y40 Z-0.5 XYFeed 75 N009 G01 X0 Y0 Z-0.5 XYFeed 75 N010 G81 R3 E9 N7 Z-0.5 N011 M05 Spindle Off Program Interpretation G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X-8 Y0 Z-0.5 ZFeed 150 N005 G01 X70 Y0 Z-0.5 XYFeed 75 N006 G01 X70 Y60 Z-0.5 XYFeed 75 N007 G01 X30 Y60 Z-0.5 XYFeed 75 N008 G01 X0 Y40 Z-0.5 XYFeed 75 N009 G01 X0 Y0 Z-0.5 XYFeed 75 N010 G81 R3 E9 N7 Z-0.5 N011 M05 N012 M02 End Program Program Interpretation Tool Change Changing the tool Program Interpretation Tool Change G55 X200 Y80 Setting the datum to the lower left corner of the work piece Program Interpretation Tool Change G55 X200 Y80 Program 2 Program Identification Number Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N001 Sequence Number M06 Tool Change (Drill with Diameter=6mm T2 Tool Number Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 Start rotating the spindle clockwise with 400 rpm Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 Go to Safe Position with feed 150mm/min Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 Stop above the center of the first hole Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 Start Drill the first hole Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 Retract to a position above the hole Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 N007 G01 X50 Y15 Z10 ZFeed 150 Stop above the center of the second hole Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 N007 G01 X50 Y15 Z10 ZFeed 150 N008 G01 X50 Y15 Z-10 ZFeed 75 Drill the second hole Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 N007 G01 X50 Y15 Z10 ZFeed 150 N008 G01 X50 Y15 Z-10 ZFeed 75 N009 G01 X50 Y15 Z10 ZFeed 150 Retract to a position above the second hole Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 N007 G01 X50 Y15 Z10 ZFeed 150 N008 G01 X50 Y15 Z-10 ZFeed 75 N009 G01 X50 Y15 Z10 ZFeed 150 N010 G01 X50 Y45 Z10 ZFeed 150 Stop above the center of the third hole Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 N007 G01 X50 Y15 Z10 ZFeed 150 N008 G01 X50 Y15 Z-10 ZFeed 75 N009 G01 X50 Y15 Z10 ZFeed 150 N010 G01 X50 Y45 Z10 ZFeed 150 N011 G01 X50 Y45 Z-10 ZFeed 75 Drill the third hole Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 N007 G01 X50 Y15 Z10 ZFeed 150 N008 G01 X50 Y15 Z-10 ZFeed 75 N009 G01 X50 Y15 Z10 ZFeed 150 N010 G01 X50 Y45 Z10 ZFeed 150 N011 G01 X50 Y45 Z-10 ZFeed 75 N012 G01 X50 Y45 Z10 ZFeed 150 Retract to a position above the third hole Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 N007 G01 X50 Y15 Z10 ZFeed 150 N008 G01 X50 Y15 Z-10 ZFeed 75 N009 G01 X50 Y15 Z10 ZFeed 150 N010 G01 X50 Y45 Z10 ZFeed 150 N011 G01 X50 Y45 Z-10 ZFeed 75 N012 G01 X50 Y45 Z10 ZFeed 150 N013 M05 Spindle off Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 N007 G01 X50 Y15 Z10 ZFeed 150 N008 G01 X50 Y15 Z-10 ZFeed 75 N009 G01 X50 Y15 Z10 ZFeed 150 N010 G01 X50 Y45 Z10 ZFeed 150 N011 G01 X50 Y45 Z-10 ZFeed 75 N012 G01 X50 Y45 Z10 ZFeed 150 N013 M05 N014 M02 End Program Program Interpretation Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 rpm 400 N003 G01 X-8 Y0 Z0 XYFeed 150 N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 N005 G01 X20 Y15 Z-10 ZFeed 75 N006 G01 X20 Y15 Z10 ZFeed 150 N007 G01 X50 Y15 Z10 ZFeed 150 N008 G01 X50 Y15 Z-10 ZFeed 75 N009 G01 X50 Y15 Z10 ZFeed 150 N010 G01 X50 Y45 Z10 ZFeed 150 N011 G01 X50 Y45 Z-10 ZFeed 75 N012 G01 X50 Y45 Z10 ZFeed 150 N013 M05 N014 M02 End Program

Use Quizgecko on...
Browser
Browser