CNC Programming
CNC Programming
TRAINING INSTITUTE
CNC programming
Two type of programming
1.Offline programming
2.Online programming
In offline programming
Initial information:-
Analyzing of part Drawing
Part number, material, size means maximum length, width, height,
and diameter.
Input condition like casting/forge/bar
Process details like Drilling, Machining, inspection, Heat treatment.
Allowances / Tolerance, Control dimension
Machine :-
Milling, lathe, Grinding etc.
Specification of machine eg:-stroke length, Spindle axis
CNC programming
List of operation:-Step turning, Plain turning, Facing, Threading,
Drilling, etc.
List of Tooling:-Facing tool, Parting tool, drill, Boring tool etc.
Work holding devices:- Chuck, Fixture.
Technological Data or Cutting parameter:-Feed, Speed, depth of cut.
Cutting method:-Approach, Linear, Retract.
Co-ordinate:-X,Z Position.
Writing the program.
In online programming
Input of program.
Work setup.
Loading tool.
Taking offset
Try out.
Drawing to Machined part steps
Part Programming
CNC programming include:-
Alphabets[A-Z]
Number[0-9]
Symbols[/;()]
G-codes:-(Preparatory function)
Generating profile creating those called G-codes
M-codes:-Miscellaneous function
Vary from machine to machine depending on the
function available on it and manufacturing of the
machine decides them
Alphabets use in Lathe Part Programming
A- Angle N-Block Number
B- O-Start
C-Chamfer always for45Deg P-Multiple Use
D- Q-Multiple Use
E- R-Multiple Use
F-Feed S- speed
G-G codes T-Tool Number
H- U-Multiple Use
I- Arc X V-
J- W-Multiple Use
K-Arc Z X-Axis
L- Y-
M-M codes Z-Axis
Program Structure
Start
Tool change
Spindle Rotation
Axis Moment
Metal cutting
Program End
Terms in programming
1.Program Number:-The program number functions as addressing
symbol for accessing a program. The program number is expressed by
putting the numericals of four digits after the alphabet “O”, numericals
from 0001 to 9999 can be used.
• Example: O2244;
• The program number can be input with numericals of smaller than
four digits.
• Example: O10; = O0010;
• If the number to be input already in the memory that program can not
be input, input with the other number.
Terms in programming
2. SEQUENCE NUMBER(N)
The sequence number is used to
• search
• Callout the position is being executed.
• The position you want to edit in the program easily.
Example : O1001
Generally sequence numbers are inserted in to important
Sequence Number places of the program
Example :
N01 G00 X50 Y50
•Beginning of each tool
Sequence Number
•If the program memory is over the memory capacity :
N02 G1 Z-50 F20 Eliminate the sequence numbers to save memory capacity.
Terms in programming
3. Part Program
• Part program is used to specify the machining process for a single tool.
• That is a program for each process ( First process, Second process etc.) required.
• Number of a part program corresponding to the required number of tools is
included.
Example : O1001;
N01 G00 X50 Y50 ;
Part program
M01;
N02
G54 G00 X60 Y60 ;
Part program
M01;
M30;
Terms in programming
4. Address
The address is expressed by the alphabet.
Example :
G00 X100 Y100
Address
5. Data
Numerals (Including the sign and the decimal point). Succeeding to the address is
called data.
G00 X100 Y100
Data
Terms in programming
6. Word
• Word is minimum unit for specifying the functions.
• It consists of the numerical values (data) including the address and sign.
Example :
G00 X100 Y100
Word
7. Block
Block Consists of words.
Block is minimum unit necessary to operate a In machine.
program each line corresponds to one block.
Block
List of G-codes
• G00Positioning rapid traverse • G71 Plain Rough Turning
• G01Linear interpolation (feed) • G72 Facing Cycle
• G02Circular interpolation CW • G73 Pattern repetition
• G03Circular interpolation CCW • G74 Face Grooving
• G04Dwell • G75 Grooving
• G20Inch unit • G76 Thread cutting
• G21Metric unit • G80 Drill cycle
• G28 Return to home • G90 Absolute system coordinate
• G40
Tool nose radius compensation system
cancel • G91 Incremental coordinate
• G41 Tool nose radius compensation system
left • G92 Co-ordinate Cutting Speed
• G42 Tool nose radius compensation Setting
right • G96 Constant Surface Speed
• G70 Finishing Cycle • G97 Revolution per minute
List of M-codes
• M00 Optional program stop request • M30 End of program, Reset to
• M02 End of program start
• M03 Spindle start (forward CW) • M32 Tail stock Quill forward.
• M04 Spindle start (reverse CCW) • M33 Tail stock Quill Retract.
• M05 Spindle stop • M50 Spindle lock
• M06 Tool change • M51 Spindle Unlock
• M07 Mist coolant ON (coolant 1 ON) • M98 Transfer to subprogram
• M08 Flood coolant ON (coolant 2 ON) • M99 End of subprogram.
• M09 Coolant off
• M10 Chuck - De clamping
• M11 Chuck - Clamping
• M16 Chuck ID Selection
• M13 Chuck OD Selection
Cutting Speed for Milling, Drilling, Turning,
Boring.
Work Tool Brazed
Coated Carbide
Inserts
material HSS Carbide Rough Medium Fine
CAST
20 - 40 75 - 100 100 - 150 135 - 225 175 - 270 215 - 275
IRON
BRASS & 35 - 75 100 - 250 125 - 200 150 - 300 250 - 600 500 - 2500
Aluminum
FEED CHART
Cutting Machining Operation
Work Tool
material Material TURNING DRILLING BORING
HSS 0.1 – 0.2 0.1 – 0.2 0.1 – 0.2
STEEL
Carbide Tip 0.1 – 0.3 0.1 – 0.3 0.1 – 0.3