You are on page 1of 20

1

431313
Metal Forming Laboratory
Milling CNC


- CNC
- CNC
-

CNC
HAIDENHAIN
CAD/CAM

CNC




CNC (Computer Numerical Control)
3

3
3 X Y
Z Spindle
Spindle

-X

Z
-Y

Y
-Z

Servo motor

Linear Bearing & Slide way

Controller

Ball screw & Ball nut

Servo motor
G-Code
Servo motor
Ball screw Ball nut pitch
Ball screw Linear bearing Slide way

Round slide way


Ball nut
Servo motor

Ball screw

Pillow bearing

slide way
linear bearing ball screw
slide way ball screw pillow bearing servo motor
ball screw ball nut
slide way servo motor

Ball screw
table
Ball Nut
Linear bearing

Slide way

Ball nut

Ball screw () Ball Ball nut ()

G-Code & M-Code


G-Code M-Code

G-Code M-Code ISO
G00 Linear interpolation, Cartesian, rapid traverse.
G01 Linear interpolation, Cartesian.
G02 Circular interpolation, Cartesian , clockwise.
G03 Circular interpolation, Cartesian , counterclockwise.
G05 Circular interpolation , Cartesian, no direction specified.
G06 Circular interpolation , Cartesian, tangential transition from previous contour.
G07 Paraxial positioning block. Non-modal G-code.
G10 Linear interpolation, polar, rapid traverse.
G11 Linear interpolation, polar.
G12 Circular interpolation, Polar, clockwise.
G13 Circular interpolation, Polar, counterclockwise.
G15 Circular interpolation, Polar, nodirection specified.
G16 Circular interpolation, polar, tangential transition frpm previous contour.
G04 Dwell. Non-modal G-code.
G28 Mirror image.
G36 Spindle Orientation. not incorporated.
G37 Pocket contour defintion. not incorporated.
G54 Datum shift.
G72 Scaling factor.
G73 Coordinate system rotation.
G74 Slot milling.
G75 Rectangular pocket milling clockwise.
G76 Rectangular pocket milling counterclockwise.
G77 Circular pocket milling clockwise.
G78 Circular pocket milling counterclockwise.
G83 Peck drilling.
G84 Tapping.
G17 Plane selection XY, tool axis Z.
G18 Plane selection ZX, tool axis Y.
G19 Plane selection YZ, tool axis X.
G24 Chamfer with R. Non-Modal G-code.
G25 Corner rounding with R. Non-Modal G-code.
G26 Tangential contour approach with R. Non-Modal G-code.
G27 Tangential contour departure with R. Non-Modal G-code.
G29 Designate current position value as pole.
G30 Blank workpiece definition for graphics min, point.
G31 Blank workpiece definition for graphics max, point.
G40 No tool compensation.
G41 Tool path compensation, left of contour.
G42 Tool path compensation, right of contour.
G43 Paraxial compensation extension R+. Non-Modal G-code.

9
G44 Paraxial compensation reduction R-. Non-Modal G-code.
G70 Dimensions specified in inches (at start of program).

M-Code
M00 Stop program run/ Spindle STOP/Coolant OFF.
M02 Stop program run/Spindle STOP/Coolant OFF.
M03 Spindle ON : clockwise.
M04 Spindle ON: counterclockwise.
M05 Spindle STOP.
M06 Tool change/Stop program run. Spindle Stop.
M08 Coolant On.
M09 Coolant Off.
M13 Spindle On:clockwise/Coolant ON.
M14 Spindle On:counterclockwise/Coolant ON.
M30 same as M02. Return to block 1.
M89 Cycle Call. modal
M99 Cycle Call active.

Controller G Code
Controller

BRIDGEPORT VMC 500-16 Controller
HAIDENHAIN TNC 410M

10

Code Controller M/C TNC 410


LINEAR INTERPOLATION ( )
PATTERN
L
X___ Y ___ Z ___ R___ F ___
X = coordinate on X-axis Number
Y= coordinate on Y-axis Number
Z= coordinate on Z-axis Number
R= Tool Radius Compensation
R0 = No tool compensation .Center of cutter follow the contour.
RR= Tool compensation on the right of the contour.
RL= Tool compensation on the left of the contour.

R0

RR

11

RL
F= Feed rate
F0 9999 (mm. / min) For cutting or rapid transverse with determined speed.
F MAX
For rapid transverse only.

X Y Z
Example
or
or

