Numerical Control (NC) Defined
Form of programmable automation in which the mechanical actions of a machine tool or other equipment are controlled by a program containing coded alphanumeric data The alphanumeric data represent relative positions between a workhead (e.g., cutting tool) and a workpart When the current job is completed, a new program can be entered for the next job
Basic Components of an NC System
1. Program of instructions Part program in machining (punched tape: old technology) 2. Machine control unit Controls the process 3. Processing equipment Performs the process
Basic Components of an NC System
NC Coordinate Systems
For flat and prismatic (block-like) parts Milling and drilling operations Conventional Cartesian coordinate system Rotational axes about each linear axis Right hand rule
Coordinate Axis System for Flat and Prismatic Parts
NC Coordinate Systems
For rotational parts: Turning operations Conventional Cartesian coordinate system, but only x- and z-axes y-axis not needed in turning
Coordinate Axis System for Rotational Parts
Motion Control Systems
Point-to-Point systems Also called position systems System moves to a location and performs an operation at that location (e.g., drilling) Also applicable in robotics Continuous path systems Also called contouring systems in machining System performs an operation during movement (e.g., milling and turning)
Point-To-Point Control in NC Drilling of Three Holes in Flat Plate
Continuous Path Control in NC Profile Milling of Part Outline
Interpolation Methods
1. Linear interpolation Straight line between two points in space 2. Circular interpolation Circular arc defined by starting point, end point, center or radius, and direction 3. Helical interpolation Circular plus linear motion 4. Parabolic and cubic interpolation Free form curves using higher order equations
Absolute and Incremental Positioning
Absolute positioning Locations defined relative to origin of axis system Incremental positioning Locations defined relative to previous position Example: drilling
Absolute vs. Incremental Positioning
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 In incremental positioning, the move is specified by x = 20, y = 30.
Computer Numerical Control (CNC) Additional Features
Storage of more than one part program Various forms of program input Program editing at the machine tool Fixed cycles and programming subroutines Interpolation Acceleration and deceleration computations Communications interface Diagnostics
Configuration of CNC Machine Control Unit
Applications of NC
Machine tool applications: Milling, drilling, turning, boring, grinding Machining centers, turning centers, mill-turn centers Punch presses, thermal cutting machines, etc. Other NC applications: Component insertion machines in electronics Drafting machines (x-y plotters) Coordinate measuring machines Tape laying machines for polymer composites Filament winding machines for polymer composites
Common NC Machining Operations
Turning
Common NC Machining Operations
Milling Drilling
CNC Horizontal Milling Machine
NC Application Characteristics (Machining)
Where NC is most appropriate: 1. Batch production 2. Repeat orders 3. Complex part geometries 4. Much metal needs to be removed from the starting workpart 5. Many separate machining operations on the part 6. The part is expensive
Advantages of NC
Nonproductive time is reduced Greater accuracy and repeatability Lower scrap rates Inspection requirements are reduced More complex part geometries are possible Engineering changes are easier to make Simpler fixtures Shorter lead times Reduce parts inventory and less floor space Operator skill-level requirements are reduced
Disadvantages of NC
Higher investment cost CNC machines are more expensive Higher maintenance effort CNC machines are more technologically sophisticated Part programming issues Need for skilled programmers Time investment for each new part Repeat orders are easy because part program is already available Higher utilization is required
NC Positioning System
Typical motor and leadscrew arrangement in an NC positioning system for one linear axis For x-y capability, the apparatus would be piggybacked on top of a second perpendicular axis
Analysis of Positioning NC Systems
Two types of NC positioning systems: 1. Open-loop - no feedback to verify that the actual position achieved is the desired position 2. Closed-loop - uses feedback measurements to confirm that the final position is the specified position Precision in NC positioning - three measures: 1. Control resolution 2. Accuracy 3. Repeatability
Open-Loop Motion Control System
Operates without verifying that the actual position achieved in the move is the desired position
Closed-Loop Motion Control System
Uses feedback measurements to confirm that the final position of the worktable is the location specified in the program
Optical Encoder
Device for measuring rotational position and speed Common feedback sensor for closed-loop NC control
Precision in NC Positioning
Three measures of precision: 1. Control resolution - distance separating two adjacent addressable points in the axis movement 2. Accuracy - maximum possible error that can occur between the desired target point and the actual position taken by the system 3. Repeatability - defined as 3 of the mechanical error distribution associated with the axis
NC Part Programming
1. 2. 3. 4. Manual part programming Computer-assisted part programming Part programming using CAD/CAM Manual data input
CNC Programming Basics
CNC instructions are called part program commands. When running, a part program is interpreted one command line at a time until all lines are completed. Commands, which are also referred to as blocks, are made up of words which each begin with a letter address and end with a numerical value.
CNC Programming Basics
Each letter address relates to a specific machine function. G and M letter addresses are two of the most common. A G letter specifies certain machine preparations such as inch or metric modes, or absolutes versus incremental modes. A M letter specifies miscellaneous machine functions and work like on/off switches for coolant flow, tool changing, or spindle rotation. Other letter addresses are used to direct a wide variety of other machine commands.
CNC programming
Important things to know:
Coordinate System Units, incremental or absolute positioning Coordinates: X,Y,Z, RX,RY,RZ Feed rate and spindle speed Coolant Control: On/Off, Flood, Mist Tool Control: Tool and tool parameters
CNC programming
Programming consists of a series of instructions in form of alphanumeric codes Preparatory Codes: G codes- Initial machining setup and establishing operating conditions N codes- specify program line number to executed by the MCU Axis Codes: X,Y,Z - Used to specify motion of the slide along X, Y, Z direction Feed and Speed Codes: F and S- Specify feed and spindle speed Tool codes: T specify tool number Miscellaneous codes M codes For coolant control and other activities
Programming Key Letters
O - Program number (Used for program identification) N - Sequence number (Used for line identification) G - Preparatory function X - X axis designation , I center vector in X for circular interpolation Y - Y axis designation , J center vector in X for circular interpolation Z - Z axis designation , K center vector in X for circular interpolation F Feed rate designation S - Spindle speed designation H - Tool length offset designation D - Tool radius offset designation T - Tool Designation M - Miscellaneous function
Table of Important G codes
G00 Rapid Transverse G01 Linear Interpolation G02 Circular Interpolation, CW G03 Circular Interpolation, CCW G17 XY Plane, G18 XZ Plane, G19 YZ Plane G20 /G70Inch units G21 /G71Metric Units G53 Machine reference (HOME) G54-G59 User defined reference G40 Cutter compensation cancel G41 Cutter compensation left G42 Cutter compensation right G43 Tool length compensation (plus) G43 Tool length compensation (plus) G44 Tool length compensation (minus) G49 Tool length compensation cancel G90 Absolute positioning G91 Incremental positioning
Syntax of Important G codes
G00 Rapid Transverse G00 X .Y.Z N001 G00 X70.0 Y30.0 G00 G01 Linear interpolation G01 XYZF N001 G01 X70.0 Y30.0 F20
Syntax of Important G codes
G02 CW circular interpolation G02 X .Y. I. J.F N002 G02 X1.2808 Y1.5303 I 0.75 J 0.0 F 10.0 G03 CCW circular interpolation G03XYI JF N002 G03 X1.2808 Y1.5303 I 0.75 J 0.0 F 10.0
/G03
Syntax of Important G codes
G17 G18
G19
Syntax of Important G codes
G43 / G44 : Different tool may have different height. Height difference needs to be compensated to maintain accuracy. G43 H10 G44 H13 H word is the memory address for compensation value G49: Cancel the compensation
WORK Piece
Syntax of Important G codes
G41 / G42 : Different tool may have different diameter. Diameter difference needs to be compensated to maintain accuracy. G41 /G42 are for left and right compensation. G41 D1 X0 Y0 D word is the memory address for compensation value G40: Cancel the compensation G40 Y 0.
Workpiece
Syntax of Important G codes
G20 /G70Inch units G21 /G71Metric Units G53 Machine reference (HOME) G54-G59 User defined reference G90 G91 G04 P -----
Table of Important M codes
M00 Program stop M01 Optional program stop (if optional stop button is pressed) M02 Program end M03 Spindle on clockwise ( M03 S...) M04 Spindle on counterclockwise (M04 S .) M05 Spindle stop M06 Tool change (M06 T) M08 Coolant on M09 Coolant off M10 Clamps on M11 Clamps off
Programming Example
Raw Material
Finished Part
Programming Example
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X-8 Y0 Z-0.5 F 150 N005 G01 X70 Y0 Z-0.5 F 75 N006 G01 X70 Y60 Z-0.5 F 75 N007 G01 X30 Y60 Z-0.5 F 75 N008 G01 X0 Y40 Z-0.5 F 75 N009 G01 X0 Y0 Z-0.5 F 75 N010 M05 N011 M02
Programming Example
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F 150 ZFeed 150 N005 G01 X20 Y15 Z-10 F 75 N006 G01 X20 Y15 Z10 F 150 N007 G01 X50 Y15 Z10 F 150 N008 G01 X50 Y15 Z-10 F 75 N009 G01 X50 Y15 Z10 F 150 N010 G01 X50 Y45 Z10 F 150 N011 G01 X50 Y45 Z-10 F 75 N012 G01 X50 Y45 Z10 F 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 S 400
Start rotating the spindle clockwise with 400 rpm
Program Interpretation
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150
Go to Safe Position with feed 150mm/min
Program Interpretation
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X-8 Y0 Z-0.5 F 150
Lower the end mill to determine the depth of cut
Program Interpretation
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X-8 Y0 Z-0.5 F 150 N005 G01 X70 Y0 Z-0.5 F 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 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X-8 Y0 Z-0.5 F 150 N005 G01 X70 Y0 Z-0.5 F 75 N006 G01 X70 Y60 Z-0.5 F 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 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X-8 Y0 Z-0.5 F 150 N005 G01 X70 Y0 Z-0.5 F 75 N006 G01 X70 Y60 Z-0.5 F 75 N007 G01 X30 Y60 Z-0.5 F 75
Cutting the horizontally up to X=30
Program Interpretation
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X-8 Y0 Z-0.5 F 150 N005 G01 X70 Y0 Z-0.5 F 75 N006 G01 X70 Y60 Z-0.5 F 75 N007 G01 X30 Y60 Z-0.5 F 75 N008 G01 X0 Y40 Z-0.5 F 75
Cutting to X=0 & Y=40
Program Interpretation
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X-8 Y0 Z-0.5 F 150 N005 G01 X70 Y0 Z-0.5 F 75 N006 G01 X70 Y60 Z-0.5 F 75 N007 G01 X30 Y60 Z-0.5 F 75 N008 G01 X0 Y40 Z-0.5 F 75 N009 G01 X0 Y0 Z-0.5 F 75 Complete the countering
Program Interpretation
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X-8 Y0 Z-0.5 F 150 N005 G01 X70 Y0 Z-0.5 F 75 N006 G01 X70 Y60 Z-0.5 F 75 N007 G01 X30 Y60 Z-0.5 F 75 N008 G01 X0 Y40 Z-0.5 F 75 N009 G01 X0 Y0 Z-0.5 F 75 N011 M05
Spindle Off
Program Interpretation
G55 X200 Y80 Program 1 N001 M06 T1 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X-8 Y0 Z-0.5 F 150 N005 G01 X70 Y0 Z-0.5 F 75 N006 G01 X70 Y60 Z-0.5 F 75 N007 G01 X30 Y60 Z-0.5 F 75 N008 G01 X0 Y40 Z-0.5 F 75 N009 G01 X0 Y0 Z-0.5 F 75 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 S 400
Start rotating the spindle clockwise with 400 rpm
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F150
Go to Safe Position with feed 150mm/min
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F 150
Stop above the center of the first hole
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F 150 N005 G01 X20 Y15 Z-10 F 75
Start Drill the first hole
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F 150 N005 G01 X20 Y15 Z-10 F 75 N006 G01 X20 Y15 Z10 F 150
Retract to a position above the hole
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F 150 N005 G01 X20 Y15 Z-10 F 75 N006 G01 X20 Y15 Z10 F 150 N007 G01 X50 Y15 Z10 F 150
Stop above the center of the second hole
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F150 N004 G01 X20 Y15 Z10 F 150 N005 G01 X20 Y15 Z-10 F 75 N006 G01 X20 Y15 Z10 F 150 N007 G01 X50 Y15 Z10 F 150 N008 G01 X50 Y15 Z-10 F 75
Drill the second hole
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F 150 N005 G01 X20 Y15 Z-10 F 75 N006 G01 X20 Y15 Z10 F 150 N007 G01 X50 Y15 Z10 F150 N008 G01 X50 Y15 Z-10 F 75 N009 G01 X50 Y15 Z10 F 150
Retract to a position above the second hole
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F150 N005 G01 X20 Y15 Z-10 F 75 N006 G01 X20 Y15 Z10 F 150 N007 G01 X50 Y15 Z10 F 150 N008 G01 X50 Y15 Z-10 F 75 N009 G01 X50 Y15 Z10 F 150 N010 G01 X50 Y45 Z10 F 150
Stop above the center of the third hole
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F 150 N005 G01 X20 Y15 Z-10 F 75 N006 G01 X20 Y15 Z10 F 150 N007 G01 X50 Y15 Z10 F 150 N008 G01 X50 Y15 Z-10 F 75 N009 G01 X50 Y15 Z10 F 150 N010 G01 X50 Y45 Z10 F 150 N011 G01 X50 Y45 Z-10 F 75
Drill the third hole
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F 150 N005 G01 X20 Y15 Z-10 F 75 N006 G01 X20 Y15 Z10 F 150 N007 G01 X50 Y15 Z10 F 150 N008 G01 X50 Y15 Z-10 F 75 N009 G01 X50 Y15 Z10 F 150 N010 G01 X50 Y45 Z10 F 150 N011 G01 X50 Y45 Z-10 F 75 N012 G01 X50 Y45 Z10 F 150
Retract to a position above the third hole
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F 150 N005 G01 X20 Y15 Z-10 F 75 N006 G01 X20 Y15 Z10 F 150 N007 G01 X50 Y15 Z10 F 150 N008 G01 X50 Y15 Z-10 F 75 N009 G01 X50 Y15 Z10 F 150 N010 G01 X50 Y45 Z10 F 150 N011 G01 X50 Y45 Z-10 F 75 N012 G01 X50 Y45 Z10 F 150 N013 M05
Spindle off
Program Interpretation
Tool Change G55 X200 Y80 Program 2 N001 M06 T2 N002 M03 S 400 N003 G01 X-8 Y0 Z0 F 150 N004 G01 X20 Y15 Z10 F 150 N005 G01 X20 Y15 Z-10 F 75 N006 G01 X20 Y15 Z10 F 150 N007 G01 X50 Y15 Z10 F 150 N008 G01 X50 Y15 Z-10 F 75 N009 G01 X50 Y15 Z10 F 150 N010 G01 X50 Y45 Z10 F 150 N011 G01 X50 Y45 Z-10 F 75 N012 G01 X50 Y45 Z10 F 150 N013 M05 N014 M02 End Program