Cnc turning(Fanuc system)

13,759 views 69 slides Jul 29, 2018
Slide 1
Slide 1 of 69
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69

About This Presentation

This is the ppt of CNC turning with Fanuc system.It helps you to encourage your CNC programming skills,also in this ppt some theory of CNC turning are available which helps you to do the programming in the proper way.Here some points are given below to do the programming in the fanuc control CNC.
1 ...


Slide Content

CNC TURNINGCNC TURNING
(FANUC SYSTEM)(FANUC SYSTEM)

INTRODUCTIONINTRODUCTION
FUNDAMENTAL PRINCIPLESFUNDAMENTAL PRINCIPLES
INSTRUCTIONINSTRUCTION

1. INTRODUCTION1. INTRODUCTION
Ways of TurningWays of Turning
Parts of CNC MachineParts of CNC Machine
Working Methods of CNCWorking Methods of CNC

Ways of TurningWays of Turning
Conventional or Traditional Conventional or Traditional
Numerical Control (NC)Numerical Control (NC)
Computer Numerical Control (CNC)Computer Numerical Control (CNC)

Difficulties with Conventional SystemDifficulties with Conventional System
Complex shapes are difficult to machineComplex shapes are difficult to machine
Depends on the human skill Depends on the human skill
Frequent & repeated measurements are requiredFrequent & repeated measurements are required
Difficult to achieve consistency in product qualityDifficult to achieve consistency in product quality
High Changeover TimeHigh Changeover Time
Less productive hoursLess productive hours
More scrap is generatedMore scrap is generated

Current Market DemandCurrent Market Demand
High quality products High quality products
at at  Lowest cost Lowest cost
in in  Minimum time Minimum time
with with  wide range of variety wide range of variety
Answer to the above is NC System

Parts of NC/CNC MachineParts of NC/CNC Machine
Programming UnitProgramming Unit
Machine Control UnitMachine Control Unit
Machine Tool UnitMachine Tool Unit
NCNC
CNCCNC

Programming UnitProgramming Unit
Programmer Programmer
Computer systemComputer system
User Interface deviceUser Interface device
Data Storage and Transfer facilityData Storage and Transfer facility

Machine Control UnitMachine Control Unit
Tape ReaderTape Reader
Data BufferData Buffer
Signal Output Channels to Machine ToolSignal Output Channels to Machine Tool
Feedback channels from the Machine ToolFeedback channels from the Machine Tool

Machine ToolMachine Tool
StructureStructure
Extra RigidExtra Rigid
Easy chip disposal System, eg: Use of Slant BedEasy chip disposal System, eg: Use of Slant Bed
Thermal ResistantThermal Resistant
DrivesDrives
AC Induction motorsAC Induction motors
DC motorsDC motors

Machine ToolMachine Tool
Actuation SystemActuation System
Stepper motor/servomotorStepper motor/servomotor
Ball Screw & nut with support bearingBall Screw & nut with support bearing
Feed back devices on closed loop systemFeed back devices on closed loop system
Linear BearingLinear Bearing
Tool & Work handling DevicesTool & Work handling Devices
Automatic Tool Changers (ATCs)Automatic Tool Changers (ATCs)
Turret Head Turret Head
Automatic Pallet ChangersAutomatic Pallet Changers
Hydraulic/Pneumatic Tool/Work Clamping SystemHydraulic/Pneumatic Tool/Work Clamping System

2. Fundamental Principles2. Fundamental Principles
Coordinate SystemCoordinate System
Longitudinal MotionLongitudinal Motion
Transverse MotionTransverse Motion
Dimensioning SystemDimensioning System
Absolute Absolute
IncrementalIncremental
MixedMixed
Reference SystemReference System
Machine ReferenceMachine Reference
Work ReferenceWork Reference

Instruction or programInstruction or program
IntroductionIntroduction
N 10N 10G 00G 00X 50.0X 50.0Z 25.0 ;Z 25.0 ;Block
Block No.
Words End of Block
G 00
Address
Data

