Académique Documents
Professionnel Documents
Culture Documents
Control Programming
6.1 NC part programming
6.2 Manual part programming
6.3 Computer-assisted part programming
6.4 CAD part programming
6.5 NC cutter-path verification
6.6 Analytical geometry for part programming
Coordinate Systems/
NC Words/
6.1.1
Coordinate System/
Cartesian coordinate
system:
the xyz system is a righthand system
Positive motion: moving
the cutting tool away from
the workpiece.
6.1.1
Coordinate System/
6.1.1
Coordinate System/
X // table
X AXIS
workpiece-rotating machine:
X is the direction of tool movement
horizontal milling machine :
X axis is parallel to the table
vertical machine :
+X axis points to the right
when the programmer
is facing the machine.
Z
X
6.1.5
NC Words/
N, G, X, Y Z, A, B, C, I, J, K, F, S, T, R, M
G: preparatory word
to prepare for control functions (the motion of each axis,
coordinate system, coordinate plane, cutter radius
compensation, tool length offset)
M: miscellaneous word
to control miscellaneous functions (spindle on/off,
start/stop the machine, turn on/off the coolant, change the
tool, and rewind the program tape)
6.1.5
NC Words/
6.1.5
NC Words/
M CODES
M00
Program stop
M06
Tool change
M01
Optional stop
M07
Flood coolant on
M02
End of program
M08
Mist coolant on
M03
Spindle CW
M09
Coolant off
M04
Spindle CCW
M30
End of tape
6.1.5
NC Words/
modal functions
Modal functions stay active until some other command
changes it. Modal commands are arranged in sets called
modal groups , and only one member of a
modal group may be in forces at any given time.
non-modal functions
Non-modal functions have effect only on the lines on
which they occur.
6.1.5
NC Words/
modal groups/
6.1.5
NC Words/
M CODES
modal groups/
M00
Program stop
M06
Tool change
M01
Optional stop
M07
Flood coolant on
M02
End of program
M08
Mist coolant on
M03
Spindle CW
M09
Coolant off
M04
Spindle CCW
M30
End of tape
6.1.5
NC Words/
N, G, X, Y , Z, A, B, C, I, J, K, F, S, T, R, M
T: tool number
6.1.5
NC Words/
N, G, X, Y , Z, A, B, C, I, J, K, F, S, T, R, M
6.1.5
NC Words/
N, G, X, Y, Z, A, B, C, I, J, K, F, S, T, R, M
NC Words/
G codes
Unit selection:
Coordinates selection:
Machine zero
23
Working coordinate
(is decided by the offset from the machine zero)
X
25.2
G92
Be defined in program
G92 X25.2 Z23.0
G54 G59
Be defined in CRT/MDI environment, not defined in program
After they are defined, they can be used in program.
G55
G56
G57
G58
G59
G54
Machine zero
G00:
G90:
absolute
coordinate
s
Start
(20,10)
(10,10)
(0,0
)
G01:
G91:
incremental
coordinates
Y
End
100.0
Start
200.0
G02, G03:
For circular interpolation, the tool destination and the circle center
are programmed in one block
G02 is clockwise interpolation, G03 is counterclockwise
interpolation
G 02
R
G17
X
__
Y
__
F __;
G 03
I __ J __
G 02
R
X
__
Z
__
G
03
I __
G18
G 02
R
G19
Y __ Z __
G 03
J __
F __;
K __
F __;
K __
R=-50mm
End
Specify R with
sign before it:
180 +R
Start
R=50mm
>180 -R
End
I, J, K are the
incremental distance
from the start of the arc;
X
Start
j
Center
i
To define working
coordinate
Y
100
60
40
R50
R60
X
90 120 140
200
coordinates
Specified
point
Machine
Zero
A
New specified point in
G29
Tool Compensation
Tool-Radius Compensation /
Tool-Height Compensation/
Positive G43
Negative G44
Cancel tool-height compensation G49
Tool-Radius Compensation
Start
Tool-Radius
Compensation
N0010 G41
N0020 G01 X0.500 Y1.700
N0030 G01 X1.500
Ramp on block
Inside Corner
in Tool-Radius
Compensation
When the cutter path determines the geometry of an
inside corner, it stops at the inside cutting point
N0010 G42
N0030 G01 X1.500 Y2.000
N0030 G01 X0.000 Y1.600
External curves
in Tool-Radius
Compensation
External curves
in Tool-Radius
Compensation
Use of M96 and M97
N0010 G41
N0020 G01 X1.000 Y1.000
N0030 G01 Y0.800 M97
N0040 G01 X2.000
M97
Tool-Height Compensation
G43 (G44) H
Tool-Height Compensation
Example:
N0010
N0020
G91:
incremental
coordinates
M code
miscellaneous word/
miscellaneous functions:
M code
M00
Program stop
M06
Tool change
M01
Optional stop
M07
Flood coolant on
M02
End of program
M08
Mist coolant on
M03
Spindle CW
M09
Coolant off
M04
Spindle CCW
M30
End of tape
modal groups/
M code: M06
M06 signals the tool-change operation.
On a machine equipped with an automatic
tool changer, it stops the spindle, retracts
the spindle to the tool-change
position, and then changes the tool to the
one specified in the T-code.
Example
Example
Part program
Explanation
Example part
Figure 6.10
Working
coordinate
zero point
Setup and
cutter path
for example part
Figure 6.11
Summary
Time-consuming
Automatically Programmed
Tool APT
APT
APT
20
L3
L2
PARTNO LJBCL
5
L1
MACHIN MHC432
$$
SETPT(0,0 5
INTOL/0.01 0.01 )
TN,MILL,1,8,10 1 8 10
LOADTL/1 1
CUTTER/8 8
SPINDLE/800,CLW 800rpm
FEDRAT/100 100mm/min
COOLNT/ON
C1
X
L3
L2
C1
L1
$$
SETPT(0,0 5
X
SETPT=POINT/0,0 SETPT
) (0,0)
L1=LINE/XAXIS,5 L1 X Y 5
L2=LINE/YAXIS,5 L2 Y X 5
P1=POINT/5,20 P1 (5,20)
L3=LINE/P1,ATANGLE,(90+45) L3 P1 X 135
C1=CIRCLE/YLARGE,L1,XSMALL,L3,RADIUS,2.5 C1 L1 L3
Y X 2.5
P1
5
SETPT(0,0 5
)
C1
L1
X
$$
FROM/SETPT SETPT
GO/TO,L1,TO,L2 L1 L2
TLRGT,GORGT/L1,TANTO,C1 L1 C1
GOFWD/C1,TANTO,L3 C1 L3
GOFWD/L3,PAST,L2 L3 L2
GOLFT/L2,PAST,L1 L2 L1
GOTO/SETPT SETPT
$$
COOLNT/OFF
SPINDLE/OFF
FINI
%PM
APT
APT
After
APT compiler
P1
20
L3
L2
N9900 LJBCL
C1
N1 G90
5
L1
N2 G17 XY
N3 G40
SETPT(0,0 5
X
N4 T1 M06 1
)
N5 S800 M03 800rpm
N6 G90
N7 G1 X1 Y1 Z0 F100
N8 X13.964 L1
N9 G3 X18.561 Y12.096 I13.964 J7.5 C1
N10 G1 X1 Y29.657 L3
N13 M9
N11 Y1 L2
N14 M5
N12 X0 Y0
N15 G0 Z150 Z
N16 M30
Summary
Need improvement
Procedures
Modeling
CAD drawing
Part-programming
Tool path
Verification
NC program
Part-programming
Modeling
Tool path
Execute
calculation
Set target
shape model
Specify tool
- Tool diameter
- RPM
- Feed rate
Straight
end mill
Work
Axial
cutting
depth
Work
Layer by layer/
Axial
cutting
depth
Work
Tool
direction-parallel milling
contour-parallel milling
Applications
Contour Line
(Zig-Zag)
Tool
Tool
Same roughness
Part-programming
Modeling
Tool path
Execute
calculation
Set target
shape model
Specify tool
- Tool diameter
- RPM
- Feed rate
Part-programming
Modeling
Tool path
Execute
calculation
Set target
shape model
Specify tool
- Tool diameter
- RPM
- Feed rate
Part-programming
Modeling
Tool path
Execute
calculation
Set target
shape model
Specify tool
- Tool diameter
- RPM
- Feed rate
Approach/Engage/Entry
Departure/Retract/Exit
Part-programming
Modeling
Tool path
Execute
calculation
Set target
shape model
Specify tool
- Tool diameter
- RPM
- Feed rate
Purposes/
Review
Coordinate systems
Typical NC words
Three types of part programming
Manual/APT/CAD
Homework
6.2
6.3
6.4