L
L
L

X+10 Y-10 Z5 R0 F MAX


X+10 Y-10 F MAX
Y-50 RL F250

CIRCLE CENTER ( )
PATTERN
CC X___ Y___
X = coordinate on X-axis Number
Y= coordinate on Y-axis Number

12

Example

CC

X-50 Y+15

CIRCLE WITH CENTER ( )


PATTERN
C
X___ Y ___ DR ___ R___ F ___
X = coordinate on X-axis Number
Y = coordinate on Y-axis Number
Z = coordinate on Z-axis Number
DR= Direction of arc or circle cutting
DR- = Clockwise
DR+ =Counter clockwise
R= Tool Radius Compensation
R0 = No tool compensation .Center of cutter follow the contour.
RR= Tool compensation on the right of the contour.
RL= Tool compensation on the left of the contour.
F= Feed rate
F0 9999 (mm. / min) For cutting
cutter
X Y
Example

POS.1
L
POS.1 POS.2
L
CC
POS.2 POS.3
C

X+10 Y+0 RL F100


Y+75
X+50 Y+75
X+90 Y+75 DR-

13

CHAMFER ( )
PATTERN
CHF ____
CHF = Chamfer size Number


Example

POS.1
POS.1 POS.2
POS.2 POS.3

L
L
CHF
L

X+5 Y+0 RL F200


X-30 Y+30
10
X+20 Y+30

14

ROUNDING ( )
PATTERN

RND R ____

R = Rounding radius size Number .


Example

POS.1
POS.1 POS.2
POS.2 POS.3

L
L
RND
L

X+5 Y+0 RL F200


X-30 Y+30
10
X+20 Y+30

TOOL CALL ( tool )


PATTERN

TOOL CALL ____ Z

15

TOOL CALL = Tool to be used No. of tool.


Tool Tool table Tool
Example

TOOL CALL 1 Z

BLANK FORM ( )
PATTERN

BLK FORM 0.1 Z X ___ Y___ Z___


BLK FORM 0.2 X___ Y___ Z___
X = coordinate on X-axis Number
Y = coordinate on Y-axis Number
Z = coordinate on Z-axis Number

minimum point
3 maximum point
Example

BLK FORM 0.1 Z X+0 Y+0 Z-40


BLK FORM 0.2 X+100 Y+80 Z+0

16

17


PATTERN

BEGIN PGM __________ MM ()


END PGM ____________ MM ( )

BEGIN PGM = Program beginning ( Program name )


END PGM = Program ending ( Program name )
MM = Millimeter unit (INCH = US Customary)
M-Code
M00
M02
program )
M03
M04
M05
M06

Stop Program
Conditional Stop ( Spindle ,Coolant , cursor stop at end position of
Spindle on Clockwise
Spindle on Counter Clockwise
Spindle stop
Tool change

18

M08
M09
M13
M14
M30
M90

Coolant on
Coolant off
Spindle on Clockwise & Coolant on
Spindle on Counter clockwise & Coolant on
Same M02 ( Spindle ,Coolant, reset cursor to begin position of program )
Constant contouring speed at corner

HAIDENHAIN

Y
X
(End mill DIA 12 mm. Milling depth 0.5 mm WP thickness 10 mm.)

19
0 BEGIN PGM TEST MM
1 BLK FORM 0.1 Z X+0 Y+0 Z-10
2 BLK FORM 0.2 X+100 Y+100 Z+0
3 TOOL CALL 1 Z S6000
4 L X-50 Y-50 Z+50 R0 F MAX M13
5 L X-10 Y+0 Z-0.5 F MAX
6 L X+10 Y+10 RL F500
7 L Y+90
8 L X+90
9 CHF 10
10 L Y+72.36
11 CC X+110 Y+50
12 C X+90 Y+27.64 DR+ F 300
13 L Y+10 F400
14 RND R10
15 L X-10
16 L Z+150 R0 F MAX
17 M30
18 END PGM TEST MM

minimum point
maximum point
tool 1 6000 /



500 ./ tool
500 ./
500 ./ ( 1)
10 .
500 ./ ( 2)
( )
X Y
300 ./
( )
400 ./ ( 1)
10 .
400 ./ ( 2)
Z

20


1. . 3

R0 , RR RL ( 100x100x12) End mill size 12 mm.( 2
.)

2. .
End mill 14 mm (
) 180 x 30 x 5 .

You might also like