Layout of a CNC ProgramLayout of a CNC Program
[BILLET X 25.0 Z 60.0; [Size of raw Material[BILLET X 25.0 Z 60.0; [Size of raw Material
G99 G21 S500 M13;G99 G21 S500 M13;[ Setting Cutting Condition[ Setting Cutting Condition
G28 U0 W0;G28 U0 W0; [ Ref. Point Return[ Ref. Point Return
M06 T0101;M06 T0101; [ Tool Call[ Tool Call
G00 X 25.0 Z 2.0; G00 X 25.0 Z 2.0; [Positioning[Positioning
………… [ Path Definition[ Path Definition
………… or Cycle Utilityor Cycle Utility
or Subroutine Utilityor Subroutine Utility
G28 U 0 W0;G28 U 0 W0; [ Return to Ref. Point[ Return to Ref. Point
M30; M30; [ End of Program [ End of Program
Header
Body
End

Linear Path FunctionLinear Path Function
G00G00  Rapid Linear MovementRapid Linear Movement
G01G01 Linear Movement with Linear Movement with
Programmed Feed RateProgrammed Feed Rate
Writing FormatWriting Format
G00G00X 50.0 Z2.0;X 50.0 Z2.0;
G01 X 50.0 Z2.0 F0.1;G01 X 50.0 Z2.0 F0.1;

Example ProgramExample Program
[BILLET X55.0 Z40.0;[BILLET X55.0 Z40.0;
G99 G21 G40;G99 G21 G40;
S1000 M13;S1000 M13;
M06 T0101;M06 T0101;
G00 X55.0 Z2.0;G00 X55.0 Z2.0;
G01 X55.0 Z0.0 F0.2;G01 X55.0 Z0.0 F0.2;
G01 X -1.0 Z0.0 F0.1;G01 X -1.0 Z0.0 F0.1;
G00 X 55.0 Z2.0;G00 X 55.0 Z2.0;
G00 X20.0;G00 X20.0;
G01 X20.0 Z-10.0 F0.1;G01 X20.0 Z-10.0 F0.1;
G01 X40.0 Z-10.0;G01 X40.0 Z-10.0;
G01 X40.0 Z-25.0;G01 X40.0 Z-25.0;
G01 X50.0 Z-25.0;G01 X50.0 Z-25.0;
G01 X50.0 Z-35.0;G01 X50.0 Z-35.0;
G01 X55.0 Z-35.0;G01 X55.0 Z-35.0;
G00 X55.0 Z2.0;G00 X55.0 Z2.0;
G28 U0 W0;G28 U0 W0;
M30;M30;
0,0

Circular Path FunctionCircular Path Function
G02G02  Circular Movement Clockwise (CW)Circular Movement Clockwise (CW)
G03G03 Circular Movement Counter Clock Circular Movement Counter Clock
Wise (CCW) Wise (CCW)
G03 X 25.0 Z-10.0 R5.0 F0.1; G03 X 25.0 Z-10.0 R5.0 F0.1;
Writing FormatWriting Format
G02 X 25.0 Z-10.0 R5.0 F0.1; G02 X 25.0 Z-10.0 R5.0 F0.1;

Example ProgramExample Program
[BILLET X55.0 Z40.0;[BILLET X55.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
M06 T0101;M06 T0101;
G00 X38.0 Z2.0;G00 X38.0 Z2.0;
G01 X38.0 Z0.0 F0.2;G01 X38.0 Z0.0 F0.2;
G01 X -1.0 Z0.0 F0.1;G01 X -1.0 Z0.0 F0.1;
G00 X 38.0 Z2.0;G00 X 38.0 Z2.0;
G00 X10.0;G00 X10.0;
G01 X10.0 Z-10.0 F0.1;G01 X10.0 Z-10.0 F0.1;
G02 X18.0 Z-14.0 R4.0;G02 X18.0 Z-14.0 R4.0;
G01 X18.0 Z-19.0;G01 X18.0 Z-19.0;
G03 X24.0 Z-22.0 R3.0;G03 X24.0 Z-22.0 R3.0;
G01 X24.0 Z-30.0;G01 X24.0 Z-30.0;
G01 X38.0 Z-30.0;G01 X38.0 Z-30.0;
G00 X38.0 Z2.0;G00 X38.0 Z2.0;
G28 U0 W0;G28 U0 W0;
M30;M30;

Example ProgramExample Program
G00 X55.0 Z2.0;G00 X55.0 Z2.0;
G01 X55.0 Z0.0 F0.2;G01 X55.0 Z0.0 F0.2;
G01 X -1.0 Z0.0 F0.1;G01 X -1.0 Z0.0 F0.1;
G00 X 55.0 Z2.0;G00 X 55.0 Z2.0;
G00 X20.0;G00 X20.0;
G01 X20.0 Z-10.0 F0.1;G01 X20.0 Z-10.0 F0.1;
G01 X40.0 Z-10.0;G01 X40.0 Z-10.0;
G01 X40.0 Z-25.0;G01 X40.0 Z-25.0;
G01 X50.0 Z-25.0;G01 X50.0 Z-25.0;
G01 X50.0 Z-35.0;G01 X50.0 Z-35.0;
G01 X55.0;G01 X55.0;
G00 X55.0 Z2.0;G00 X55.0 Z2.0;
(56.0, 2.0)(56.0, 2.0)
(0, 0)(0, 0)
(56.0, 0.0)(56.0, 0.0)
(20.0, 2.0)(20.0, 2.0)
(20.0, -10)(20.0, -10)
(40.0, -10)(40.0, -10)
(40.0, -25.0)(40.0, -25.0)
(50.0, -25.0)(50.0, -25.0)
(50.0, -35.0)(50.0, -35.0)
(56.0, -35.0)(56.0, -35.0)

Various Important AddressesVarious Important Addresses
O: Used to represent program numberO: Used to represent program number
N: Used to represent Block NumberN: Used to represent Block Number
G: Are known as preparatory codes, used to prepare the machine G: Are known as preparatory codes, used to prepare the machine
for a particular function.for a particular function.
X, Y, Z : Represents Absolute coordinates X, Y, Z : Represents Absolute coordinates
U, V, W: Represents Incremental coordinatesU, V, W: Represents Incremental coordinates
I, J, K: Specifies coordinate of centre of arcI, J, K: Specifies coordinate of centre of arc
R: Represents radius of arcR: Represents radius of arc
S: Represents Spindle SpeedS: Represents Spindle Speed
T: Specifies Tool NumberT: Specifies Tool Number
M: Miscellaneous FunctionsM: Miscellaneous Functions
P, Q: Used to represent start & end block number in a subroutine P, Q: Used to represent start & end block number in a subroutine
cycle.cycle.
F: Represents FeedF: Represents Feed

G71 (Turning Cycle)G71 (Turning Cycle)
Writing Format
G71 U1.0 R1.0;
G71 P10 Q20 U0.5 W 0.5 F0.25;
N10 G00 X…..;
…….
…….
…….
N20 ……..;
G70 P10 Q20 F0.15;
1
st
Line of G71:
U – Specifies the depth of cut in each pass
R – Retract amount after every pass
2
nd
Line of G71:
P – Specifies the start block number
Q – Specifies the end block number
U – Specifies the finishing allowance in X
W – Specifies the finishing allowance in Z
G70 – Finishing Pass

Example ProgramExample Program
……
N10 G00 X38.0 Z2.0;
N20 G71 U1.5 R0.5;
N30 G71 P40 Q130 U0.5 W0.2 F0.35;
N40 G01 X16.0;
N50 G01 Z0.5;
N60 G01 X20.0 Z 1.5;
N70 G01 Z-30.0;
N80 G01 X 23.0;
N90 G03 X25.0 Z-24.0 R1.0;
N100 G01 X30.0 Z-65.0;
N110 G01 Z-75.0;
N120 G02 X36.0 Z-77.0 R3.0;
N130 G01 X38.5;
N140 G70 P40 Q 130;
….

Example ProgramExample Program
[BILLET X38.0 Z40.0;[BILLET X38.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
M06 T0101;M06 T0101;
G00 X39.0 Z2.0;G00 X39.0 Z2.0;
G01 X38.0 Z0.0 F0.2;G01 X38.0 Z0.0 F0.2;
G01 X -1.0 Z0.0 F0.1;G01 X -1.0 Z0.0 F0.1;
G00 X 38.0 Z2.0;G00 X 38.0 Z2.0;
G71 U1.0 R0.5;G71 U1.0 R0.5;
G71 P10 Q20 U0.5 W0.1 F0.35;G71 P10 Q20 U0.5 W0.1 F0.35;
N10N10 G00 X10.0; G00 X10.0;
G01 X10.0 Z-10.0 F0.1;G01 X10.0 Z-10.0 F0.1;
G02 X18.0 Z-14.0 R4.0;G02 X18.0 Z-14.0 R4.0;
G01 X18.0 Z-19.0;G01 X18.0 Z-19.0;
G03 X24.0 Z-22.0 R3.0;G03 X24.0 Z-22.0 R3.0;
G01 X24.0 Z-30.0;G01 X24.0 Z-30.0;
N20N20 G01 X39.0 Z-30.0; G01 X39.0 Z-30.0;
G70 P10 Q20;G70 P10 Q20;
G00 X39.0 Z2.0;G00 X39.0 Z2.0;
G28 U0 W0;G28 U0 W0;
M30;M30;

Types of InstructionsTypes of Instructions
1.Movement Instruction
•G00, G01, G02, G03
2.Machine Instruction
•M00, M02, M03, M04, M05, M06, M08, M09, M30
3.Tool Instruction
•T0101
4.Technological Instruction
•Cutting Speed
•Spindle Speed
•Feed
5.Dimensional Instruction
•Metric
•Inch

G- CodesG- Codes
G28: Return to Machine Reference PointG28: Return to Machine Reference Point
Writing Format: G28 U0 W0;Writing Format: G28 U0 W0;
G20: Programming in InchesG20: Programming in Inches
G21: Programming in Metric (mm)G21: Programming in Metric (mm)

M-CodesM-Codes
M00: Program Stop, starts again when cycle start is pressedM00: Program Stop, starts again when cycle start is pressed
M01: Optional StopM01: Optional Stop
M02: Program ResetM02: Program Reset
M30: Program Reset & RewindM30: Program Reset & Rewind
M03: Spindle Start in Clockwise DirectionM03: Spindle Start in Clockwise Direction
M04: Spindle Start in Anti Clockwise DirectionM04: Spindle Start in Anti Clockwise Direction
M05: Spindle StopM05: Spindle Stop
M06: Command Tool ChangeM06: Command Tool Change
M07/M08: Coolant ONM07/M08: Coolant ON
M09: Coolant OFFM09: Coolant OFF
M10: Chuck OpenM10: Chuck Open
M11: Chuck CloseM11: Chuck Close
M13: Spindle ON (CW) & Coolant onM13: Spindle ON (CW) & Coolant on
M14: Spindle ON (CCW) & Coolant onM14: Spindle ON (CCW) & Coolant on
M25: Tailstock Quill ExtendM25: Tailstock Quill Extend
M26: Tailstock Quill RetractM26: Tailstock Quill Retract
M98: Subprogram CallM98: Subprogram Call
M99: Return to Main ProgramM99: Return to Main Program

G72 (Facing Cycle)G72 (Facing Cycle)
Writing Format
G72 W1.0 R1.0;
G72 P10 Q20 U0.5 W 0.5 F0.25;
N10 G00 X…..;
…….
…….
N20 ……..;
G70 P10 Q20 F0.15;
1
st
Line of G72:
W – Specifies the depth of cut in each pass
(in Z Direction)
R – Retract amount after every pass
2
nd
Line of G71:
P – Specifies the start block number
Q – Specifies the end block number
U – Specifies the finishing allowance in X
W – Specifies the finishing allowance in Z
G70 – Finishing Pass

Example ProgramExample Program
[BILLET X28.0 Z40.0;[BILLET X28.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
M06 T0101;M06 T0101;
G00 X29.0 Z2.0;G00 X29.0 Z2.0;
G72 W0.5 R0.5;G72 W0.5 R0.5;
G72 P40 Q50 U0.5 W0.1 F0.35;G72 P40 Q50 U0.5 W0.1 F0.35;
N40N40 G00 Z-33.0; G00 Z-33.0;
G01 X25.0 Z-33.0;G01 X25.0 Z-33.0;
G01 X25.0 Z-23.0;G01 X25.0 Z-23.0;
G01 X22.0 Z-23.0;G01 X22.0 Z-23.0;
G01 X16.0 Z-8.0;G01 X16.0 Z-8.0;
G01 X14.0 Z-8.0;G01 X14.0 Z-8.0;
G03 X8.0 Z-5.0 R3.0;G03 X8.0 Z-5.0 R3.0;
G01 X8.0 Z-2.0;G01 X8.0 Z-2.0;
G01 X4.0 Z0.0;G01 X4.0 Z0.0;
N50N50 G01 X0.0 Z0.0; G01 X0.0 Z0.0;
G70 P40 Q50 F0.15;G70 P40 Q50 F0.15;
G00 X29.0 Z2.0;G00 X29.0 Z2.0;
G28 U0 W0;G28 U0 W0;
M30;M30;

Tool OffsetTool Offset
The Distance traveled by the tool cutting edge from the machine The Distance traveled by the tool cutting edge from the machine
reference point to the work reference point in a particular axis is reference point to the work reference point in a particular axis is
termed as “Tool Offset”. For turning tool offset is measured in termed as “Tool Offset”. For turning tool offset is measured in
both the directions i.e. ‘X’ & ‘Z’.both the directions i.e. ‘X’ & ‘Z’.

Modal & Non Modal G-CodesModal & Non Modal G-Codes
The G-Codes whose effect continue in the The G-Codes whose effect continue in the
program once specified until it is cancelled or program once specified until it is cancelled or
overridden by another code are known as overridden by another code are known as
“MODAL”. Eg: G00, G01, G02, G03 etc.“MODAL”. Eg: G00, G01, G02, G03 etc.
The G-Codes whose effect only in the block where The G-Codes whose effect only in the block where
it is defined are known as Non-Modal Codes. Eg: it is defined are known as Non-Modal Codes. Eg:
G04G04

Groups of G-Codes
Group ‘0’: G04, G10, G27, G28, G29, G30, G31
G50, G65, G72, G73, G74, G75, G76
Group ‘1’: G00, G01, G02, G03, G90, G92, G94
Group ‘2’: G66, G67, G96, G97
Group ‘4’: G70, G71
Group ‘6’: G20, G21
Group ‘7’: G40, G41, G42
Group ’11’: G98, G99
The G-Codes are grouped under various groups. The G-Codes are grouped under various groups.
Each group contains similar kind of codes and their Each group contains similar kind of codes and their
effect can only be overcome/nullified by the use of effect can only be overcome/nullified by the use of
another code of same group.another code of same group.

Centre Drilling Cycle (G81)Centre Drilling Cycle (G81)
[BILLET X28.0 Z40.0;[BILLET X28.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
G28 U0 W0;G28 U0 W0;
M06 T0202;M06 T0202;
G00 X0.0 Z2.0;G00 X0.0 Z2.0;
G81 Z-5 F0.1;G81 Z-5 F0.1;
G28 U0 W0;G28 U0 W0;
M30;M30;

Peck Drilling Cycle (G74)Peck Drilling Cycle (G74)
[BILLET X28.0 Z40.0;[BILLET X28.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
G28 U0 W0;G28 U0 W0;
M06 T0303;M06 T0303;
G00 X0.0 Z2.0;G00 X0.0 Z2.0;
G74 R10.0;G74 R10.0;
G74 Z-68.0 Q20000 F0.05;G74 Z-68.0 Q20000 F0.05;
G28 U0 W0;G28 U0 W0;
M30;M30;
R = Retraction amount after every depth
Z = Depth of Cut
Q = Peck Increment (in micron)
F = Feed Rate

Different Modes of MachiningDifferent Modes of Machining
Reference Mode or Home ModeReference Mode or Home Mode
Tasks: Returns the turret to the machine reference/home pointTasks: Returns the turret to the machine reference/home point
Manual or Jog Mode Manual or Jog Mode
Continuous JogContinuous Jog
Incremental JogIncremental Jog
Hand wheel JogHand wheel Jog
Tasks: Move the Axes, Start & stop spindle rotation at a Tasks: Move the Axes, Start & stop spindle rotation at a
predefined speed, Coolant On & Off, Turret indexing in predefined speed, Coolant On & Off, Turret indexing in
machine defined default direction one station on push of machine defined default direction one station on push of
button. button.

Different Modes of MachiningDifferent Modes of Machining
Manual Data Input (MDI) Mode Manual Data Input (MDI) Mode
Tasks: Single or few line simple program can be Tasks: Single or few line simple program can be
written temporarily and executed only once. After written temporarily and executed only once. After
executing the written lines of program are deleted from executing the written lines of program are deleted from
the machine memory.the machine memory.
Auto ModeAuto Mode
Continuous AutoContinuous Auto
Runs the complete program from beginning to the end Runs the complete program from beginning to the end
once the cycle start button is pressed.once the cycle start button is pressed.
Single AutoSingle Auto
Runs the program block by block i.e. only one block of Runs the program block by block i.e. only one block of
the program is executed by pressing the cycle start the program is executed by pressing the cycle start
button once.button once.

Feed (Method Selection)Feed (Method Selection)
1.1.mm/minutemm/minute
2.2.mm/revolution mm/revolution
During Lathe working the feed of the tool can be defined by two During Lathe working the feed of the tool can be defined by two
different Methods.different Methods.
While programming on CNC Machine the feed methods can be While programming on CNC Machine the feed methods can be
selected by: selected by:
1.1.mm/minutemm/minute ::G98G98
2.2.mm/revolution mm/revolution ::G99G99

Step Boring Cycle (G90)Step Boring Cycle (G90)
[BILLET X28.0 Z40.0;[BILLET X28.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
G28 U0 W0;G28 U0 W0;
M06 T0404;M06 T0404;
G00 X12.0 Z2.0;G00 X12.0 Z2.0;
G90 X14.0 Z-30.0 F0.1;G90 X14.0 Z-30.0 F0.1;
X16.0;X16.0;
X18.0;X18.0;
X19.0;X19.0;
X21.0 Z-20;X21.0 Z-20;
X23;X23;
X24.0;X24.0;
G28 U0 W0;G28 U0 W0;
M30;M30;

Grooving Cycle (G81)Grooving Cycle (G81)
[BILLET X28.0 Z40.0;[BILLET X28.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
G28 U0 W0;G28 U0 W0;
M06 T0505;M06 T0505;
G00 X52.0 Z2.0;G00 X52.0 Z2.0;
G01 Z-15.0 F0.3;G01 Z-15.0 F0.3;
G81 X30.0 F0.02;G81 X30.0 F0.02;
G01 Z-30.0;G01 Z-30.0;
G81 X20.0;G81 X20.0;
G28 U0 W0;G28 U0 W0;
M30;M30;

Profile Boring Cycle (G71)Profile Boring Cycle (G71)
[BILLET X40.0 Z40.0;[BILLET X40.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
G28 U0 W0;G28 U0 W0;
M06 T0404;M06 T0404;
G00 X15.0 Z2.0;G00 X15.0 Z2.0;
G71 U0.5 R0.5;G71 U0.5 R0.5;
G71 P25 Q45 U-0.5 W0.1 F0.2G71 P25 Q45 U-0.5 W0.1 F0.2
N25 G01 X35.0;N25 G01 X35.0;
G01 X35.0 Z-10.0;G01 X35.0 Z-10.0;
G01 X30.0 Z-10.0;G01 X30.0 Z-10.0;
G02 X18.0 Z-16.0 R6.0;G02 X18.0 Z-16.0 R6.0;
G01 Z-30.0;G01 Z-30.0;
N45 G01 X15.0;N45 G01 X15.0;
G28 U0 W0;G28 U0 W0;
M30;M30;

Pattern Repeating Cycle (G73)Pattern Repeating Cycle (G73)
[BILLET X55.0 Z50.0;[BILLET X55.0 Z50.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
G28 U0 W0;G28 U0 W0;
M06 T0101;M06 T0101;
G00 X56.0 Z4.0;G00 X56.0 Z4.0;
G73 U4 W3 R10;G73 U4 W3 R10;
G73 P10 Q20 U0.5 W0.5 F0.1G73 P10 Q20 U0.5 W0.5 F0.1
N10N10 G00 X15.0; G00 X15.0;
G01 X15.0 Z0.0;G01 X15.0 Z0.0;
G01 X15.0 Z-20.0;G01 X15.0 Z-20.0;
G01 X25.0 Z-20.0;G01 X25.0 Z-20.0;
G03 X35.0 Z-25.0 R5;G03 X35.0 Z-25.0 R5;
G01 X40.0 Z-25.0;G01 X40.0 Z-25.0;
G01 X40.0 Z-40.0;G01 X40.0 Z-40.0;
N20 N20 X50.0 Z-40.0;X50.0 Z-40.0;
G70 P10 Q20;G70 P10 Q20;
G28 U0 W0;G28 U0 W0;
M30;M30;
G73 1
ST
Line:
U : Specifies Roughing Material on X-Axis (in Radius)
W: Specifies Roughing Material in Z-Axis
R: Number of Passes.
G73 2nd Line:
U : Specifies Finishing Allowance on X-Axis
W: Specifies Finishing Allowance on Z-Axis
P & Q: Start & End Block Number Respectively

Use of G96, G97 & G50Use of G96, G97 & G50
While Programming for CNC Turning While Programming for CNC Turning
(Fanuc)(Fanuc)

Meaning of G96, G97 & G50Meaning of G96, G97 & G50
Significance Significance
Writing FormatWriting Format
When to useWhen to use

MeaningMeaning
G96: Specifies constant cutting speed (m/min)G96: Specifies constant cutting speed (m/min)
G97: Specifies constant spindle RPMG97: Specifies constant spindle RPM
G50: Limits the maximum Spindle Speed G50: Limits the maximum Spindle Speed

Cutting Speed & RPMCutting Speed & RPM
Cutting Speed: It is defined as the speed with which the Cutting Speed: It is defined as the speed with which the
periphery of workpiece passes over the cutting edge of periphery of workpiece passes over the cutting edge of
the tool. Its unit is m/min. It depends on following the tool. Its unit is m/min. It depends on following
quantities:quantities:
Material of Workpiece Material of Workpiece
Material of cutting toolMaterial of cutting tool
RPM: It is the speed with which the spindle is rotating. RPM: It is the speed with which the spindle is rotating.
Its unit is revolutions per minute. Its unit is revolutions per minute.
The Cutting Speed & RPM are related by the following The Cutting Speed & RPM are related by the following
formula:formula:
V = V = ππDN/1000, DN/1000,
where V is Cutting Speed, D is Diameter of Job, N where V is Cutting Speed, D is Diameter of Job, N
is RPM.is RPM.

SignificanceSignificance
G96 enables the machine to vary the spindle RPM with G96 enables the machine to vary the spindle RPM with
varying diameter which results in:varying diameter which results in:
Good Surface FinishGood Surface Finish
Reduced cycle timeReduced cycle time
Improved tool lifeImproved tool life
G50: Must be used with G96 to limit the maximum G50: Must be used with G96 to limit the maximum
spindle speed to prevent the extreme cases.spindle speed to prevent the extreme cases.
G97 enables the machine to work with constant RPM:G97 enables the machine to work with constant RPM:
In some cases it is desired to have constant RPMIn some cases it is desired to have constant RPM

Writing FormatWriting Format
Constant Cutting SpeedConstant Cutting Speed
G50 G50 S4000S4000; (here ; (here SS represent Limit for maximum spindle represent Limit for maximum spindle
speed)speed)
G96 G96 S100S100 M03; (here M03; (here SS represents the Cutting Speed defined represents the Cutting Speed defined
in m/min)in m/min)
Constant Spindle SpeedConstant Spindle Speed
G97 G97 S2500S2500 M03; (here M03; (here SS represents constant Spindle Speed) represents constant Spindle Speed)

When to useWhen to use
G96G96
Turning & FacingTurning & Facing
BoringBoring
GroovingGrooving
PartingParting
G97G97
ThreadingThreading
DrillingDrilling

Facing Cycle (G94)Facing Cycle (G94)
[BILLET X40.0 Z15.0;[BILLET X40.0 Z15.0;
G99 G21 G40;G99 G21 G40;
G28 U0 W0;G28 U0 W0;
G50 S2500;G50 S2500;
G96 S200 M03;G96 S200 M03;
M06 T0101;M06 T0101;
G00 X41.0 Z1.0;G00 X41.0 Z1.0;
G94 X-1.0 Z0.0 F0.1;G94 X-1.0 Z0.0 F0.1;
X15.0 Z-1.0;X15.0 Z-1.0;
Z-2.0;Z-2.0;
Z-3.0;Z-3.0;
X25.0 Z-4.0;X25.0 Z-4.0;
Z-5.0;Z-5.0;
Z-6;Z-6;
G28 U0 W0;G28 U0 W0;
G97;G97;
M30;M30;

Grooving Cycle (G75)Grooving Cycle (G75)
[BILLET X25.0 Z60.0;[BILLET X25.0 Z60.0;
G99 G21 G40 S500 M13;G99 G21 G40 S500 M13;
G28 U0 W0;G28 U0 W0;
G50 S2500;G50 S2500;
M06 T0505;M06 T0505;
G00 X27.0 Z1.0;G00 X27.0 Z1.0;
G01 Z-10.0 F0.2;G01 Z-10.0 F0.2;
G75 G75 R1.0R1.0;;
G75 X20.0 G75 X20.0 Z-40.0Z-40.0 P2000P2000 Q15000Q15000 F0.02; F0.02;
G28 U0 W0;G28 U0 W0;
M30;M30;
P: Depth of Cut in X-AxisP: Depth of Cut in X-Axis
Q: Distance Between two consecutive groove in Z-axisQ: Distance Between two consecutive groove in Z-axis
R: Retraction after each depth of cutR: Retraction after each depth of cut
Z: Total distance in Z-axis for groovingZ: Total distance in Z-axis for grooving

ThreadingThreading
Crest
Root

ThreadingThreading
Calculation for Thread Height:
h = 0.61343 x pitch
Core Diameter, d= D – 2x h

Requirements for ThreadingRequirements for Threading
Select Proper Cutting Tool: Angle & Shape of Select Proper Cutting Tool: Angle & Shape of
cutting tool should be same as that of the cross-cutting tool should be same as that of the cross-
section of thread.section of thread.
Make Chamfer prior to threading: At the start of Make Chamfer prior to threading: At the start of
thread. thread.
Make Groove prior to threading: At the end of Make Groove prior to threading: At the end of
thread.thread.

Threading Cycle (G92)Threading Cycle (G92)
[BILLET X25.0 Z45.0;[BILLET X25.0 Z45.0;
G99 G21 G40;G99 G21 G40;
S500 M13;S500 M13;
G28 U0 W0;G28 U0 W0;
M06 T0606;M06 T0606;
G00 X16.0 Z2.0;G00 X16.0 Z2.0;
G92 X15.4 Z-32.0 F2.0;G92 X15.4 Z-32.0 F2.0;
X15.1;X15.1;
X14.8;X14.8;
X14.5;X14.5;
X14.2;X14.2;
X13.9;X13.9;
X13.6;X13.6;
X13.546;X13.546;
G28 U0 W0;G28 U0 W0;
M30;M30;

Threading Cycle (G76)Threading Cycle (G76)
[BILLET X50.0 Z60.0;[BILLET X50.0 Z60.0;
G99 G21 G40;G99 G21 G40;
S500 M13;S500 M13;
G28 U0 W0;G28 U0 W0;
M06 T0101;M06 T0101;
G00 X51.0 Z2.0;G00 X51.0 Z2.0;
G71 U1.5 R0.5;G71 U1.5 R0.5;
G71 P10 Q20 U0.5 W0.5 F0.15;G71 P10 Q20 U0.5 W0.5 F0.15;
N10 G01 X20.0 ;N10 G01 X20.0 ;
G01 X24.0 Z-2.0;G01 X24.0 Z-2.0;
N20 X24.0 Z-42.0;N20 X24.0 Z-42.0;
G70 P10 Q20;G70 P10 Q20;
G28 U0 W0;G28 U0 W0;
M06 T0606;M06 T0606;
G00 X24.5 Z2.0;G00 X24.5 Z2.0;
G76 P031560 Q50 R0.15;G76 P031560 Q50 R0.15;
G76 X20.319 Z-38.0 P1840 Q150 F3.0;G76 X20.319 Z-38.0 P1840 Q150 F3.0;
G28 U0 W0;G28 U0 W0;
M30;M30;
1
ST
Line of G76:
Pxxyyzz:
xx: No. finishing Passes
yy: Chamfering amount at the end of thread
zz: Angle of tool tip (in deg)
Q….: Minimum depth of cut in each pass (in micron)
R….: Finishing allowance (in mm)
2
nd
Line of G76:
X…..: Core diameter of thread (mm)
Z….: Length of thread (mm)
P….: Height of thread (in micron)
Q…..: Depth of cut in first pass (in micron)
F….. : Pitch of thread (in mm)

Sub Program (M98 & M99)Sub Program (M98 & M99)
It is a program that is written once and can be It is a program that is written once and can be
called as many times as it is desired in any other called as many times as it is desired in any other
main/sub program.main/sub program.
Auxiliary functions used:Auxiliary functions used:
M98: Jump to sub programM98: Jump to sub program
M99: Return to main program/End of subprogramM99: Return to main program/End of subprogram
PP24002400 – Name of Sub program – Name of Sub program

Sub Program (M98 & M99)Sub Program (M98 & M99)
Operating Limits or rules:Operating Limits or rules:
The name of a sub program can be maximum of 4 The name of a sub program can be maximum of 4
digit number (only numeric names can be sensed)digit number (only numeric names can be sensed)
Sub program should not be written within the main Sub program should not be written within the main
programprogram
Sub program should not carry headers like [BILLETSub program should not carry headers like [BILLET
The name & number of subprogram need to same.The name & number of subprogram need to same.
The subprogram should not contain “M30” at the The subprogram should not contain “M30” at the
end.end.
One subprogram can be called in other subprogram.One subprogram can be called in other subprogram.

Sub Program ExampleSub Program Example
[BILLET X40.0 Z100.0;[BILLET X40.0 Z100.0;
G99 G21 G40;G99 G21 G40;
M03 S2000;M03 S2000;
G28 U0 W0;G28 U0 W0;
M06 T0101; TURNING TOOL]M06 T0101; TURNING TOOL]
G00 X42.0 Z0.0;G00 X42.0 Z0.0;
G01 X-1.0 F0.1;G01 X-1.0 F0.1;
G00 X40.0 Z2.0;G00 X40.0 Z2.0;
G01 Z-70.0 F0.1;G01 Z-70.0 F0.1;
G28 U0 W0;G28 U0 W0;
M06 T0404; [GROOVING TOOL]M06 T0404; [GROOVING TOOL]
G00 X42.0 Z-10.0;G00 X42.0 Z-10.0;
M98 P100;M98 P100;
G00 Z-25.0;G00 Z-25.0;
M98 P100;M98 P100;
G00 Z-40.0;G00 Z-40.0;
M98 P100;M98 P100;
G00 Z-55.0;G00 Z-55.0;
M98 P100;M98 P100;
G28 U0 W0;G28 U0 W0;
M30;M30;
O100;O100;
G81 U-8.0 F0.1;G81 U-8.0 F0.1;
G01 W-4;G01 W-4;
G81 U-8.0;G81 U-8.0;
M99;M99;
Sub Program

Tool Nose Radius Tool Nose Radius
Compensation (TNRC)Compensation (TNRC)
G41/G42/G40G41/G42/G40

ImportanceImportance
Programmed Path
Actual Path Generated
(Material Left on Tool Path)

Specifying TNRCSpecifying TNRC
Decide the Direction of TNRCDecide the Direction of TNRC
G41 (Left)/G42 (Right)G41 (Left)/G42 (Right) : Program: Program
Decide the Amount of TNRCDecide the Amount of TNRC
Value of Tool Nose RadiusValue of Tool Nose Radius : Tool Offset Page: Tool Offset Page
Decide the Imaginary Tool Nose Position (Tool Type)Decide the Imaginary Tool Nose Position (Tool Type)
: : Tool Offset PageTool Offset Page
Cancel the TNRC (G40)Cancel the TNRC (G40) : Program: Program

Direction of TNRCDirection of TNRC
G42 (RIGHT)
G41 (LEFT)

Amount of TNRCAmount of TNRC
Radius of Tool Nose

Imaginary Tool Nose PositionImaginary Tool Nose Position
4
5
6
2
7
3 8
1

Tool Types based on Imaginary TNR PositionTool Types based on Imaginary TNR Position

Tool Types based on Imaginary TNR PositionTool Types based on Imaginary TNR Position

How to specify in a programHow to specify in a program
WITHOUT TNRC
[BILLET X38.0 Z40.0;[BILLET X38.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
G00 X 38.0 Z2.0;G00 X 38.0 Z2.0;
G71 U1.0 R0.5;G71 U1.0 R0.5;
G71 P10 Q20 U0.5 W0.1 F0.35;G71 P10 Q20 U0.5 W0.1 F0.35;
N10N10 G00 X10.0; G00 X10.0;
G01 X10.0 Z-10.0 F0.1;G01 X10.0 Z-10.0 F0.1;
G02 X18.0 Z-14.0 R4.0;G02 X18.0 Z-14.0 R4.0;
G01 X18.0 Z-19.0;G01 X18.0 Z-19.0;
G03 X24.0 Z-22.0 R3.0;G03 X24.0 Z-22.0 R3.0;
G01 X24.0 Z-30.0;G01 X24.0 Z-30.0;
N20N20 G01 X39.0 Z-30.0; G01 X39.0 Z-30.0;
G70 P10 Q20;G70 P10 Q20;
G00 X39.0 Z2.0;G00 X39.0 Z2.0;
G28 U0 W0;G28 U0 W0;
M30;M30;
WITH TNRC
[BILLET X38.0 Z40.0;[BILLET X38.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
G00 X 38.0 Z2.0;G00 X 38.0 Z2.0;
G71 U1.0 R0.5;G71 U1.0 R0.5;
G71 P10 Q20 U0.5 W0.1 F0.35;G71 P10 Q20 U0.5 W0.1 F0.35;
N10N10 G00 G00 G42G42 X10.0; X10.0;
G01 X10.0 Z-10.0 F0.1;G01 X10.0 Z-10.0 F0.1;
G02 X18.0 Z-14.0 R4.0;G02 X18.0 Z-14.0 R4.0;
G01 X18.0 Z-19.0;G01 X18.0 Z-19.0;
G03 X24.0 Z-22.0 R3.0;G03 X24.0 Z-22.0 R3.0;
G01 X24.0 Z-30.0;G01 X24.0 Z-30.0;
N20N20 G01 G01 G40 G40 X39.0 Z-30.0;X39.0 Z-30.0;
G70 P10 Q20;G70 P10 Q20;
G00 X39.0 Z2.0;G00 X39.0 Z2.0;
G28 U0 W0;G28 U0 W0;
M30;M30;

How to specify in machineHow to specify in machine
Go to Tool Offset PageGo to Tool Offset Page
Choose the Offset Number for the given toolChoose the Offset Number for the given tool
SlSl X-offsetX-offsetZ-offsetZ-offsetRR TT
11 ………………....……………….... 0.80.8 33
In R-Column specify the tool nose radiusIn R-Column specify the tool nose radius
In T-Column specify the Tool Type which ever is applicable from 1to In T-Column specify the Tool Type which ever is applicable from 1to
8 No.8 No.

G90 (Turning Cycle)G90 (Turning Cycle)
[BILLET X45.0 Z40.0;[BILLET X45.0 Z40.0;
G99 G21 G40 S1000 M13;G99 G21 G40 S1000 M13;
G00 X 46.0 Z2.0;G00 X 46.0 Z2.0;
G01 X35.0 Z0.0 F0.1;G01 X35.0 Z0.0 F0.1;
G90 X45.0 Z-30.0 R-1.0 F0.1;G90 X45.0 Z-30.0 R-1.0 F0.1;
G90 R-2.0;G90 R-2.0;
G90 R-3.0;G90 R-3.0;
G90 R-4.0;G90 R-4.0;
G90 R-5.0;G90 R-5.0;
G28 U0 W0;G28 U0 W0;
M30;M30;

Important G- CodesImportant G- Codes
G00G00 Rapid Linear MovementRapid Linear MovementG00 X…. Z….G00 X…. Z…. Used for air Used for air
movements onlymovements only
G01G01 Linear Interpolation with Linear Interpolation with
Program defined feedProgram defined feed
G01 X …. Z …. F….G01 X …. Z …. F….Used for metal Used for metal
cuttingcutting
G02G02 Circular Interpolation Circular Interpolation
Clock Wise (CW) DirectionClock Wise (CW) Direction
G02 X… Z... R… F…G02 X… Z... R… F…Used for metal Used for metal
cuttingcutting
G03G03 Circular Interpolation Circular Interpolation
Counter Clock Wise Counter Clock Wise
(CCW) Direction(CCW) Direction
G03 X… Z... R… F…G03 X… Z... R… F…Used for metal Used for metal
cuttingcutting