100% found this document useful (1 vote)
177 views

NC Programming

The document discusses part programming for CNC machines. It explains that part programs consist of sequential blocks of code containing instructions for movements and actions. It also describes various G-codes for different types of movements like linear interpolation, rapid traverse, and circular interpolation. Coordinate systems, workpiece and machine zeros, and different tape programming formats are defined. Common miscellaneous functions for cutter compensation and canned cycles are also outlined.

Uploaded by

Akash Byju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
177 views

NC Programming

The document discusses part programming for CNC machines. It explains that part programs consist of sequential blocks of code containing instructions for movements and actions. It also describes various G-codes for different types of movements like linear interpolation, rapid traverse, and circular interpolation. Coordinate systems, workpiece and machine zeros, and different tape programming formats are defined. Common miscellaneous functions for cutter compensation and canned cycles are also outlined.

Uploaded by

Akash Byju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

PART PROGRAMMING

Part program is a set of instructions which instruct the


machine tool about the processing steps to be
performed for the manufacture of a part.
The shape and size of the finished component is totally
dependant on how well the program has been prepared.
CNC code consists of blocks, each of which contains an
individual command for a movement or specific action.
Just as with conventional machines, one movement is
made before the next one. Thats why CNC codes are
listed sequentially in numbered blocks. These codes are
passed to MCU (Machine Control Unit) which act as
per instruction.
NC Coordinate system
Coordinate system for CNC Lathe
NC Coordinate system
Coordinate system for CNC milling and
drilling machine
Zero points and Reference Points
Machine Zero Point
The machine zero point, often called the machine zero, home position or
just a machine reference position, is the origin of machine coordinate
system. The location of this point may vary between the manufacturers.
Reference Point
The reference point is commonly known as program zero or part zero
because the coordinate point that represents the program zero can be
selected by the programmer almost anywhere. It is not fixed point but a
floating point. The program zero is selected based on accuracy of
machining , Convenience of setup and operation and Safety of working
conditions.
Workpiece zero point
The workpiece zero point is chosen by the programmer and input into the
CNC system when setting up the machine. The position of the workpiece
zero can be freely chosen by the programmer within the workpiece
envelope of the machine.
Tape Programming Format
Word Address Format
This type of tape format uses alphabets called address, identifying the
function of numerical data followed.
This format is used by most of the NC machines, also called variable
block format.
A typical instruction block will be as below :
N20 G00 X1.200 Y.100 F325 S1000 T03 M09 <EOB>
or
N20 G00 X1.200 Y.100 F325 S1000 T03 M09;
Tab Sequential Format
Here the alphabets are replaced by a Tab code, which is inserted
between two words. The MCU reads the first Tab and stores the data
in the first location then the second word is recognized by reading the
record Tab.
A typical Tab sequential instruction block will be as below :
>20 >00 >1.200 >.100 >325 >1000 >03 >09
Fixed Block Format
In fixed block format no letter, address of Tab and words are used.
The main advantage of this format is that the whole instruction block
can be read at the same instant, instead of reading character by
character.
This format can only be used for positioning work only. A typical
fixed block instruction block will be as below:
20 00 1.200 .100 325 1000 03 09 <EOB>
NC PROGRAMMING FORMAT / TAPE FORMAT
The programs are made up of commands and the commands are
made up of words. Each word has a letter address and a numerical
value. A NC word is collection of characters used to form an
instruction.
1) Sequence Number (N)
Sequence Numbers are words that begin with letter
N followed by numbers. These are normally first
word in every block of the program. These are used
to identify and sequence each block of information
so that it can be distinguished from the rest.
2) Preparatory functions (G)
The word preparatory means to make ready or
prepare for certain action. In CNC the preparatory
function prepares or initiates different actions to
occur on the machine. It is a two digit number
(0-99) preceded by the word address letter G.
G01 LINEAR INTERPOLATION
The G01 code executes a cutting movement following a straight
line, at a set feed rate.
G01 command is written in the following format.
G01 X_ _ _ _Y_ _ _ _ Z_ _ _ _
G01 X100 Y50 F50
G00 RAPID TRAVERSE
The G00 code executes a non cutting movement, at a rapid
feed rate, to a specific coordinate position in the working area.
G00 command is written in the following format
G00 X_ _ _ _Y_ _ _ _ Z_ _ _ _
Here X,Y and Z denote the location of the ending position of
the tool.
G02 AND G03 CIRCULAR INTERPOLATION
The G02 code executes a cutting movement following a
clockwise circular path, at a set feed rate. The G03 code
executes a cutting movement following a counter
clockwise circular path, at a set feed rate.
G20 AND G21 IMPERIAL/METRIC DATA
INPUT
The machine controller can be programmed in either
Imperial (inch) unit input (G20) or Metric (millimetre)
unit input (G21).
The standard format for a CNC part program is to
write the G20 or G21 code in the first block of the
program.
miscellaneous function
G40 G41 G42 CUTTER COMPENSATION
The collection of G40, G41 and G42 codes allow the
machine controller to produce very accurate arcs and
tapers on the billet, by compensating for the tool radius.
Complex workpiece shapes are therefore programmed
with cutter compensation mode active.
The radius of the tool (the offset amount) is measured,
then entered into the offset file in the machine
controller. Once set, the tool path can be offset by this
value, regardless of the program.
G80 G81 CANNED CYCLE DRILLING
G80 Canned cycle stop and G81 for Canned Drilling
Cycle Start. The G81 canned drilling cycle
is defined in the following format.
G98/G99 G81 X _ _ _ Y _ _ _ Z _ _ _ R _ _ _ F _ _ _
G90 G21 (TOOL/STANDARD,5,80,0,5,0)
(COLOR,255,255,255)
M06 T01
M03

(STOCK/50,35,0,-1)
G00 X36 Z1;
G71 U0.5 R1
G71 P10 Q20 U0.1 W0.1 F0.05;
N10 G00 X0 Z1;
G01 X0 Z0 F0.05;
G03 X10 Z-5 R5;
G01 Z-15;
G01 X20 Z-25;
G03 X30 Z-30 R5
G01 Z-35
G02 X35 Z-37.5 R2.5
N20 G01 X35;

You might also like