INDEX
SI NO CONTENT PAGE NO
1 INTRODUCTION 2
2 CNC PART PROGRAMMING 2
3 TYPES OF CNC CODES 2
i) PRAPARATORY CODES 2
ii) SPINDLE CONTROL 4
iii) TOOL SELECTION 4
iv) FEED RATE SELECTION 4
4 CNC MANUAL PART PROGRAMMMING 5
5 CANNED CYCLE & FORMAT 5
6 PART PROGRAMMING FLOW 7
7 CONTROL PANEL 8
8 CNC TURNING MACHINE PROGRAM 10
9 CANNED CYCLE PROGRAM 15
10 CNC MILLING MACHINE PROGRAM 22
11 SPECIFICATION 23
12 DHARMAPURI CNC APPLICATION 27
13 VERTICAL MILLING CENTRE IMAGE 29
14 HORIZONTAL MILLING CENTRE IMAGE 30
15 CONCLUSION 31
1
Introduction
CNC Part Programming for various given Industrial drawings. Manufacture the components
using CNC Turning and Milling machines. Measuring the manufactured components using Co-
ordinate measuring Machine (CMM) and other quality inspection instruments.
Then Write the CNC program for given critical industrial components and run the
programming control panel pendants and simulators.
Compare the written program with industrial applied program and find out the
importance of writing program with respect to cycle time, machine selection, tool selection.
CNC Part Programming
1.Programming fundamentals
Machining involves an important aspect of relative movement between cutting tool and work
piece. In machine tools this is accomplished by either moving the tool with respect to work piece
or vice versa. A program defining motion of tool/work piece in this coordinate system is known
as a part program.
Types of CNC codes
1.Preparatory codes
The term “preparatory” in NC means that it “prepares” the control system to be ready for
implementing the information that follows in the next block of instructions. A preparatory
function is designed in a program by the word address G Followed by two digits. Preparatory
function is also called G-codes and they specify the control mode of the operation.
2
G-code:
G-code is a type of programming language used in the areas of Computer Numerical
Control (CNC) and 3D printing for instructing machine tool movement
G Code Function
G00 Positioning
G01 Linear interpolation
G02 Circular interpolation CW
G03 Circular interpolation CCW
G28 Return to Reference position
G54 Work piece Coordinate system 1 selection
G55 Work piece Coordinate system 2 selection
G56 Work piece Coordinate system 3 selection
G57 Work piece Coordinate system 4 selection
G58 Work piece Coordinate system 5 selection
G70 Finishing cycle
G90 Absolute programming
G91 Incremental Programming
G96 Constant surface speed control
G97 Constant surface speed control cancel
M-code :
M-code is the machine control language that controls the overall program.
M Code Function
M00 Temporary program stop
M01 Optional stop
M02 Program end
M03 Spindle Rotation CW
M04 Spindle Rotation CCW
M05 Spindle Stop
M06 Automatic Tool change
M08 Coolant pump on
M09 Coolant pump off
M30 Program end and rewind
3
2.Spindle control
The spindle speed is programmed by the Letter ‘S’ followed by four-digit number, such as
S4500.
3.Tool selection
Tool selection is accomplished using ‘T’ function followed by a four-digit number where first
two digits are used to call the particular tool and last two digits are used to represent tool offset in
the program.
4.Feed rate control
Cutting operations may be programmed using two basic feed rate modes:
1.Feed rate per spindle revolution
2.Feed rate per time
Controlling the machine
CNC part programming controls the movement of the machine tool and
auxiliary functions like coolant, spindle, and rotation.
Compiling machining data
CNC part programming compiles and translates all machining data so that the
control system can understand and implement the instructions.
Automating repetitive tasks
CNC services can automate repetitive tasks, which can reduce human error
and increase productivity.
Generating artificial anatomical parts
4
Hospitals can use CNC programming to create artificial anatomical parts like
dental restorations, cranial implants, and joint replacements.
CNC Manual part Programming
1.Facing
2.Turning
3.Peck Drilling
4.Grooving
5.Threading
6.Taper Threading
Canned Cycle & Format
1.Facing cycle format
G72 W R
G72 P Q U W F
W- Depth of cut in z-axis
R- Return value after a cut is complete
P - Start block no
Q - End block no
U- Finishing allowance in x-axis
W- Finishing allowance in z-axis
F- Feed rate
2. Turning cycle format
5
G71 U R
G71 P Q U W F
U- Depth of cut in x-axis
R- Return value after a cut is complete
P - Start block no
Q - End block no
U- Finishing allowance in x-axis
W- Finishing allowance in z-axis
F- Feed rate
3. Finishing cycle format
G70 P Q F
P-Start block no
Q- End block no
F- feed rate
4 . Drilling cycle format
G74 R
G74 Z Q F
R- Return amount / Relief depth
Z- Depth of drill hole
Q- Increment depth / depth of peak
F- Feed rate
5 . Grooving cycle format
6
G75 R
G75 X Z P Q F
R- Reliving the tool
X- Groove minor diameter
Z- Groove total length
P- Shift value for the tool
Q- peak depth
F- Feed rate
6 . Tapping cycle format
G33 Z F
Z - Depth of tapping
F - Cutting Feed rate
7
Part Programming Flow
Work piece drawing
Select machine , chuck, tools holders
Process planning ( rough & finish ) machining condition
Generate tool path and program
Transfer of program
Machining
Control panel
Figure no 1
Panel layout
FANUC control panels come in a variety of sizes and configurations, and can be adapted to
8
fit the space constraints of the machine. The main panel or a separate sub panel can have
the emergency stop button, power switches, and feed rate and spindle override switches.
Safety Machine Operator’s Panel
This panel is similar to the standard Machine Operator’s Panel, but all key switches have
dual contacts.
Control panel keyboard keys
The control panel includes keys for a variety of functions, such as:
• Coolant keys: Turn the coolant on and off manually or automatically.
• Cursor keys: Move through screens and fields in the control, edit and search for
CNC programs.
• MDI key: Changes the operation mode to manual data input mode.
CNC turning machines are accurate and effective because the lathe remains stable while
the material rotates rapidly. Computer programs help ensure that the components are
minutely accurate.
Here are some other things to know about CNC turning machines:
Turret and capstan lathes:
These lathes can perform a wide range of operations without changing tools
Chuck and collect:
The chuck holds the part by its jaws and is replaceable for machining different
9
sized parts. A collect is a smaller version of the chuck that’s used for machining smaller
parts.
5-axis CNC lathe
This type of machine has two turrets, each with two axes, plus a C-axis on the
rotating spindle. This allows for the use of two tools at the same time on the part.
The material itself is secured to, and rotated by, the main spindle, while the cutting tool
can be moved along multiple axis.
CNC Turning machine Program
Figure no 2
Example: 1
1.Turning & Facing
10
O0123;
N1 (Turning & Facing);
G28 U0.0 W0.0;
G97 S4500 M03;
T0101;
G00 X62.0 Z3.0 M07;
G00 Z1.0;
G01 X-1.0 F0.2;
G00 X62.0 Z2.0;
G00 Z0.2;
G01 X-1.0;
G00 X62.0 Z1.0;
G00 X60.5;
G01 Z-80.0;
G00 X62.0 Z1.0;
G00 Z0.0;
G01 X-1.0 F0.15;
G00 X 62.0 Z1.0;
G00 X60.0;
G01 Z-80.0;
G00 X62.0 Z1.0;
11
M09;
M05;
G28 U0.0 W0.0;
M30;
Example:2
O0123;
G28 U0.0 W0.0;
G97 S4500 M03;
T0101;
G00 X66.0 Z3.0 M07;
G00 Z1.0;
G01 X-1.0 F0.2;
G00 X66.0 Z2.0;
G00 Z0.2;
G01 X-1.0 ;
G00 X66.0 Z1.0;
G00 X62.0;
G01 Z-60.0;
G00 X64.0 Z1.0;
G00 X60.5;
G01 Z-60.0;
12
G00 X62.0 Z1.0;
G00 X58.5;
G01 Z-28.8;
G00 X60.0 Z1.0;
G00 X56.5;
G01 Z-27.8;
G00 X58.0 Z1.0;
G00 X54.5;
G01 Z-26.8;
G00 X56.0 Z1.0;
G00 Z0.0;
G01 X-1.0 F0.15;
G00 X52.0 Z1.0;
G01 Z0.0;
G01 X54.0 Z-1.0 ;
G01 Z-27.0;
G02 X60.0 Z-30.0 R3.0;
G01 Z-60.0 ;
G00 X62.0 Z1.0;
M05;
M09;
13
G28 U0.0 W0.0;
M30;
Advantage
Precision
CNC machines can perform tasks with consistent precision and tight tolerances.
Repeatability
CNC machines can perform the same tasks day in and day out without losing reliability.
Increased production speed
CNC machines are automated and can produce parts quickly.
Versatility
CNC machines can work with a variety of raw materials to produce finished parts.
Cost reduction
CNC machines can reduce labor costs and the margin of error in manufacturing.
Enhanced safety
CNC machines are ergonomic and don’t require bending or crouching, which can lead to
fewer accidents and less fatigue.
Disadvantages:
High initial costs:
CNC machines can have high initial costs.
Material limitations:
CNC machines may not be suitable for all manufacturing needs, especially for small
14
production runs.
Skilled labor:
CNC machines require skilled labor for operation and maintenance
Canned Cycle Program
Example : 1
O0123;
N1(Roughing)
G28 U0.0 W0.0;
G97 S4500 M03;
T0101;
G00 X102.0 Z3.0 M07;
G00 Z1.0;
G72 W1.0 R0.2;
G72 P3 Q30 U0.0 W0.2 F0.2;
N3 G00 Z 0.0;
N40 G01 X-1.0;
G00 X102.0 Z1.0;
G00 X100.0;
G71 U0.5 R0.2;
G71 P35 Q100 U0.5 W0.2 F0.2;
N35 G00 X30.0 Z1.0;
15
G01 Z-20.0;
G01 X70.0;
G01 Z-40.0;
G01 X100.0;
G01 Z-60.0;
G00 X102.0 Z1.0;
M09;
M05;
G28 U0.0 W0.0;
M01;
N2(Finishing)
G28 U0.0 W0.0;
G97 S4500 M03;
T0202;
G00 X102.0 Z1.0;
G70 P3 Q30 F0.15;
G00 X102.0 Z1.0;
G70 P35 Q100 F0.15;
G00 X102.0 Z1.0;
M09;
M05;
16
G28 U0.0 W0.0;
M30;
Example: 2
O1234;
N1 (OD Roughing)
G28 U0.0 W0.0;
G97 S4500 M03;
T0101;
G00 X188.0 Z8.0 M07;
G00 Z7.0;
G72 P10 Q40 U0.0 W0.0 F0.2;
N10 G00 Z0.0;
N40 G01 X-1.0;
G00 X188.0 Z1.0;
G00 X186.0;
G71 P45 Q100 U0.5 W0.2 F0.2;
N45 G00 X83.88 Z1.0;
G01 Z0.0;
G01 X90.0 Z-3.0;
G01 Z-70.0;
G01 X180.0 Z-120.0;
17
N100 G01 Z-290.0;
G00 X182.0 Z1.0;
M09;
M05;
G28 U0.0 W0.0;
M01;
N2 (OD Roughing);
G28 U0.0 W0.0;
G97 S4500 M03;
T0202;
G00 X188.0 Z1.0 M07;
G70 P10 Q40 F0.15;
G00 X188.0 Z1.0;
G70 P45 Q100 F0.15;
G00 X188.0 Z1.0;
M09;
M05;
G28 U0.0 W0.0;
M01
N3 (OD Threading)
G28 U0.0 W0.0;
18
G97 S4500 M03;
T0303;
G00 X92.0 Z1.0 M07;
G00 X90.0;
G76 P020060 Q100 R0.01;
G76 X86.103 Z-70.0 P1948 Q200 R0.0 F3.8;
G00 X92.0 Z1.0;
M09;
M05;
G28 U0.0 W0.0;
M01
N4 (OD Grooving);
G28 U0.0 W0.0;
G97 S4500 M03;
T0404;
G00 Z-185.0;
G75 X150.0 Z-250.0 P 5000 Q7000 F0.05;
G00 X182.0 Z1.0;
M09;
M05;
G28 U0.0 W0.0;
19
M01;
N5 (Drilling)
G28 U0.0 W0.0;
G97 S4500 M03;
T0505;
G00 X0.0 Z1.0 M07;
G74 R2.0;
G74 Z-293.8 Q1000 F0.05;
G00 Z5.0
M09;
M05;
G28 U0.0 W0.0;
MO1;
N6 (Tapping);
G28 U0.0 W0.0
G97 S4500 M03;
T0606;
G00 X0.0 Z1.0 M07;
G00 Z-118.0;
G33 Z-290.0 F2.0
SD;
20
S700 M04;
G33 Z-118.0 F2.0
G00 Z5.0
M09;
M05
G28 U0.0 W0.0;
M30;
Advantages
Precision
CNC machines can perform tasks with consistent precision and tight tolerances.
Repeatability
CNC machines can perform the same tasks day in and day out without losing reliability.
Increased production speed
CNC machines are automated and can produce parts quickly.
Versatility
CNC machines can work with a variety of raw materials to produce finished parts.
Cost reduction
CNC machines can reduce labor costs and the margin of error in manufacturing.
Enhanced safety
CNC machines are ergonomic and don’t require bending or crouching, which can lead to
21
fewer accidents and less fatigue.
Disadvantages:
High initial costs:
CNC machines can have high initial costs.
Material limitations:
CNC machines may not be suitable for all manufacturing needs, especially for small
production runs.
Skilled labor:
CNC machines require skilled labor for operation and maintenance
CNC Milling machine
The vertical machining center working principle is based on the drawing of the
parts, and the manual processing program is used to automatically process the parts
processing program
Figure no 3
Specifications
Working area:
22
The size of the working area, for example, 1370 x 1370 x 600 mm.
Spindle speed:
The maximum speed of the spindle, for example, 8000 rpm.
Travel speed:
The maximum travel speed, for example, 10,000 mm/min.
Feed rate:
The feed rate, for example, 5000 mm/min.
Cutting accuracy:
The typical cutting accuracy, for example, 0.1 mm.
Worktable size:
The minimum size of the worktable, for example, 600 x 1200 mm.
Table load:
The minimum table load, for example, 800 kg.
Minimum travel:
The minimum travel for each axis, for example, 800 mm for the X axis.
Spindle taper:
The spindle taper, for example, BT40.
Main motor power:
The main motor power, for example, 7.5/11 kW.
Machine control:
Whether the machine can be stopped, started, paused, or operated in auto or
23
manual mode.
MillingProgram
Example: 1
O0123
N1 (Face Milling);
G00 G91 G28 Z0.0;
G00 G91 G28 X0.0 Y0.0;
M06 T01;
G00 G90 G54 X165.0 Y0.0;
S4500 M03;
G00 G90 G43 H01 Z100.0 M07;
G00 Z2.0;
G01 X165 Y0.0 Z-3.0 F300;
G01 X0.0 Y0.0 Z-3.0 F300;
G01 X0.0 Y190.0 Z-3.0 F300;
G01 X65.0 Y190.0 Z-3.0 F300;
G01 X65 Y-110.0 Z-3.0 F300;
G01 X165.0 Y-110.0 Z-3.0 F300;
G00 Z100.0 M09;
G00 G91 G28 Z0.0 M05;
G00 G91 G28 X0.0 Y0.0;
24
M30;
Example:2
O0123;
N1 (Face Milling);
G00 G91 G28 Z0.0;
G00 G91 G28 X0.0 Y0.0;
M06 T01;
G00 G90 G54 X150.0 Y0.0;
S4500 M03;
G00 G90 G43 H01 Z100.0 M07;
G00 Z2.0;
G01 X150.0 Y0.0 Z-3.0 F300;
G01 X0.0 Y0.0 Z-3.0 F300;
G01 X0.0 Y200.0 Z-3.0 F300;
G01 X50.0 Y200.0 Z-3.0 F300;
G01 X50.0 Y-100.0 Z-3.0 F300;
G01 X150.0 Y-100.0 Z-3.0 F300;
G00 Z100.0 M09;
G00 G91 G28 Z0.0 M05;
G00 G91 G28 X0.0 Y0.0;
M30;
25
Advantages:
Accuracy and precision
CNC machines can create parts with tolerances as small as 0.0004. They maintain the
same speeds and feeds on every cycle, and position feedback ensures the tool moves to
the same point on the work piece each time.
Improved safety
CNC machines are ergonomic, requiring no bending or crouching to operate. This can
lead to fewer workplace accidents and less fatigue.
Quality
CNC machines can produce high-quality parts with excellent repeatability.
Scalability
CNC machines can produce parts quickly once the operator has programmed the
machine with the necessary design specifications.
Increased efficiency
CNC machines can produce hundreds of units per hour without the need for
prototypes.
Disadvantages:
Cost:
CNC machines can be expensive to start with.
Maintenance:
CNC machines require careful attention and repairs.
26
Electricity use:
CNC machines use a lot of electricity.
One-time projects:
CNC machines might not be the best for one-time projects.
Dharmapuri CNC Application:
Learn about Programming and Observe the working of CNC Turning and
Milling Operations.
9S Method
Seiri - Sort
Seiton -Setin Order
Seiso - Shine
Seiketsu - Standardize
Shitsuke - Sustain
Shikari - Dedication
Shitsukaku - Persistent
Seisho - Coordination
Seido - Regularly
Sort:
Remove unnecessary items from the work area to make it easier to access equipment
Set in order:
Organize the work area so that items can be found efficiently and easily
27
Shine:
Keep the work area and tools clean so they’re ready to use
Standardize:
Promote best practices in the workplace to ensure tools and setups are in good condition
Sustain:
Implement behaviors and ways to continue the recognized standards over the long term
Safety:
Create a safe working environment that’s free from hazards
Spirit:
Emphasize teamwork, as 9S can’t be implemented individually
Simplicity:
Keep the system simple so it’s easy to understand, execute, and implement
VERTICAL MILLING CENTRE.
28
Figure no 4
HORIZONTAL MILLING CENTRE.
29
Figure no 5
30
Conclusion
CNC Part Programming for various given Industrial drawings. Manufacture the
components using CNC Turning and Milling machines. Measuring the manufactured
components using Co-ordinate measuring Machine (CMM) and other quality inspection
instruments.
Compare the written program with industrial applied program and find out the
importance of writing program with respect to cycle time, machine selection, tool selection.
The practical knowledge about program created in CNC machine and handling the
equipment of the CNC machine and analyzing the program error and resolve the error and fix it.
THANK YOU
31