cnc
DESCRIPTION
PresentationTRANSCRIPT
04/08/23
Manufacturing Automation
Computer Numerical Control (CNC)*
Dr. L. K. Gaafar
04/08/23
Numerical Control
Numerical Control is the operation of a machine using coded instructions which consists of letters, numbers, punctuation marks, and other symbols. This coded information is known as the Part Program
These types of systems are referred to as “hardwire controls” and were popular from the 1950’s to 1970’s.
04/08/23
Components of Numerical Control
Machine
Part Program
Machine Control Unit (MCU)
04/08/23
Engineering design of a part
Develop manufacturing plan for the
part
Program numerical control instructions to allow the part to be
manufactured according to the plan
Process the program to develop cutter location data set
Post Process for a specific machine tool
The basic NC Process
From Bedworth et al. 1991
04/08/23
Computer Numerical ControlCNC
NC machine with a microprocessor as an integral part of the MCU. Data handling, control sequences, and response to input is determined by the integrated microprocessor.
Started in the 1970s
04/08/23
CNC Advantages
Increased Program storage capability at the machine
Program editing at the machine
Control systems upgrades possible
Option -resident CAM system at machine tool
Tool path verification
04/08/23
Part Programming
APT (Automatically Programmed Tool) is a software compiler for simplifying numerical control Programming.
Developed by MIT in 1959
APT is the most widely used processor
04/08/23
APT
APT (Automatically Programmed Tool) is a software compiler for simplifying numerical control Programming.
Developed by MIT in 1959
APT is the most widely used processor
04/08/23
APT Characteristics
•Three-dimensional unbounded surfaces and points are defined to represent the part to be made
•Surfaces are defined in a X-Y-Z coordinate system
•In Programming, the tool does all the moving; the part is stationary.
•Linear interpolation is used for curved tool paths
04/08/23
APT Statement Types (5)
•Identification
•Geometry
•Motion
•Postprocessor (feed, speed, coolant, … etc.)
•Auxiliary (tool, tolerance, part, … etc.)
04/08/23
APT NC Words (Codes)
N Code - Sequence NumberG Code - Control FunctionsF Code - Feed Rate S Code - Spindle SpeedT Code - Tool Selection M Code - Miscellaneous functions
X, Y, Z Code - Coordinate position
04/08/23
APT Programming ExampleCylindrical Part
2
5
2
2.5
1
7.5
20
Raw Material
Finished Part
70
04/08/23
APT Programming ExampleCylindrical Part
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100N0090 G00 X26.0 Z2.0 S500N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650N0110 G00 Z2.0N0120 X50.0 Z50.0 T00N0130 M30
Please sign up to the lab demo and watch this program running
04/08/23
APT Program InterpretationO0013
Program identification number
04/08/23
APT Program InterpretationO0013N0010 T0404
N0010 Sequence numberT0404 Select tool number 404
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.0 Z0.0 S500 M04
G57 PS0G00 Rapid movement (no cutting)X26.0 X location (as a diameter; 13 form zero)Z0.0 Z locationS500 Spindle speed is 500 rpmM04 Rotate spindle counterclockwise
APT Program Interpretation
x
z(0,0) +ve
+ve
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 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
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 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
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 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
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404
T0404 Select tool number 404
Since we are using the same tool (404)for both turning and facing, N0050, N0060 are not needed
APT Program Interpretation
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04
G57 PS0 G00 Rapid movement (no cutting)X25.0 X location (as a diameter; 12.5 form zero)Z2.0 Z locationS500 Spindle speed is 500 rpmM04 Rotate spindle counterclockwise
APT Program Interpretation
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100
G01 Linear interpolation (cutting)Z-70 Move only in z direction (external turning)F100 Set feed rate to 100 mm/min.
APT Program Interpretation
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100N0090 G00 X26.0 Z2.0 S500
G00 Move rapidly away from workpiece (no cutting) to location x= 26.0 (13.0 from zero) and z = 2.0.
APT Program Interpretation
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100N0090 G00 X26.0 Z2.0 S500N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650
G84 Turning cycle for machining the stepX17.5 final diameterZ-20 length of step is 20 mmD0=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
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100N0090 G00 X26.0 Z2.0 S500N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650N0110 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
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100N0090 G00 X26.0 Z2.0 S500N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650N0110 G00 Z2.0N0120 X50.0 Z50.0 T00
X50.0 Z50.0 Move to the tool changing locationT00 cancel tool selection
APT Program Interpretation
04/08/23
O0013N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100N0090 G00 X26.0 Z2.0 S500N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650N0110 G00 Z2.0N0120 X50.0 Z50.0 T00N0130 M30
M30 Program End
APT Program Interpretation
04/08/23
Sample Geometry Statements
APT Vocabulary
POINTLINEPLANECIRCLEPATERNCYLNDR
04/08/23
Programming Example
Raw Material Finished Part
04/08/23
Programming Example
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75N009 G01 X0 Y0 Z-0.5 XYFeed 75N010 G81 R3 E9 N7 Z-0.5N011 M05N012 M02
x
y
04/08/23
Programming Example
Tool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75N012 G01 X50 Y45 Z10 ZFeed 150N013 M05N014 M02
x
y
04/08/23
Program InterpretationG55 X200 Y80
Setting the datum to the lower left corner of the work piece
04/08/23
Program InterpretationG55 X200 Y80Program 1
Program Identification Number
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1
N001 Sequence NumberM06 Tool Change (End Mill with
Diameter=12mmT1 Tool Number
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400
Start rotating the spindle clockwise with 400 rpm
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
Go to Safe Position with feed 150mm/min
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150
Lower the end mill to determine the depth of cut
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 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
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 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
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75
Cutting the horizontally up to X=30
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75
Cutting to X=0 & Y=40
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75N009 G01 X0 Y0 Z-0.5 XYFeed 75
Complete the countering
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75N009 G01 X0 Y0 Z-0.5 XYFeed 75N010 G81 R3 E9 N7 Z-0.5
Repeat 7 times blocks from N003 to N009 with incremental offset of Z=-0.5
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75N009 G01 X0 Y0 Z-0.5 XYFeed 75N010 G81 R3 E9 N7 Z-0.5N011 M05
Spindle Off
04/08/23
Program InterpretationG55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75N009 G01 X0 Y0 Z-0.5 XYFeed 75N010 G81 R3 E9 N7 Z-0.5N011 M05N012 M02
End Program
04/08/23
Program InterpretationTool Change
Changing the tool
04/08/23
Program InterpretationTool ChangeG55 X200 Y80
Setting the datum to the lower left corner of the work piece
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2
Program Identification Number
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2
N001 Sequence NumberM06 Tool Change (Drill with Diameter=6mmT2 Tool Number
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400
Start rotating the spindle clockwise with 400 rpm
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
Go to Safe Position with feed 150mm/min
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150
Stop above the center of the first hole
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75
Start Drill the first hole
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150
Retract to a position above the hole
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150
Stop above the center of the second hole
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75
Drill the second hole
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150
Retract to a position above the second hole
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150
Stop above the center of the third hole
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75
Drill the third hole
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75N012 G01 X50 Y45 Z10 ZFeed 150
Retract to a position above the third hole
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75N012 G01 X50 Y45 Z10 ZFeed 150N013 M05
Spindle off
04/08/23
Program InterpretationTool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75N012 G01 X50 Y45 Z10 ZFeed 150N013 M05N014 M02
End Program
04/08/23
Sample Point Statements
PTA = POINT/3,4,5
PTB LIN1
LIN2
PTB = POINT/ INTOF, LIN1,LIN2
PTC
PTDC1
LIN3
PTC = POINT/YLARGE, INTOF, LIN3,C1 PTC = POINT/XLARGE, INTOF, LIN3,C1PTD = POINT/YSMALL, INTOF, LIN3,C1 PTD = POINT/XSMALLE, INTOF, LIN3,C1
x
y
04/08/23
Sample Point Statements
PTE
PTF
C1
PTE = POINT/YLARGE, INTOF, C1,C2PTE = POINT/XLARGE, INTOF,C1, C2PTF = POINT/YSMALL, INTOF, C1, C2PTF = POINT/XSMALLE, INTOF,C1, C2
C2
x
y