Experiment No.-1: Page 1 of 25
Experiment No.-1: Page 1 of 25
Experiment No.-1: Page 1 of 25
-1
Object:
Procedure:-
Part Program:-
Page 1 of 25
Program statement Description
Result: - Part program of the given dimension has been prepared and also run on the software
successfully.
Page 2 of 25
Experiment No.-2
Object:
Procedure:-
Part Program:-
Page 3 of 25
Program statement Description
Result: - Part program of the given dimension has been prepared and also run on the software
successfully.
Page 4 of 25
Experiment No. – 3
Object:
Procedure:-
Part Program:-
Page 5 of 25
Program statement Description
N40 G90 X24 Z-20 F80 Diameter cutting cycle with 1mm
cut up to -20 length with feed
F=80mm/mint
Page 6 of 25
N110 G90 X17 Z-20 Diameter cutting cycle with 1mm
cut up to -20 length
Page 7 of 25
N200 G32 Z-10 F1 Thread cutting cycle with 0.1mm
cut up to -10mm length with feed
rate 1mm
Page 8 of 25
N310 G01 X16.4 Linear interpolation up to given
point (0.1mm cut)
Page 9 of 25
N430 G01 X16.1 Linear interpolation up to given
point (0.1mm cut)
Page 10 of 25
N550 G01 X15.8 Linear interpolation up to given
point (0.1mm cut)
Result:- Part program of the given dimension has been prepared and also run on the software
successfully.
Page 11 of 25
Experiment No. - 4
Object:- To study G and M codes commonly used in the CNC lathe Trainer and CNC
Mill Trainer.
THEORY:-
In order to facilitate various functions of the CNC machines there has been developed
a specific code structure by various CNC software developing companies (eg.
FanucFota, Siemens etc.). These codes are accepted globally and can be divided into
two broad categories:
(i) G-CODES
(ii) M-CODES
G code Description
G04 Dwell
Page 12 of 25
G18 Z X plane selection
Page 13 of 25
G69 Coordinate rotation cancel
Page 14 of 25
G99 Return to R point in canned cycle
G code Description
G04 Dwell
G21 Input in mm
Page 15 of 25
G28 Return to reference position
Page 16 of 25
DESCRIPTION OF G-CODES
G01 is used to move the cutting tool with the feed rate. Hence, it is used when
material has to be actually removed from the work piece. Feed rate has to be specified
by the programmer in the part program. For example, the command
causes tool to move clockwise along arc of radius 10 from current position to X = 10,
Page 17 of 25
G03 is used when machining has to be done in a circular path in counter clockwise
direction.
G04 (Dwell)
G04 causes program to wait for a specified time. It can be used to rotate the tool at
a
G04 X(t)
For example, if a drill or reamer should dwell is a hole for 5 seconds; the command
can be written as
G04 X5.0
G20 and G21 is used to enter input data in inches and millimeter respectively.
G28
G28 is used to move the tool to a reference point via an intermediate point. The
movement is accomplished in rapid traverse mode.
G32, G78
It is used for cutting straight or tapered threads, but since it does not allow
automatic return to the start point, G78 i.e. multiple threading cycle is used. G78 is
Page 18 of 25
canned cycle unlike G32. The format of this cycle comprises of two blocks. For
example,
G78 P021O56 Q180 RO.18
In the first block for P021056, 02 refers to number of finishing cuts, 10 is the
chamfer value and 56 is flank angle of thread in degrees. Q is the minimum cutting
depth in microns and R is finishing offset (allowance) in millimeter. In the second
block, X and Z are the coordinates. R is incremental taper value with sign (R = 0 for
cylindrical threads), P is the thread depth in microns (always positive). Q is cutting
depth of first cut in microns (radius value, without sign), F is thread pitch in millimeter.
An amount equal to its radius uses G41 and G42 to offset the cutter from its
predesigned path. For example, consider end milling of the rectangular plate as shown
in figure 3.1. Usually, the edges of the plate are defined as the trajectory of the cutter,
while in fact, the axis of the tool should get offset from the edges by an amount equal to
radius of the
cutter and move along dotted path shown in the figure. In order to offset the tool from I
Page 19 of 25
G43 TO2 HO2
The CNC software, has a table which has tool information such as tool number, code
number and offset value. Refer the following table.
(assumes)
For positive offset value, G43 is used while for negative offset value, G44 is used.
G49 is used at the end of the program to cancel tool-length offset value.
G90 X 45 Y 50
G9l X 35 Y 40
Page 20 of 25
G92
It is used to define coordinate system setting. It is used to specify the location of
system origin, relative to starting point of the cutting tool in milling, drilling and some
lathe machines.
M code Description
Page 21 of 25
M09 Coolant OFF
M code Description
Page 22 of 25
M04 Spindle start reverse CCW
M08 Coolant on
Page 23 of 25
DESCRIPTION OF M COMMANDS
This command is used to stop the execution of part program. Main spindle, feed
and coolant will be switched off. Also, the chip protection door can be opened without
triggering an alarm. MOO can be used if an inspection check is required during an
operation.
M01 also works like M00, but only if "Programmed Stop Yes" is switched on by
soft key in the menu PROGRAM CONTROL.
It works like M30. It halts program execution, spindle is turned off and tool moves
to
It is used to switch on the spindle in clockwise direction. Note that spindle speed
has to be programmed, chip protection door should be closed and workpiece properly
damped for executing M03.
It is used to stop the spindle motion. In turning operation, MO5 can be used to stop
spindle for inspection of workpiece or change of cutting tool. It can be used at the end
of program, however at the program end, the main spindle is also automatically
switched off.
Page 24 of 25
M00 (Tool Change)
If the NC machine has tool magazine or tool drum with multiple tool capacity. M06
is used to change the tool. It is used with T word, which specifies the tool number.
M10, M11
M10 is used to clamping the fixture while M11 is used to unclamp it.
M30
With M30, all machine drives are switched off and control returns to start of
program.
M60
In case NC/CNC machine makes use of multiple pallets for loading-unloading of
workpiece from the machine, M60 can be used for changing pallets.
M98, M99
M98 is used to call a subprogram or function. In this command, the subprogram
number and the number of repetitions have to be specified. M99 is used to jump back to
the start of the program or the specified block number.
Page 25 of 25