Beruflich Dokumente
Kultur Dokumente
BAGIAN II
CNC MILLING
MACHINE
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
38
COMPOSITION
OF A PART
PROGRAM
WORD EXAMPLE -
ADDRESS EXAMPLE -
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
39
MAIN PROGRAM
STRUCTURE
(M illCAM D esigner
- star M CD )
(2/10/1997)
(Triac PC (m etric))
(Post fanucm : 1.20
24 June 1994)
O 0050;
N 0010 G 21;
[BILLET X240 Y170 Z10
[ED G EM O VE X0 Y0
[TO O LD EF T1 D 2
N 0020 G 91 G 28 X0 Y0 Z0;
N 0030 M 6 T1;
N 0040 G 43 H 1;
N 0050 M 3 S3000;
N 0060 G 90 G 00 X90
Z120;
N 0070 Z2;
N 080 G O 1 Z-0.5 F40;
N 0090 X105 Y160 F60;
N 0100 X120 Y120;
N 0110 X165;
N 0120 X130 Y95;
N 0130 X145 Y50;
N 0140 X105 Y80;
N 0150 X65 Y50;
N 0160 X80 Y95;
N 0170 X45 Y120;
N 0180 X90;
N 0190 G 00 Z2;
N 0200 M 5;
N 0210 G 91 G 28 X0 Y0 Z0;
N 0220 M 30;
CAD/CAM software
Package informnation
Program
number
Units definition
(Matric or Imperial) and
Billet size for simulation
Main
program
Information
Program
end
BLOCK
CONFIGURATION
N 0000
Block
sequen
ce
number
G 00
Preparato
ry
function
Interpolatio
n
function
F0000
M 00
S0000
Feedrate Miscellaneo
function
us
function
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
T00
Spindl
e
functio
n
Tool
functio
n
End
of
block
signal
40
TOOL
FUNCTION
TOOL
(TOOL OFFSET)
FUNTION
speed.
(CUTTING SPEED)
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
41
G CODES
G40
G41
G42
DIRECTION
TOOL PATH
G40
CANCEL
G41
LEFT HAND
G42
RIGHT
HAND
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
42
NOTE 1.
A G02 or G03 circular interpolation command cannot be
specified in the start-up block.
NOTE 2.
In cutter compensation start-up, two blocks are read into
the machine controller. The first block is performed and
the second block is entered and held in memory.
In subsequent compensation moves, two blocks are read
in advance, so the machine controller has the block
currently being performed and the next two blocks in
memory.
This is because cutter compensation always needs to
know what happens in the move following the one being
currently performed. The machine controller can plan
ahead to calculate the correct end position for the current
move, that will also be the correct start position allowing
for cutter compensation, for the next move.
NOTE 3.
The codes G40, G41 and G42 are modal, belonging to the
same modal family. They are incompatible with each other
on the same block.
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
43
O0010
N0010 GOO X-15 Y-15;
N0020 G41 X0 Y0 F100;
(Start-Up Move)
N0030 Y40;
N0040 X30 Y80;
N0050 X60
N0060 G02 X100 Y40 R40;
N0070 G01 Y30;
N0080 G03 X70 Y0 R30;
N0090 X0;
N0100 X-15 Y-15;
(Cancellation Move)
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
44
G CODES
G73 G89
(CANNED
CYCLES)
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
45
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
46
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
47
NOTE 1.
The addresses P and Q are omitted within some canned
cycles.
NOTE 2.
Once the drilling data has been specified and read into the
machine controller, it retained until it is either changed, or
the canned cycle cancelled. All the required data must be
specified when the canned cycle is started and only the
data to be changed has to be specified during the cycle.
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
48
G CODES
G73
(HIGH SPEED
PECK DRILLING)Please refer to page 48 for the variable definitions.
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
49
G CODES
G74
(COUNTER
TAPPING)
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth.
Op 4) Dwell P (time for spindle stop and start CW
direction).
Op 5) Feed to R point level.
Op 6) Dwell P (time for spindle stop and start CCW
direction).
If the G98 code is programmed within the cycle, the next
move will be a rapid traverse to the initial level. If the G99
code is programmed within the cycle, there will be no
movement.
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
50
G CODES
G76
(FINE BORING)
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth.
Op 4) Dwell P (time for spindle stop and move Q value)
Op 5) Feed to R point level.
Op 6) Move back Q value
The above moves vary depending on the setting of the
codes G98 and G99.
NOTE 1
THIS CYCLE CAN ONLY BE USED ON A MACHINE FITTED
WITH A SPINDLE CAPABLE OF ORIENTATION. BECAUSE THE
TOOL MOVES WITHIN THE HOLE AFTER SPINDLE STOP TO
FACE THE OPPOSITE DIRECTION.
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
51
G CODES
G81
(DRILLING
SPOT BORING)
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth.
Op 4) Rapid traverse to initial level (G98) or R point level
(G99).
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
52
G CODES
G82
(DRILLING COUNTER
BORING)
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth.
Op 4) Dwell for value P
Op 5) Rapid traverse to initial level (G98) or R point level
(G99)
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
53
G CODES -
G83
(DEEP HOLE
PECK DRILLING)
Please refer to page 48 for the variable definitions.
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to the value of Q
Op 4) Rapid traverse out to R point. Rapid traverse back
to within 1 mm of depth of Q out. Operation
moves 2 and 4 repeated until Z depth is reached.
Op 5) Rapid traverse to initial level (G98) or R point level
(G99)
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
54
G CODES -
G84
(TAPPING)
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth.
Op 4) Dwell P (time for spindle stop and start CCW
direction)
Op 5) Feed to R point level
Op 6) Dwell P (time for spindle stop and start CW
direction)
In the G98 code is programmed within the cycle, the next
move will be a rapid traverse to the Initial Level. If the
G99 code is programmed within the cycle, there will be no
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
55
G CODES
G85
(BORING)
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed in to the Z depth.
Op 4) Feed back to R point level.
If the G98 code is programmed within in cycle, the next
move will be a rapid traverse to the initial level. If the G99
code is programmed within the cycle, there will be no
movement.
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
56
G CODES
G86
(BORING)
(BORING
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth and spindle stop.
Op 4) Rapid traverse to the initial level and spindle CW
for G98, or rapid traverse to R point level and
spindle CW for G99.
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
57
G CODES
G87
(BACK
BORING)
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Spindle stop and orientation. Move the value of Q.
Op 3) Rapid traverse to R point level.
Op 4) Spindle CW and move back the value on Q.
Op 5) Feed in to Z depth (positive direction) and dwell P.
Op 6) Spindle stop and orientate.
Op 7) Move the value of Q
Op 8) Rapid traverse to R point level
Op 9) Move back the value of Q and spindle CW.
NOTE 1
THIS CYCLE CAN ONLY BE USED ON A MACHINE FIFTED
SPINDLE CAPABLE OF ORIENTATION. BECAUSE THE TOOL
MOVES WITHIN THE HOLE AFTER SPINDLE STOP TO FACE
OPPOSITE DIRECTION
NOTE 2
A G99 return to R point level is not possible within this
cycle.
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
58
G CODES
G89
(BORING)
(BORING)
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth and dwell for value P.
Op 4) Feed out to R point and rapid transverse to initial
level for G98, or feed out to R point for G99.
G CODES
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
59
PROGRAM
EXAMPLE
USING CANNED
CYCLES
Tool change.
M03;
N0070 Y10;
N0080 X30;
N0110 Y10;
N0120 X110;
Tool change.
F60;
Program stop
GENERAL LAYOUT OF
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
60
FANUC OPERATOR
CONTROL PANEL
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
61
CONTROL PANEL
QUICK REFERENCE DIAGRAM
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
62
FANUC DATA
INPUT PANEL
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
63
MAIN FANUC
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
64
OPERATORS PANEL
[HOME] [JOG] -
[TEACH]-
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
65
[STOP] -
- Spindle Stop.
[CCW] Coolant:
- Coolant on.
- Coolant off.
MAIN FANUC
OPERATORS PANEL
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
66
67
A. G CODE
G00 Fast Traverse
A G00 the tool to move to the specified position at the maximum speed.
Example: G00 X20 Y30 Z1 Here the tool is moved to X 20mm, Y 30mm, and Z
1mm.
G01 Linier Traverse
A G01 causes linear motion to the given position.
Example: G21
G01 X20 Y30 Z-1 F180 Here the tool is moved to X 20 mm, Y 30 mm,
and Z -1 mm at a federate of 180mm per minute.
G02 Clockwise Circular
G02 causes clockwise circular motion. Arcs can be specified by either radius or by
centre. If a positive radius is specified then the shorter arc is cut. If it negative
then the longer arc is cut.
Example: G20 X30 Y20 R15 F80 In this example the tool is moved to X 30 mm
and Y 20 mm. The arc has a radius of 15 mm.
I and J specify the arc centre relative to the arc start. If the value is 0 then it
neednt be specified.
Example: G02 X30 I15
G03 Counter-Clockwise Circular
G03 causes counter-clockwise circular motion. Arcs can be specified by either
radius or arc centre. If a positive radius is specified then the shorter arc is cut. If it
is negative then the longer arc is cut.
Example: G03 X30 Y20 R15 F80 in this example the tool is moved to X 30mm
and Y 20mm. The arc has a radius of 15 mm.
I and J specify the arc centre relative to the arc start. If the value is 0 then it
neednt be specified.
Example: G03 X30 I15
G04 Dwell
A Dwell of up to 500 seconds can be programmed.
Example: G04 X10 This causes a delay in machining of 10 seconds.
68
69
Example:
70
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
71
M08 Coolant On
M08 turns the coolant on.
M09 Coolant Of
M09 turns the coolant off.
M10/11 Work Clamp Open/Close
M10 opens the work clamp.
M11 closes the work clamp.
M13 Coolant, Spindle Fwd
M13 turns the coolant on and starts forward spindle motion.
Example: M13 S1000
M14 Coolant, Spindle Rev
M14 turns the coolant on and starts reverse spindle motion.
Example: M14 S1000
M19 Orientate Spindle
M19 orientates the spindle.
M20/21 ATC Arm In/Out
M20 moves the ATC arm in.
M21 moves the ATC arm out.
M24/25 ATC Arm Clamping
M24 activates the ATC drawbar.
M25 releases the ATC drawbar.
M27 Reset Carousel
M27 can only be used in the control panel. The current carousel position is treated
as position one.
M32/33 ATC Clw/Cclw
M32 rotate the ATC clockwise.
M33 rotates the ATC counter-clockwise.
M38/39 Door Open/Close
M38 opens the door.
M39 closes the door.
M62/63 Aux 1/2 On
M62 sets auxiliary output 1 on
M63 sets auxiliary output 2 on
M64/65 Aux 1/2 Of
M64 sets auxiliary output 1 off
M65 sets auxiliary output 2 off
72
M70 X Mirror On
M70 sets X axis mirroring about the current X axis position
M71 Y Mirror On
M71 sets Y axis mirroring about the current Y axis position.
M76/77 Wait for Aux 1/2 Low
M76 waits for auxiliary input 1 to become off
M77 waits for auxiliary input 2 to become off
M80 X Mirror Of
M80 disables X axis mirroring.
M81 Y Mirror Of
M81 disables Y axis mirroring.
M98 Subprogram
M98 causes another program to be executed.
The P value specifies the program number and the number of times to execute
it.
The rightmost 4 digits are the program number. The digits to the left are the
number of repetitions.
There can be up to 999 repetitions, if the value is omitted it is called once.
Examples: M98 P12 and M98 P10012 both execute CNC program 12 once.
M99 Subprogram Exit
Returns control to the program that called the current program. If a P value is
specified then execution begins from the block with the same N number,
otherwise it is from the block after the subprogram call.
If an M99 is specified in the main program then the execution is from the start of
the block and finish on end of block of subprogram.
Laboratorium
Laboratorium CNC Program Diploma Teknik Mesin SV-UGM
SV-UGM
73