4 g codes part 2
TRANSCRIPT
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 1/14
1995
UMY
UniversitasMuhammadiyah
Yogyakarta
www.umy.ac.id
CNC/CAM#4 G Codes Part 2
Tutik Sriani, S.T., M.Eng, PhD
1
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 2/14
1995
NC Milling: Cutter Radius Offset
2
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 3/14
1995
NC Milling: Cutter Radius Offset
• Manual programming calculation of coordinates center
of mill-cutter calculate by hand
• Manual offset only valid for one cutter (ex: Ø.75 tool)
3
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 4/14
1995
CNC Milling: Cutter Radius Offset
• Cutter radius offset: a feature of the control system that allowsprogramming a contour without knowing the exact diameter (radius)of the cutter.
• Considerations:
Unknown size of the cutter radius
Adjusting for thecutter wear , deflection, etc
Roughing and finishing operations
Maintaining machining tolerances, etc
• Based on three items:
a. Points of the drawing contourb. Specified direction of the cutter motion
c. Radius of the cutter stored in the control system
4
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 5/14
1995
CNC Milling: Cutter Radius Offset
Direction of cutter motion:
5
G41: Offset (compensation) of the cutter radius to the LEFT of the contouring direction
G42: Offset (compensation) of the cutter radius to the RIGHT of the contouring direction
G40: Cutter radius offset mode CANCEL
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 6/14
1995
CNC Milling: Cutter Radius Offset
Radius of the cutter
6
Four major keys to a successful use of the cutter radius offset feature:
1. To know how to start the offset
2. To know how to change the offset
3. To know how to end the offset
4. To know what towatch between the start and end
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 7/14
1995
CNC Milling: Cutter Radius Offset
Start-up Methods : Always select the start position of the
cutter away from the contour, in the clear area
7
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 8/14
1995
CNC Milling: Cutter Radius Offset
8
Seq Code Explanation
N01 G90 G20 Absolute, imperial (inches)
N02 G17 G40 XY plane, cutter radius
compensation cancel,
N03 G54 G00X-0.625 Y-0.625 Z1.0 S920 M03 Work coordinate offset, startposition, spindle 920 rpm CW
N04 G01 Z-0.55 F25.0 M08 Tool infeed, P1
N05 G41X0 D01 F15.0 Start offset use cutter D01
N06 Y1.125 P2
N07 X2.25 Y1.8561 P3
N08 Y0.625 P4
N09 G02X1.625 Y0 CR0.625 P5
N10 G01X-0.625 P1
N11 G00 G40 Y-0.625 Z5
M30
Safe position, cutter radius
compensation cancel, stop
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 9/14
1995
CNC Turning: Tool Address
• Ex: T0204 will cause the turret to index to the tool station
#2(first two digits) which will become the working station
(active tool). At the same time, the associated tool wearoffset number (the second pair of digits) will become
effective as well.
9
G00 T0214: Tool station 02, wear offset 14
G00 T1105: Tool station 11, wear offset 05
G00 T0404: Tool station 04, wear offset 04
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 10/14
1995
CNC Turning: Tool Address
• Tolerances: only ondiameter , only on shoulders, both on diameter and shoulders
• Sample of tolerances only on diameter using three cutter
10
The tolerances in all three examples are for
training purposes only and will be much smaller in
reality.
All chamfer tolerances are 0.010, and non-
specified tolerances are 0.005.
Material is a 1.5 inch aluminum bar and three
tools are used:
1. T01: for the face and rough contour
2. T03: for the finishing of the contour to size
3. T05: 0.125 wide part-off tool
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 11/14
1995
CNC Turning: Tool Address
11
Seq Code Explanation
(T01 – Face and Rough Turn )
N01 G90 G20T0100 Absolute, inches, tool #1, no wear
N02 G96 S500 M03 Constant surface speed, spindle CW
N03 G00 G41 X0.85 Z0
T0101 M08
Rapid move, cutter compensation left,
XZ-tool change position, tool #1 offset
01, coolant ON
N04 G01 X-0.07 F0.005 Facing with feedrate 0.005 in/rev
N05 Z0.1 Tool retract in +Z
N06 G00 G42 X0.775 Rapid move, cutter compensation
right, X position (radius)
N07 G71P8 Q15 U0.04
F0.01
Rough cutting cycle, P8: start block of
rough contour cycle, Q14: end block of
rough contour cycle, U: 0.04 allowance
on diameter for rough cut, feedrate
N08 G00 X0.365 Rapid move to X0.365
N09 G01 X0.3125 Z-0.03F0.003
Cut to XZ-position with feedrate 0.003inch/rev
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 12/14
1995
CNC Turning: Tool Address
12
Seq Code Explanation
(T01 – Face and Rough Turn )
N10 Z-0.4 Cut 1st block to –Z 0.4 inch
N11 X0.5 C-0.03 Cut chamfer length 0.03 in @ Ø 1.0 inch
N12 Z-0.75 Cut to –Z 0.75 inch
N13 X0.6875 C-0.03 Cut chamfer length 0.03 in @ Ø 1.375 inch
N14 Z-1.255 Cut to –Z 1.255 inch (plus parting-off area)
N15 U0.2 0.2 allowance on diameter for rough cut
N16 G00 G40 X5.0
Z5.0 T0100
Rapid move to XZ position, cutter
compensation cancel, tool #1 no wear
N17 M01 Stop a running program temporarily
(T03 – Finish Turn)
N18 G50 S3500
T0300
Reset scaling (if any), spindle 3500 rpm,
tool #3 with no wear
N19 G96 S750 M03 Constant surface speed, spindle ON-CW
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 13/14
1995
CNC Turning: Tool Address
13
Seq Code Explanation
(T03 – Finish Turn)
N20 G00 G42 X0.85
Z0.1 T0313 M08
Rapid move to XZ position, cutter
radius compensation right, tool #3
wear offset 13, coolant ON
N21 X0.365 Move to X position
N22 G01 X0.3125 Z-0.03F0.002
Cut 1st block to XZ position, feedrate0.002 in/rev
N23 Z-0.4 Cut to –Z 0.4
N24 X0.5 C-0.03 Cut chamfer length 0.03 inch
N25 Z-0.75 Cut to –Z 0.75 in
N26 X0.6875 C-0.03 Cut chamfer length 0.03 inch
N27 Z-1.255 Cut to –Z 1.255
N28 G00 G40 X5 Z5 Rapid move to XZ
N29 M01 Stop a running program temporarily
8/10/2019 4 G Codes Part 2
http://slidepdf.com/reader/full/4-g-codes-part-2 14/14
1995
CNC Turning: Tool Address
14
Seq Code Explanation
(T05 – 0.125 wide part off)
N30 T0500 S2000 M03 Tool #5 no wear, spindle CW
N31 G00 X0.85 Z-1.255
T0505 M08
Rapid move to XZ position, tool #5
wear offset 05, coolant ON
N32 G01 X0.6 F0.002 Cut to X 0.6 inch
N33 G00 X0.9 Rapid move to X position
N34 Z-1.1825 Rapid move to Z position
N35 G01 X0.5675 Z-
1.25 F0.001
Cut to XZ position
N36 X-0.02 F0.0015 Cut offN37 G00 X5 Tool retract in X direction
N38 Z5 T0500 M09 Tool retract in Z, tool #5 no wear,
coolant OFF
N39 M30 Program stop