Sunteți pe pagina 1din 72

CIM & AUTO

OMATION LAB
BORATORY

ACHARYA
A INSTIT F TECHN
TUTE OF NOLOGY

DEPA
ARTMEN
NT OF MECHANICAL ENG
GINEERIN
NG

COM
MPUTER INTEG D MANU
GRATED UFACTURING
LABORAATORY
& AUTOMAATION LABORAATORY
MANUAAL
(SSUB CODE
O : 10
0MEL778)
for B.E
E. Mechaanical VIII Sem Stuudents

Preepared Byy:
Pro
of. Manjun
natha B. B.E.,
B M.E., (Ph
h.D)
Asst. Professor
P Grad
de - 1

Mr. Hullluraiah H.
H D.M.E,
Insstructor

____________________ __________________________________________________
A
Acharya a Dr. Sarvepa
S alli Ra adhakrishnan n Road,,
C
Copyright ©Achary
A2013 @Dept
ya
t. of Post ticaloffice
Mechani e,
Engg, Ach BAN
harya InstituGALOR
ute of Tech.,RE
B – 56 60107
Bangalore‐10
07 P
Page ‐ 0
CIM & AUTOMATION LABORATORY

CONTENTS

Sl. No. Topic Page No.

1 Syllabus 2

2 Course Outcomes 3

3 List of Reference books / URLs 3

4 List of Equipments / Systems with specifications 4

5 Introduction to CIM 5

CNC Turning

Co-ordinate systems 6

G Codes 8
6
M Codes 17

Turning Exercises 1 to 12 23

Turning Practice 35

CNC Milling

Co-ordinate systems 38

G Codes 40
7
M Codes 49

Milling Programs - 1 to 12 51

Milling Exercises 64

8 Viva Questions 68

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 1
CIM & AUTOMATION LABORATORY

SYLLABUS

Subject Code : 10MEL78 IA Marks : 25


No. of Practical Hrs/Week : 03 Exam Hours : 03
Total No. of Practical Hrs. : 42 Exam Marks : 50

PART – A

CNC part programming using CAM packages. Simulation of Turning, Drilling,


Milling operations. 3 typical simulations to be carried out using simulation
packages like Master- CAM, or any equivalent software.

PART - B

(Only for Demo/Viva voce)

1. FMS (Flexible Manufacturing System): Programming of Automatic storage and


Retrieval system (ASRS) and linear shuttle conveyor Interfacing CNC lathe,
milling with loading unloading arm and ASRS to be carried out on simple
components.

2. Robot programming: Using Teach Pendent & Offline programming to


perform pick and place, stacking of objects, 2 programs.

PART – C

(Only for Demo/Viva voce)


Pneumatics and Hydraulics, Electro-Pneumatics: 3 typical experiments on
Basics of these topics to be conducted.

Scheme of Examinations:

Two questions from Part A – 40 Marks (10 Write up +30)


Viva Voce – 10 Marks
_____________________________
Total – 50 Marks

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 2
CIM & AUTOMATION LABORATORY

Course Outcomes

Able to understand the Basic concepts of CNC machines centers like LATHE and Milling, skills
1 required to operate CNC machine tools.
Able to understand about various cutting tools, tool and work holding devices used in CNC
2
machine tools

Enables to understand about various programming controllers like Fanuc, Sinumeric and also
3
about various G codes and M codes used in CNC programming.

4 Able to understand various cycles and programming methods used in CNC control of operations

5 Enables to understand interfacing of Machine with computer.

List of Reference books / URLs


1 CAD/CAM: Principles and Applications, P.N. Rao ,Tata McGraw-Hill Education, 2004
2 CNC Machines, B.S. Pabla, New age International, 1st Edition, 2005
3 CNC Programming Principles and Applications, Mike, Mattson , Vikas Publishing House Pvt.
Ltd. 2003
4 CNC Programming Made Easy, Jha, Binith Kumar, Vikas Publishing House Private Limited,
2003
5 CADEM software and MTAB- Fanuc software online Manuals

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 3
CIM & AUTOMATION LABORATORY

List of Equipments / Systems with specifications

Name of Equipments /
Sl. Specifications Nos
Systems

01 CNC Lathe MTAB, XLTURN with accessories 01

HP Compaq 8000 elite Convertible Minitower PC,


Intel Core Quad Q9500 Processor (2.83 GHz), Intel
Q45 Chipset MBD, 4 GB DDR3 Ram, 320 GB SATA 35
02 HDD, HP18.5" Wide LCD Monitor V185e, HP USB
Standard Key Board & Mouse
Client computers
HP Compaq 8200 elite Microtower, Intel(R) Core(TM)
i5-2400 (3.10 GHz) , 7200 RPM / Chipset Intel Q67
EXPS with inbuilt graphics card, 4 GB DDR3, 500 GB 35
SATA HDD, HP 18.5" LED TFT Monitor, HP USB
Standard Key Board & Mouse

03 Printers HP LaserJet P2055dn 01

04 Projector CASIO 01

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 4
CIM & AUTOMATION LABORATORY

Computer Integrated Manufacturing (CIM)

Definition
1) Computer Integrated Manufacturing, known as CIM, is the phrase used to
describe the complete automation of a manufacturing plant, with all processes
functioning under computer control and digital information tying them together

2) It includes CAD/CAM, computer-aided design/computer-aided manufacturing,


CAPP, computer-aided process planning, CNC, computer numerical control
machine tools, DNC, direct numerical control machine tools, FMS, flexible
machining systems, ASRS, automated storage and retrieval systems, AGV,
automated guided vehicles, use of robotics and automated conveyance,
computerized scheduling and production control, and a business system
integrated by a common data base.

3) The heart of computer integrated manufacturing is CAD/CAM. Computer-aided


design (CAD) and computer-aided manufacturing (CAM) systems are essential
to reducing cycle times in the organization.

4) CAD provides the electronic part images, and CAM provides the facility for tool
path cutters to take on the raw piece

5) Usage of codes such as G-codes and M-codes are very essential for performing
this Lab exercises

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 5
CIM & AUTOMATION LABORATORY

CNC - TURNING

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 6
CIM & AUTOMATION LABORATORY

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 7
CIM & AUTOMATION LABORATORY

PREPARATORY FUNCTION (G CODES)


“G” – Codes are instructions describing Machine Tool Movement

G00 – Rapid Traverse (Positioning)


G01 – Linear Interpolation (Cutting Feed)
G02 – Circular Interpolation [Clockwise]
G03 – Circular Interpolation [Counter clockwise]
G04 – Dwell
G20 – Imperial (Input in Inches)
G21 – Metric Dimensioning (Input in metric)
G28 – Go to Reference
G40 – Cutter compensation Cancel
G41 - Cutter compensation Right
G42 - Cutter compensation Left
G50 – Clamp Spindle / Coordinate setting
G70 – Finishing Cycle
G71 – Stock removal in Turning
G72 – Multiple Facing
G73 – Pattern Repeating
G74 – Peck Drilling Cycle
G76 – Multiple Threads
G81 – Drilling Cycle
G90 – Turning Cycle
G94 – Facing Cycle
G96 – Constant Surface Speed
G97 – Normal Surface Speed
G98 – Feed per Minute
G99 – Feed per Revolution

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 8
CIM & AUTOMATION LABORATORY

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 9
CIM & AUTOMATION LABORATORY

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 10
CIM & AUTOMATION LABORATORY

G04 DWELL

A G04 causes the program to wait for a specified amount of time.

The time can be specified in seconds with the “X” or “U” prefixes or in milliseconds
with the “P” prefix.

Example: G04 X1.5

G04 U1.5

G04 P1500

G20 IMPERIAL

A G20 causes positions to be interpreted as being in imperial units. All the input
values are inches.

This can only be set at the start of the main program.

G21 METRIC

A G21 causes positions to be interpreted as being in metric units (mm).

This can only be at the start of the main program.

G28 GOTO REFERENCE POINT

A G28 causes a fast traverse to the specified position and then to the machine
datum.

Example: G28 X34 Z5

G28 U0 W0

G40 CANCEL COMPENSATION

A G40 cancels tools nose radius compensation.

G41 COMPENSATE RIGHT

A G41 enables tool nose radius compensation to the right of the programmed path.

G42 COMPENSATE LEFT

A G42 enables tool nose radius compensation to the left of the programmed path.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 11
CIM & AUTOMATION LABORATORY

G50 CO-ORDINATE SETTING

G50 has 2 uses.

A Coordinate setting block has an “X”, “Z”, “U” or “W” upon it.

A maximum spindle speed block does not.

G50 CLAMP SPINDLE

G50 sets the maximum spindle speed for constant surface speed control.

An “X”, “Z”, “U” or “W” prefix must not be on the block or it will be interpreted as a
coordinate setting block.

Example: G50 S2000

G50 creates a new coordinate system in which the tools current position is set to
the specified coordinates.

The new coordinates can be in absolute or incremental from.

Example: G50 X0 Z0

And G50 U-40

G70 FINISHING CYCLE

A G70 causes a range of blocks to be executed, then control passes to the block
after the G70. This will be used after the completion of the Roughing cycle.

The “P” and “Q” values specify the “N” block numbers at the start and end of the
profile.

Example: G70 P10 Q80

P – First Block of cycle

Q – Last Block of cycle

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 12
CIM & AUTOMATION LABORATORY

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 13
CIM & AUTOMATION LABORATORY

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 14
CIM & AUTOMATION LABORATORY

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 15
CIM & AUTOMATION LABORATORY

G90 TURNING CYCLE

A G90 is the diameter cutting cycle. It is the equivalent of

• Rapid X position.

• Feed to Z position

• Feed to start X position

• Rapid to start Z position

If an “R” value is specified tapering will be performed. The initial rapid move will be
to the X position plus the “R” value (Radio).

G94 FACING CYCLE

A G90 is an end face cutting cycle. It is the equivalent of

• Rapid Z position.

• Feed to X position

• Feed to start Z position

• Rapid to start X position

If an “R” value is specified tapering will be performed. The initial rapid move will be
to the Z position plus “R” value.

Example: G94 U-4.0 W-2.0 R-8.0 F140.0

G96 CONSTANT SURFACE SPEED

A G96 enables Constant Surface Speed.

Example: G96 S100

Sets the surface speed to 100 meters a minute.

G97 NORMAL SPINDLE SPEED

G97 Cancels Constant Surface Speed. The spindle speed will not change until the
next “S” value is reached.

G98 FEED PER MINUTE

G98 sets the feed per minute mode. This is the default.

G99 FEED PER REVOLUTION

G99 sets the feed per Revolution modes.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 16
CIM & AUTOMATION LABORATORY

MISCELLANEOUS FUNCTIONS (M CODES)


“M” CODES are instructions describing miscellaneous functions like calling the
tool, Spindle rotation, coolant on etc.,

M00 – Program Stop

M01 – Optional Stop

M02 – Program End

M03 – Spindle Forward (CW)

M04 – Spindle Reverse (CCW)

M05 – Spindle Stop

M06 – Automatic Tool Change

M08 – Coolant On

M09 – Coolant Off

M10 – Vice / Chuck Open

M11 – Vice / Chuck close

M30 – Program End

M98 – Sub Program Call

M99 – Sub Program End

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 17
CIM & AUTOMATION LABORATORY

DESCRIPTION FOR “M” CODES


M00 PROGRAM STOP

Cycle operation is stopped after a block is executed. Ex: M00

M01 OPTIONAL STOP

Cycle operation is stopped after a block containing M01 is executed. This code is
only effective when the optional stop switch on the machine control panel has been
pressed. Example: M01

M02 END OF PROGRAM

Stops the spindle. Turns the coolant off. Terminates the CNC program.
Example: M02

M03 START SPINDLE (CW)

An M03 instruction starts forward spindle motion at the specified spindle rate.

Example: M03 S1200

The spindle should be switched on before any movement below the component
surface.

M04 REVERSE SPINDLE (CCW)

An M04 instruction starts reverse spindle motion at the specified spindle rate.

Example: M04 S1000

The spindle should be switched on before any movement below the component
surface.

M05 STOP SPINDLE

Stops spindle rotation. It is good programming practice to issue an M05 before a


tool change, and at the end of a program.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 18
CIM & AUTOMATION LABORATORY

M06 AUTOMATIC TOOL CHANGE

The M06 instruction causes to change to a different tool. The left most digit of the
“T” ignorising zeros, selects the new tool. For safe practice tool changing should be
done only in the home position or safe position. To select Tool No. 2, we can use T2
or T20 or T0202

Example: M06 T0202

You can set tool lengths and diameters at the start of the program using the TOOL
DEF directive

M08 COOLANT ON

M08 turns the coolant on.

M09 COOLANT OFF

M08 turns the coolant off.

M10/11 WORK CLAMP OPEN/CLOSE

M10 Opens the work clamp.

M11 Closes the work clamp.

M30 PROGRAM END & REWIND

Stops the spindle. Turns the coolant off. Terminates and rests the CNC program.
This command is used at the end of program to stop the program and bring the
cursor to the first line of the program to repeat the program once again.

M98 SUB PROGRAM CALL

M98 Causes another program to be executed.

The “P” value specifies the program number & the number of times to execute it.

The rightmost 4 digits are the Program Number. The digits to the left are the
number of repetitions. There can be up 999 repetitions, if the value is omitted it is
called once. Example: M98 P12 and M98 P10 012 both execute one program 12
once.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 19
CIM & AUTOMATION LABORATORY

M99 SUB PROGRAM EXIT

Returns control to the program that called the current program. If a “P” value is
specified then execution begins from the block with the same “N” number, otherwise
it is from the block after the subprogram call.

If an M99 is specified in the main program then the execution is from the start of
the program.

Example; M99

Returns to the block following the call.

M99 P10

Returns to the block with “N” value 10.

BILLET

This directive allows the billet in the simulation window to be given a size. The billet
definition should be placed at the start of a program.

Ex: BILLET X30 Z50 defines the billet as 50 mm long with a diameter of 30mm.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 20
CIM & AUTOMATION LABORATORY

START –UP OF WRITTING CNC PROGRAM:-

% While writing a program on FUNUC controller, First line has


to be started with letter “%”

BILLET X__ Z__ This directive is used only for simulation purposes. It defines
the work piece dimensions. (X = Diameter & Z= Length )

G21/G20 G21 – The program is done in Metric Units (MM OR


G98/G99 G20 - The program is done in Imperial Units
G40 G98 – Gives the unit of Feed in mm/minute OR
G99 – Gives the unit of Feed in mm/Revolution
G40 – Compensation Cancel.

G28 U0 W0 Makes the tool go to home position. U & W are secondary


movements about X & Z axis.

M06 M06 - Tool Change


T0101 T=Tool, The first two digits specify the tool position in the
turret and last two digits denotes tool offset number.

M03/M04 S1000 M03 – Spindle Rotate clockwise direction


M04 - Spindle Rotate counter clockwise direction
S1000 – Spindle rotates 1000 rpm.

G00 X21 Z1 G00 – Gives rapid position of the tool to a points X21 Z1

Write the program


-
-
-
G28 U0 W0 Makes the tool go to home position. U & W are secondary
movements about X & Z axis.

M05 Stop the spindle rotation

M02 / M30 M02 - Optional Stop,


M30 – Program stops and rewind.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 21
CIM & AUTOMATION LABORATORY

Procedure for CADEM Software (NC Turn)

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 22
CIM & AUTOMATION LABORATORY

EXERCISE - 1

G94 FULL FACING CYCLE Tool Home Position

3 MM PARTING 1 X 5 FOR FACING


X+

O20
Z- Z+

50 X-

G94 FULL FACING CYCLE & PARTING OFF

[BILLET X20 Z60 - Defines the work piece dimensions


N010 G21 G40 G98 - Metric Units, Compensation cancel, Feed in mm/Min
N020 G28 U0 W0 - Go to reference (Home Position)
N030 M06 T0101 - Automatic Tool Change, Call Tool No.01 (Facing Tool)
N040 M03 S1500 - Spindle on clockwise, Constant spindle speed __ rpm
N050 G00 X22 Z1 - Rapid positioning
N060 G94 X0 Z-1 F60 - Facing cycle, Feed/Minute
N070 Z-2 - Profile of the part
N080 Z-3
N090 Z-4
N100 Z-5
N110 G00 Z5 - Rapid positioning outside the work piece
N120 G28 U0 W0 - Tool moves to home position
N130 M06 T0202 - Automatic Tool change Call Tool No.02 (Parting off Tool)
N140 M03 S800 - Spindle on clockwise, constant spindle speed __ rpm
N150 G00 X21 Z-53 - Rapid positioning with
N160 G01 X0 Z-53 F30 - Linear position, Profile of the part, Feed/Minute
N170 G00 X21 - Rapid positioning outside the work piece
N180 G28 U0 W0 - Tool moves to home position
N190 M05 - Spindle stop
N200 M30 - Program stops & rewind.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 23
CIM & AUTOMATION LABORATORY

EXERCISE – 02

G90-PLAIN TURNING CYCLE


∅ 20

10

10 30

[BILLET X20 Z50 T0101 – TURNING TOOL


N010 G21 G40 G98 T0202 – 3 mm PARTING TOOL
N020 G28 U0 W0
N030 M06 T0101
N040 M03 S1200
N050 G00 X21 Z1
N060 G90 X20 Z-30 F60
N070 X19
N080 X18
N090 X17
N100 X16
N110 X15
N120 X14
N130 X13
N140 X12
N150 X11
N160 X10
N170 G28 U0 W0
N180 M06 T0202
N190 M03 S800
N200 G00 X25 Z-43
N210 G01 X0 Z-43 F30
N220 G00 X25
N230 G28 U0 W0
N240 M05
N250 M30

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 24
CIM & AUTOMATION LABORATORY

EXERCISE-03

G90 - STEP TURNING CYCLE


∅20
∅15
∅10

10 10 10

[Billet X20 Z40 T0101 – TURNING TOOL


N010 G21 G40 G98 T0202 – 3 mm PARTING TOOL
N020 G28 U0 W0
N030 M06 T0101
N040 M03 S1200
N050 G00 X21 Z2
N060 G90 X20 Z-20 F60
N070 X19
N080 X18
N090 X17
N100 X16
N110 X15
N120 X14 Z-10
N130 X13
N140 X12
N150 X11
N160 X10
N170 G28 U0 W0
N180 M06 T0202
N190 M03 S800
N200 G00 X25 Z-33
N210 G01 X0 Z-33 F30
N220 G00 X25
N230 G28 U0 W0
N240 M05
N250 M30

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 25
CIM & AUTOMATION LABORATORY

EXERCISE – 04

G90 - TAPER TURNING CYCLE

∅20

15

10 40

[BILLET X20 Z50


N010 G21 G40 G98
N020 G28 U0 W0
N030 M06 T0101
N040 M03 S1200
N050 G00 X21 Z1
N060 G00 Z1
N070 G90 X20 Z-40 R0 F50
N080 X20 R-0.5
N090 X20 R-1.0
N100 X20 R-1.5
N110 X20 R-2.0
N120 X20 R-2.5
N130 G28 U0 W0
N140 M05
N150 M30

R = (Minor dia – Major dia) /2


= (15-20) / 2
= -5/2 = -2.5

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 26
CIM & AUTOMATION LABORATORY

EXERCISE – 05
50

∅ 20
∅15
∅10

15 15 15 10 15

[BILLET X50 Z75


N010 G21 G40 G98
N020 G28 U0 W0
N030 M06 T0101
N040 M03 S1200
N050 G00 X51 Z1
N060 G71 U0.5 R1
N070 G71 P80 Q150 U0.5 W0.5 F50
N080 G01 X10
N90 Z-15 Format:-
N100 X15 G71 U (d) R (e)
N110 Z-25 G71 P (m) Q (n) U (u) W (w) F (f)
N120 X20
N130 Z-40 d = Depth of cut
N140 X50 Z-55 e = Retract amount
N150 Z-70 m = Number of First Block of the Shape
N160 G70 P80 Q150 n = Number of Last Block of the Shape
N170 G28 U0 W0 u = Finishing Allowance in X
N180 M05 w = Finishing Allowance in Z
N190 M30 f = Feed rate

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 27
CIM & AUTOMATION LABORATORY

EXERCISE – 06

G71-STOCK REMOVAL TURNING


∅30
∅ 20
∅ 10

10 5 10 10 10 5

[BILLET X30 Z50


N010 G21 G40 G98
N020 G28 U0 W0
N030 M06 T0101
N040 M03 S1200
N050 G00 X31 Z1
N060 G71 U0.5 R1
N070 G71 P80 Q140 U0.1 W0.1 F50
N080 G01 X0 F50
N090 Z0
N100 G03 X10 Z-5 R5
N110 G01 Z-15
N120 X20 Z-25
N130 G01 Z-35
N140 G02 X30 Z-40 R5
N150 G70 P80 Q140
N160 G28 U0 W0
N170 M05
N180 M30

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 28
CIM & AUTOMATION LABORATORY

EXERCISE – 07

[BILLET X50 Z85 T0101 – Roughing tool


N010 G21 G40 G98 T0202 – 3mm Grooving tool
N020 G28 U0 W0
N030 M06 T0101
N040 M03 S1200
N050 G00 X51 Z2
N060 G71 U2 R1
N070 G71 P080 Q160 U0.1 W0.1 F50
N080 G01 X0
N090 Z0
N100 G03 X20 Z-5 R15
N110 G01 Z-20
N120 X30
N130 Z-40
N140 X40 Z-60
N150 G03 X50 Z-65 R5
N160 G01 Z-80
N170 G70 P080 Q160
N180 G28 U0 W0
N190 M06 T0202
N200 M03 S500
N210 G00 X32 Z-40
N220 G75 R1
N230 G75 X 24 Z-40 P500 Q500 F50
N240 G28 U0 W0
N250 M05

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 29
CIM & AUTOMATION LABORATORY

N260 M30

EXERCISE – 08 G76 THREADING CYCLE

[BILLET X22 Z50


N010 G21 G40 G98 T0101 – Turning tool
N020 G28 U0 W0 T0202 – 3 mm Grooving tool
N030 M06 T0101 T0303 – Threading tool
N040 M03 S1200
N050 G00 X22 Z2 Threading Calculation:-
N060 G71 U0.5 R1 Core ø = Nominal ø – Height of thread
N070 G71 P80 Q150 U0.1 W0.1 F60 Cd = D - 2h
N080 G01 X10 Calculation of height of thread
N090 G01 Z0 h = 0.61343 x Pitch
N100 G01 X12 Z-1 h = 0.61343 x 2 = 1.22686
N110 G01 Z-25
N120 G01 X20 Core ø calculation
N130 G01 Z-30 Cd = D – 2h
N140 G01 X25 Cd = [12 – (2 x 1.22686)]
N150 G01 Z-50 Cd = 9.54628mm
N160 G70 P80 Q150
N170 G28 U0 W0
N180 M06 T0202 Format:-
N190 M03 S800 G76 P (m) (r) (a) Q (d min) R (d)
N200 G00 X13 Z-23 G76 X (u) Z (W) P (k) Q (∆d) F (L)
N210 G75 R1
N220 G75 X8 Z-25 P500 Q500 F50 m = No. of Idle passes
N230 G28 U0 W0 r = Chamfering amount
N240 M06 T0303 a = Angle of tool tip
N250 M03 S500 d min = Minimum thread depth
N260 G00 X14 Z2 d = Finishing allowance
N270 G76 P031560 Q100 R0.15 u = Core Dia (Cd)
N280 G76 X9.54 Z-21 P1226 Q125 F2 w = Length of Thread
N290 G28 U0 W0 k = Height of Thread
N300 M05 ∆d = Depth of First cut (in microns)
N310 M30 L = Lead of Thread
Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 30
CIM & AUTOMATION LABORATORY

EXERCISE – 09

[BILLET X50 Z85 Tool 1 – Roughing tool


N010 G21 G40 G98 Tool 2 – 3mm Grooving tool
N020 G28 U0 W0 Tool 3- Threading Tool
N030 M06 T0101
N040 M03 S1200
N050 G00 X51 Z5
N060 G71 U3 R1
N070 G71 P80 Q130 U1 W1 F50 N220 M06 T0303
N080 G01 X20 F50 N230 M03 S500
N090 Z0 N240 G00 X21 Z2
N100 Z-25 N250 G76 P061560 Q100 R0.15
N110 G01 X35 Z-45 N260 G76 X17.54 Z-21 P1226 Q125 F2
N120 X35 Z-57.5 N270 G28 U0 W0
N130 G02 X50 Z-65 R7.5 N280 M05
N140 G70 P80 Q130 N290 M30
N150 G28 U0 W0
N160 M06 T0202
N170 M03 S800
N180 G00 X21 Z-23
N190 G75 R1
N200 G75 X15 Z-25 P1000 Q1000 F50
N210 G28 U0 W0

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 31
CIM & AUTOMATION LABORATORY

EXERCISE – 10

G74 - PECK OR RADIAL DRILLING CYCLE

HOLE O 12 MM
O 30

50
60

TOOL 1 – Centre Drill Dia 6 mm


TOOL 2 – Drill Bit Dia 6 mm
TOOL 3 – Drill Bit Dia 12 mm

[BILLET X30 Z60


N10 G21 G40 G98
N20 G28 U0 W0
N30 M06 T0101
N40 M03 S1500
N50 G00 X0 Z2
N60 G74 R1
N70 G74 X0 Z-5 Q500 F30
N80 G28 U0 W0
N90 M06 T0202
N100 M03 S1500
N110 G00 X0 Z2
N120 G74 R1
N130 G74 X0 Z-45 Q500 F30 Format:-
N140 G28 U0 W0 G74 R( r )
N150 M06 T0303 G74 Z (z) Q (q) F (f)
N160 M03 S1500
N170 G00 X0 Z2 Description:-
N180 G74 R1 R – Retract value of each peck in mm
N190 G74 X0 Z-50 Q500 F30 Z – Final Hole Depth in mm
N200 G28 U0 W0 Q – Peck increment in Micron
N210 M05 F – Feed rate
N220 M30

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 32
CIM & AUTOMATION LABORATORY

EXERCISE – 11

[BILLET X50 Z60 T0101 – Roughing tool


N010 G21 G40 G98 T0202 – Countersink tool
N020 G28 U0 W0 T0303- Drill Bit Dia 6mm
N030 M06 T0101
N040 M03 S1200
N050 G00 X51 Z2
N060 G71 U3 R1
N070 G71 P80 Q160 U1 W1 F50 N250 G00 X0 Z2
N080 G01 X10 N260 G74 R1
N090 Z0 N270 G74 X0 Z-25 Q500 F30
N100 X18 Z-4 N280 G28 U0 W0
N110 G01 Z-12 N290 M05
N120 G01 X24 Z-25 N300 M30
N130 G03 X34 Z-30 R5
N140 G01 Z-40
N150 G02 X44 Z-45 R5
N160 G01 X50 Z-48
N170 G70 P80 Q160
N180 M06 T0202
N190 M03 S1200
N200 G00 X0 Z2
N210 G74 R1
N220 G74 X0 Z-5 Q500 F30
N230 M06 T0303
N240 M03 S1500

EXERCISE – 12
Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 33
CIM & AUTOMATION LABORATORY

G71 FOR STOCK REMOVAL BORING

CH3 x 45v

R4
O12

O 28
O 20

O 35
10 3 5 12
[BILLET X35 Z35
N10 G21 G40 G98 Tool 1 – Centre Drill
N20 G28 U0 W0 Tool 2 – Drill bit 6 mm
N30 M06 T0101 Tool 3 – Drill Bit 12 mm
N40 M03 S1500 Tool 4 – Boring Bar 11 mm
N50 G00 X0 Z2
N60 G74 R1
N70 G74 X0 Z-5 Q500 F30
N80 G28 U0 W0
N90 M06 T0202 N240 G71 U0.5 R1
N100 M03 S1500 N250 G71 P260 Q320 U0.2 W0.2 F50
N110 G00 X0 Z2 N260 G01 X28
N120 G74 R1 N270 G01 Z0
N130 G74 X0 Z-25 Q500 F30 N280 G01 Z-8
N140 G28 U0 W0 N290 G03 X20 Z-12 R4
N150 M06 T0303 N300 G01 Z-17
N160 M03 S1500 N310 G01 X14 Z-20
N170 G00 X0 Z2 N320 G01 X12
N180 G74 R1 N330 G70 P260 Q320 F50
N190 G74 X0 Z-30 Q500 F30 N340 G28 U0 W0
N200 G28 U0 W0 N350 M05
N210 M06 T0404 N360 M30
N220 M03 S1200
N230 G00 X12 Z2

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 34
CIM & AUTOMATION LABORATORY

PRACTICE -01 PRACTICE -02

∅ 40
R5
∅ 20 O 30
∅15
R 10

O 20
O 40
15 15 15 10 10
25 5 25 20 15

PRACTICE -03 PRACTICE -04

O 40 O 34
10
R
O 35
R6

O 24
0
R1
R5
O 15
O 50

10 20 5 10 5 10 20 10 10 30 20

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 35
CIM & AUTOMATION LABORATORY

PRACTICE -05 PRACTICE -06

PRACTICE -07 PRACTICE -08

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 36
CIM & AUTOMATION LABORATORY

PRACTICE -09 PRACTICE -10

PRACTICE -11 PRACTICE -12

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 37
CIM & AUTOMATION LABORATORY

CNC – MILLING

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 38
CIM & AUTOMATION LABORATORY

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 39
CIM & AUTOMATION LABORATORY

“G” – CODES
G00 – Rapid Traverse (Positioning)

G01 – Linear Interpolation (Cutting Feed)

G02 – Circular Interpolation [Clockwise]

G03 – Circular Interpolation [Counter clockwise]

G20 – Imperial (Input in Inches)

G21 – Metric Dimensioning

G28 – Go to Reference

G40 – Cutter Radius compensation Cancel

G41 – Cutter Radius compensation Left

G42 – Cutter Radius compensation Right

G73 – Fast Peck Drilling Cycle

G74 – Counter Taping Cycle

G77 – Fine Boring Cycle

G80 – Cancel Canned Cycle

G82 – Counter Boring Cycle

G89 – Boring Cycle

G90 – Absolute Dimensioning (Movement)

G91 – Incremental Dimensioning (Movement)

G92 – Set Datum

G94 – Feed per Minute

G98 – Initial Level Return

G99 – R Point Return

G170
- Circular Pocket
G171

G172
- Rectangular Pocket
G173

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 40
CIM & AUTOMATION LABORATORY

DESCRIPTION FOR “G” CODES

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 41
CIM & AUTOMATION LABORATORY

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 42
CIM & AUTOMATION LABORATORY

G04 DWELL

A Dwell of up to 500 seconds can be programmed.

Example: G04 X10

This causes a delay in machining of 10 seconds.

G20 IMPERIAL UNITS

All future instruction parameters will be taken as Imperial values. That is, they will
specify Inches.

G21 METRIC UNITS

All future instruction parameters will be taken as Metric Units. That is, they will
specify Millimeters.

G28 GOTO REFERENCE POINT

A G28 causes a fast traverse to the specified position & then to the Machine
Datum.

Example: G28 X84 Y80 Z5

G40 CUTTER RADIUS COMENSATION CANCEL

G40 switches off any tool radius compensation activated by a G41 or G42.

G41 CUTTER RADIUS COMENSATION LEFT HAND

G41 causes future movement to take place to the left of the programmed path.
The offset used is equal to the radius of the current tool.

G42 CUTTER RADIUS COMENSATION RIGHT HAND

G42 causes future movement to take place to the right of the programmed path.
The offset used is equal to the radius of the current tool.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 43
CIM & AUTOMATION LABORATORY

G73 FAST PECK DRILLING CYCLE

Example: G73 X1 Y1 Z-5 Q0.3 R1 K1

“X” and “Y” are the next position to drill at. “Z” is the base of the hole. “Q” is the
shift value. “K” is the number of repetitions, it defaults to 1.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 44
CIM & AUTOMATION LABORATORY

G74 COUNTER TAPPING CYCLE

Example: G74 X1 Y1 Z-6 R1 P750 K1

“X” and “Y” are the next position to drill at. “Z” is the base of the hole. “R” is the R
point level.

‘P is 750 times the delay in seconds, “K” is the number of repetitions, and it defaults
to 1.

G81 SPOT BORING CYCLE

Example: G81 X1 Y1 Z-6 K1

“X” and “Y” are the next position to drill at. “Z” is the base of the hole. “K” is the
number of repetitions, it defaults to 1.

G82 COUNTER BORING CYCLE

Example: G82 X1 Y1 Z-6 P1000 K1

“X” and “Y” are the next position to drill at. “Z” is the base of the hole. “P” is 1000

G89 BORING CYCLE

Example: G89 X1 Y1 Z-5 P1000 K1

“X” and “Y” are the next position to drill at. “Z” is the base of the hole. “P” is 1000
times delay in seconds, “K” is the number of repetitions, it defaults to 1.

G90 ABSOLUTE MOVEMENT

All future movement will be absolute until over-ridden by a G91 instruction. This is
the default setting.

Example: G90

G01 X30 Y0, The position becomes X30 Y0

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 45
CIM & AUTOMATION LABORATORY

G91 INCREMENTAL MOVEMENT

All future movement will be Incremental until over-ridden by a G90 instruction.

Example: G90

G01 X15

G91

G01 X2, The position becomes X17

G92 SET DATUM

G92 sets the datum relative to the current position

Example: G00 X30 Y40

G92 X10 Y10 makes the position that was X30 Y40 become X-10 Y-10

G94 PER MINUTE FEED

The “F” value specifies the feed rate in millimeters, or inches, per minute.

G95 per revolution Feed

The “F” value is the ratio of feed rate to spindle speed. The feed rate is changed
whenever the spindle changes.

Example: G95 S 1200

G01 × 10.0 F0.3

This sets the feed rate to 360, (1200*0.3)

G98 INITIAL LEVEL RETURN

G98 sets the initial level return mode for drilling cycle.

G99 R POINT RETURN

G99 sets the R point return mode for drilling cycle.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 46
CIM & AUTOMATION LABORATORY

G CODES - G170 - G173 (CIRCULAR / RECTANGULAR POCKET CYCLES).

The following canned cycles, when programmed correctly, will machine either a circular
pocket to any side length and depth.

Both canned cycles required two blocks of information each; with each block having its own
G code:

G170
- Circular Pocket
G171

G172
- Rectangular Pocket
G173

G CODES‐G170 ‐G171 (CIRCULAR POCKET CANNED CYCLES).

Definition for the terms used in the G170 and G171 circular pocket canned cycle as follows:

N0080 G170 R0 P0 Q3 X0 Y0 Z‐6 I0 J0 K‐24:

N0090 G171 P75 S3000 R75 F250 B3500 J200:

For G170 block,

R Defines the position of the tool to start cycle ie. Q (surface of job)
P Define when P is zero (0) the cycle is a roughing cycle.
Q Defines the peck increment in program number 0002, 2 peck each of 3mm.
X Defines the pocket center in X axis (0).
Y Defines the pocket center in Y axis (0).
Z Defines the pocket base (‐6mm) from job surface.
I Defines the side finish allowance (0 as this a roughing cycle only).
J Defines the side finish allowance (0 as this a roughing cycle only).
K Defines the radius of pocket (‐24) negative value cut in CCW direction).

For G171 block

P Defines the cut with percentage.


S defines the roughening spindle speed (S3000).
R Defines the roughing feed in Z (175).
F Defines the roughing feed in XY (250).
B Defines the finishing spindle speed (3500, not applicable as roughing only).
J Defines the finishing feed (200, not applicable as roughing only).

The direction of the cutter path is controlled by K, a negative (k‐24) value for K means the cutter path is in
a CCW direction and if the k value is positive (k+24) the cutter path is in a CW direction. The Q value is
always positive (Q+3).

When the tool has finished cutting the tool retracts 1mm in the Z axis, moves the center of the circular
pocket at rapid traverse, and retracts again in the Z axis. The above Program is for a two cut roughing
cycle.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 47
CIM & AUTOMATION LABORATORY

G CODES‐G172 ‐G173 (RECTANGULAR POCKET CANNED CYCLES)


Definition for the terms used in the G172 and G173 rectangular pocket canned cycle is as follows:

G172 I‐50 K0 P0 Q3 R0 X‐25 Y‐25 Z‐6:


G173 I0 K0 P75 T1 S300 R75 F250 B3500 J200 Z5:

For G172 block,


I Defines the pocket X length (‐50).
J Defines the pocket Y length (‐50).
K Defines the radius of the corner roughness (not applicable to denford software).
P Defines that 0=roughing cycle.
Q Defines the pocket Z increment (peck increment in above cycle 2‐3mm peck).
R Defines the Absolute Z ‘R’ point.
X Defines the pocket corner Y (Absolute position relative to the Y datum position).
Y Defines the pocket corner X (Absolute position relative to the X datum position).
Z Defines the absolute Z base of pocket (‐6 ie a depth of 6mm).

For G173 block

I Defines the pocket side finish (0 as this is a roughing cycle).


K Defines the pocket side finish (0 as this is a roughing cycle).
P Defines the cut with percentage (75% of tool dia).
T Defines the pocket tool (tool 1).
S defines the spindle speed for roughing (3000 rpm).
R Defines the roughing feed in Z (175).
F Defines the roughing feed for X and Y (250).
B Defines the finishing spindle speed (3500, rpm).
J Defines the finishing feed (200).
Z Defines the safety Z (5mm above ‘R’ point).

This Program is for a two cut roughing cycle.

G CODES‐G172 ‐G173 (RECTANGULAR POCKET CANNED CYCLES EXAMPLE A).


For G172 block

The I and J are signed according to the direction of travel +/positive being CW and ‐/negative being CCW.

K must be programmed as 0 (zero). For denford software, the corner radius is the cutter radius.

X and Y relate to an absolute zero on the work piece, ie, the center of the work piece. In program number 0005,
the zero is set in the center of the work piece so the distance to the bottom LH corner is Y ‐25 and X‐25, as shown
below.

For G173 block:

If I and K are set to zero (0), the program will perform the two roughing cuts only (as in the circular pocket canned
cycle). The tool number (T1) must be programmed.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 48
CIM & AUTOMATION LABORATORY

“M” – CODES
M00 – Program Stop

M01 – Optional Stop

M02 – End of Program

M03 – Spindle Start Forward (CW)

M04 – Spindle Reverse (CCW)

M05 – Spindle Stop

M06 – Automatic Tool Change

M08 – Coolant On

M09 – Coolant Off

M10/11 – Work Clamp Open / Close

M30 – Program End

M98 – Sub Program Call

M99 – Sub Program End

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 49
CIM & AUTOMATION LABORATORY

DESCRIPTION FOR “M” CODES


M00 PROGRAM STOP

M00 waits for EOB to be pressed.

M01 OPTIONAL STOP

M02 / M30 END OF PROGRAM

M02 halts program execution. The spindle is turned off and the tool moves to the
most positive on the Z axis.

M03 START SPINDLE

An M03 instruction starts forward spindle motion. It requires a speed within the
range of 100 to 3000 rpm.

Example: M03 S1000

The spindle should be switched on before any movement below the component
surface.

M04 REVERSE SPINDLE

An M04 instruction starts reverse spindle motion. It requires a speed within the
range of 100 to 3000 rpm.

Example: M04 S1000

The spindle should be switched on before any movement below the component
surface.

M05 STOP SPINDLE

An M05 instruction stops spindle rotation. It is good programming practice to issue


an M05 before a tool change, and at the end of a program. However, this will be
done automatically should you omit this instruction.

M06 AUTOMATIC TOOL CHANGE

The M06 instruction causes the Fanuc to change to a different tool.

Example: M06 T1

You can set tool lengths and diameters at the start of the program using the TOOL
DEF directive

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 50
CIM & AUTOMATION LABORATORY

M08 COOLANT ON

M08 turns the coolant on.

M09 COOLANT OFF

M08 turns the coolant off.

M10/11 WORK CLAMP OPEN/CLOSE

M10 Opens the work clamp.

M11 Closes the work clamp.

M98 SUB PROGRAM CALL

M98 Causes another program to be executed.

The “P” value specifies the program number & the number of times to execute it.

The rightmost 4 digits are the Program Number. The digits to the left are the
number of repetitions. There can be up 999 repetitions, if the value is omitted it is
called once.

Example: M98 P12 and M98 P10 012 both execute one program 12 once.

M99 SUB PROGRAM EXIT

Returns control to the program that called the current program. If a “P” value is
specified then execution begins from the block with the same “N” number, otherwise
it is from the block after the subprogram call.

If an M99 is specified in the main program then the execution is from the start of
the program.

Example; M99

Returns to the block following the call.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 51
CIM & AUTOMATION LABORATORY

EXERCISE – 01 Contouring (Simulation of Tool Path)

90

[30,60] [60,60]

R 15

90
[30,30] [60,30]
+Y
[X0,Y0,Z0]
+X
-z

[BILLET X90 Y90 Z20 - Billet size


[EDGEMOVE X0 Y0 - Position of Datum from the bottom LH corner of Billet
[TOOLDEF T1 D4 - Tool No, Tool Diameter
G91 G28 X0 Y0 Z0 - Metric, Reference point
M06 T1 - Automatic Tool Change, Tool No.
G90 M03 S1200 - Absolute, Spindle Start, Spindle Speed
G00 X30 Y30 Z2 - Rapid, Tool moves 2 mm above surface
G01 X30 Y30 Z-5 F100 - Tool to surface of the Job, Feed set,
X60 Y30 - Tool coordinate movements
X60 Y60
X30 Y60
X30 Y30
X60 Y60
G02 X60 Y30 R15
G01 X30 Y60
G03 X30 Y30 R15
G00 Z5 M05 - Rapid, Tool to move 5mm above surface, Spindle Stop
G91 G28 X0 Y0 Z0 - Incremental, Return to reference point.
M30 - Program End.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 52
CIM & AUTOMATION LABORATORY

EXERCISE - 02

[BILLET X120 Y100 Z20


[EDGEMOVE X0 Y0
[TOOLDEF T1 D5 (End Mill Dia 5 mm)
G91 G28 X0 Y0 Z0
M06 T1
G90 M03 S1200
G00 X15 Y10 Z2
G01 X15 Y10 Z-5 F40
X35
X50 Y35
X65 Y10
X85
G03 X105 Y30 R20
G01 X105 Y90
X85
Y65
X55
Y90
X35
G03 X15 Y70 R20
G01 X15 Y10
G00 Z5 MO5
G91 G28 X0 Y0 Z0
M30

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 53
CIM & AUTOMATION LABORATORY

EXERCISE - 03, G83 PECK DRILLING CYCLE

10

20
50
O
+Y

15
[X0,Y0,Z0]

-z +X

20
50
[BILLET X50 Y50 Z20
[EDGEMOVE X0 Y0
[TOOLDEF T1 D10 (Drill Bit Dia 10 mm)
G91 G28 X0 Y0 Z0
M06 T1
G90 M03 S1200
G00 X15 Y15 Z2
G83 G99 X15 Y15 Z-18 Q5 R2 F100
G00 X35 Y15 Z2
G83 G99 X35 Y15 Z-18 Q5 R2 F100
G00 X35 Y35 Z2
G83 G99 X35 Y35 Z-18 Q5 R2 F100
G00 X15 Y35 Z2
G83 G99 X15 Y35 Z-18 Q5 R2 F100
G00 Z2 M05
G91 G28 X0 Y0 Z0
M30

FORMAT: G83 G99 X__ Y__ Z__ Q__ R__ F___


R2 ► Tool position 2mm above the work piece surface /datum.
Z-18 ► Final depth.
Q5 ► Peck Increment [i.e., Every time cutter cuts to a depth of 5mm & goes up
2 mm above the datum because of R2].
G99 ► Set the R point return mode for drilling cycles.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 54
CIM & AUTOMATION LABORATORY

EXERCISE - 04,

PECK DRILLING CYCLE & SUB-PROGRAMING

0004
[BILLET X120 Y100 Z21
[EDGEMOVE X0 Y0
[TOOLDEF T1 D10
[TOOLDEF T2 D5
G91 G28 Z0 X0 Y0
M06 T1
G90 M03 S1000
G00 X35 Y37.5 Z2
G83 G99 X35 Y37.5 Z-20 Q5 R2 F100
G00 X60 Y37.5 Z2
G83 G99 X60 Y37.5 Z-20 Q5 R2 F100
G00 X85 Y37.5 Z2
G83 G99 X85 Y37.5 Z-20 Q5 R2 F100
G00 X85 Y62.5 Z2
G83 G99 X85 Y62.5 Z-20 Q5 R2 F100
G00 X60 Y62.5 Z2
G83 G99 X60 Y62.5 Z-20 Q5 R2 F100
G00 X35 Y62.5 Z2
G83 G99 X35 Y62.5 Z-20 Q5 R2 F100
G00 Z5
G91 G28 Z0 4000
M06 T2 M98 P0014001
G90 M03 S1200 G01 X90 Y12.5 F100
G00 X30 Y12.5 Z2 G02 X110 Y32.5 R20
G01 Z-1 G01 X110 Y67.5
M98 P0014000 G03 X90 Y87.5 R20
M98 P0014000 G01 X30
M98 P0014000 G03 X10 Y67.5 R20
M98 P0014000 G01 Y32.5
M98 P0014000 G02 X30 Y12.5 R20
G00 Z2 M05 M99
G91 G28 Z0 X0 Y0
M30 4001
G91 G01 Z-1 F50
G90
M99

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 55
CIM & AUTOMATION LABORATORY

EXERCISE - 05, CIRCULAR POCKET

0005

[BILLET X90 Y75 Z21


[EDGEMOVE X0 Y0
[TOOLDEF T1 D10 (Drill Dia 10 mm)
[TOOLDEF T2 D6 (End Mill Dia 6 mm)
G91 G28 X0 Y0 Z0
M06 T1 M03 S3000
G90 G00 X45 Y37.5 Z2
G83 G99 X45 Y37.5 Z-20 Q5 R1 F100
G00 Z5
M06 T2 M03 S2000
G90 G00 X45 Y37.5 Z5
G170 R0 P0 Q2 X45 Y37.5 Z-6 I0 J0 K-25
G171 P75 S3000 R75 F250 B3500 J200
G00 Z5 M05
G91 G28 X0 Y0 Z0
M30

FORMAT:
G170 R0 P0 Q2 X45 Y37.5 Z-6 I0 J0 K-25
R : Defines the position of the tool to start cycle (Zero (0) i.e. Surface of job)
P : Defines when P is Zero (0) the cycle is roughing cycle.
Q : Defines the Peck increment, in above progm. 3 peck each of 2 mm.
X : Defines the Pocket centre in X axis
Y : Defines the Pocket centre in Y axis
Z : Defines the pocket base (Depth-6mm) from job Surface
I : Defines the side finish allowance (0 as this is a roughing cycle)
J : Defines the side finishes allowance (0 as this a roughing cycle only).
K : Defines the radius of pocket (-25) negative value cut in CCW direction).

G171 P75 S3000 R75 F250 B3500 J200


P : Defines the cut width percentage.
S : Defines the roughening spindle speed (S3000).
R: Defines the roughing feed in Z (75).
F : Defines the roughing feed in XY (250).
B : Defines the finishing spindle speed (3500, not applicable as roughing only).
J : Defines the finishing feed (200, not applicable as roughing only).

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 56
CIM & AUTOMATION LABORATORY

EXERCISE - 06
0006

[BILLET X100 Y100 Z20


[EDGEMOVE X0 Y0
[TOOLDEF T1 D10
[TOOLDEF T2 D5
G91 G28 Z0 X0 Y0
M06 T1 M03 S3000
G90 G00 X50 Y50 Z5
G170 R0 P0 Q2 X50 Y50 Z-5 I0 J0 K-15
G171 P50 S3000 R75 F50 B3500 J200
G00 Z5
G91 G28 Z0
M06 T2 M03 S3000
G90 G00 X20 Y20 Z5
G00 Z0
M98 P0016000
M98 P0016000
M98 P0016000
M98 P0016000
M98 P0016000
G00 Z5
G91 G28 Z0 X0 Y0
M05 M30

6000
M98 P0016001
G01 X40 Y20 F200
G03 X60 Y20 R10
G01 X80
G01 Y40
G03 X80 Y60 R10 6001
G01 Y80 G91 G01 Z-1 F50
G01 X60 G90
G03 X40 Y80 R10 M99
G01 X20
G01 Y60
G03 X20 Y40 R10
G01 Y20
M99

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 57
CIM & AUTOMATION LABORATORY

EXERCISE - 07, MULTIPLE POCKET MILLING


4 HOLES OF
O 25 MM &
5 MM DEPTH
25

30
50
25
1 00
100

0007
[BILLET X100 Y100 Z30
[EDGEMOVE X0 Y0
[TOOLDEF T1 D5
G91 G28 Z0 X0 Y0
M06 T1 M03 S3000
G90 G00 X25 Y25 Z5
G170 R0 P0 Q2 X25 Y25 Z-5 I0 J0 K-12.5
G171 P50 S3000 R75 F50 B3500 J200
G170 R0 P0 Q2 X75 Y25 Z-5 I0 J0 K-12.5
G171 P50 S3000 R75 F50 B3500 J200
G170 R0 P0 Q2 X75 Y75 Z-5 I0 J0 K-12.5
G171 P50 S3000 R75 F50 B3500 J200
G170 R0 P0 Q2 X25 Y75 Z-5 I0 J0 K-12.5
G171 P50 S3000 R75 F50 B3500 J200
G00 Z5 M05
G91 G28 Z0 X0 Y0
M30

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 58
CIM & AUTOMATION LABORATORY

EXERCISE - 08, RECTANGULAR POCKET

0008
[BILLET X100 Y100 Z30
[EDGEMOVE X0 Y0
[TOOLDEF T1 D8 Z0
G91 G28 X0 Y0
M06 T1 S3000 M03
G90 G00 X50 Y50 Z2
G172 I40 J40 K0 P0 Q3 R0 X30 Y30 Z-5
G173 I0 K0 P75 T1 S3000 R75 F200 B3500 J200 Z5
G00 Z5 M05
G91 G28 X0 Y0 Z0
M30

Format:

G172 I40 J40 K0 P0 Q3 R0 X30 Y30 Z‐5:

I Defines the pocket X length (40).


J Defines the pocket Y length (40).
K Defines the radius of the corner roughness (not applicable to FUNUC software).
P Defines that 0 = Roughing cycle, 1 = Finishing Cycle.
Q Defines the pocket Z increment (peck increment in above cycle 2‐3mm peck).
R Defines the Absolute Z ‘R’ point.
X Defines the pocket corner Y (Absolute position relative to the Y datum position).
Y Defines the pocket corner X (Absolute position relative to the X datum position).
Z Defines the absolute Z base of pocket (‐5 ie a depth of 6mm).

G173 I0 K0 P75 T1 S300 R75 F250 B3500 J200 Z5:

I Defines the pocket side finish (0 as this is a roughing cycle).


K Defines the pocket side finish (0 as this is a roughing cycle).
P Defines the cut with percentage (75% of tool dia).
T Defines the pocket tool (tool 1).
S defines the spindle speed for roughing (3000 rpm).
R Defines the roughing feed in Z (175).
F Defines the roughing feed for X and Y (250).
B Defines the finishing spindle speed (3500, rpm).
J Defines the finishing feed (200).
Z Defines the safety Z (5mm above ‘R’ point).

This Program is for a two cut roughing cycle.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 59
CIM & AUTO
OMATION LAB
BORATORY

CISE - 09
EXERC 0

000
09
[BILLET X100 Y100 Z21
1
[EDGGEMOVE X-10 Y-100
[TOOOLDEF T1 D8
[TOOOLDEF T2 D5
G91 G28 X0 Y0
Y Z0
M066 T1 S3000
0 M03
G90 G00 X50 Y50 Z2
G172 I30 J30 K0 P1 Q3
3 R0 X30 Y30
Y Z-5
G173 I0 K0 P7
75 T1 S3000 R75 F2
20 B3500 J200 Z5
G00 Z5
M066 T2 S3000
0 M03
G90 G00 X20 Y0 Z5
G00 Z0
M988 P0019000
M988 P0019000
M988 P0019000
M988 P0019000
M988 P0019000
G00 Z5 M05
G91 G28 X0 Y0
Y Z0
M300

9000
0
M98
8 P0019001
G01 X60 Y0 F250
F
G03 X80 Y20 R20
G01 Y60
G02 X60 Y80 R20
G01 X20
G02 X0 Y60 R20
R
G01 Y20
G03 X20 Y0 R20
R
9
M99

9001
G91 G01 Z-2 F50
F
G90
9
M99

Copyright © 2013 @Deptt. of Mechaniical Engg, Ach


C harya Institu
ute of Tech., Bangalore‐10
B 07 Paage ‐ 60
CIM & AUTOMATION LABORATORY

EXERCISE - 10,
3000
[BILLET X150 Y150 Z11
[EDGEMOVE X-10 Y-10
[TOOLDEF T1 D10
[TOOLDEF T2 D5
G91 G28 Z0 X0 Y0
G90 M06 T1 M03 S1000
G00 X65 Y15 Z2
G83 G99 X65 Y15 Z-10 Q5 R1 F100
G00 X65 Y65 Z2
G83 G99 X65 Y65 Z-10 Q5 R1 F100
G00 X65 Y115 Z2
G83 G99 X65 Y115 Z-10 Q5 R1 F100
G00 X115 Y65 Z2
G83 G99 X115 Y65 Z-10 Q5 R1 F100
G00 X25 Y60 Z2
G83 G99 X15 Y65 Z-10 Q5 R1 F100
G00 Z5
G91 G28 Z0
M06 T2 G90 M03 S1200
G00 X50 Y40 Z2
G01 Z-1
M98 P0013000
M98 P0013000
M98 P0013000
M98 P0013000
M98 P0013000
G00 Z2 M05
G91 G28 Z0 X0 Y0
M30

3000
M98 P0013001
G01 X50 Y15 F100 3001
G03 X80 Y15 R15 G91 G01 Z-1 F50
G01 Y40 G90
G02 X90 Y50 R10 M99
G01 X115
G03 X115 Y80 R15
G01 X90
G02 X80 Y90 R10
G01 Y115
G03 X50 Y115 R15
G01 Y90
G02 X40 Y80 R10
G01 X15
G03 X15 Y50 R15
G01 X40
G02 X50 Y40 R10
M99

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 61
CIM & AUTOMATION LABORATORY

EXERCISE - 11,

[BILLET X150 Y150 Z25


[EDGEMOVE X0 Y0
[TOOLDEF T1 D20
[TOOLDEF T2 D10
G91 G28 Z0 X0 Y0
M06 T1 M03 S3000
G90 G00 X75 Y75 Z5
G170 R0 P0 Q5 X75 Y75 Z-5 I0 J0 K-60
G171 P50 S3000 R75 F50 B3500 J200
G00 Z5
M06 T2 M03 S3000
G90 G00 X60 Y60 Z0
G172 I60 J40 K0 P0 Q5 R-5 X30 Y40 Z-10
G173 I0 K0 P50 T1 S3000 R75 F20 B3500 J200 Z5
G90 G00 X80 Y105 Z0
G172 I40 J40 K0 P0 Q5 R-5 X60 Y85 Z-10
G173 I0 K0 P50 T1 S3000 R75 F20 B3500 J200 Z5
G00 Z5 M05
G91 G28 Z0 X0 Y0
M30

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 62
CIM & AUTOMATION LABORATORY

EXERCISE - 12,

[BILLET X100 Y75 Z21


[EDGEMOVE X0 Y0
[TOOLDEF T1 D10 2000
[TOOLDEF T2 D10 M98 P0012001
G91 G28 Z0 X0 Y0 G01 X100 Y0 F200
M06 T1 M03 S3000 G01 X100 Y75
G90 G00 X50 Y37.5 Z5 G01 X0 Y75
G170 R0 P0 Q5 X50 Y37.5 Z-5 I0 J0 K-20 G01 X0 Y5
G171 P50 S3000 R75 F250 B3500 J200 G01 X95 Y5
G00 X0 Y0 Z0 G01 X95 Y70
M98 P0012000 G01 X5 Y70
M98 P0012000 G01 X5 Y15
M98 P0012000 G02 X15 Y5 R10
M98 P0012000 G01 X85 Y5
M98 P0012000 G02 X95 Y15 R10
G00 Z5 G01 X95 Y60
G90 M06 T2 M03 S1000 G02 X85 Y70 R10
G00 X10 Y10 Z2 G01 X15 Y70
G83 G99 X10 Y10 Z-20 Q5 R1 F100 G02 X5 Y60 R10
G00 X90 Y10 Z2 G00 X0 Y0
G83 G99 X90 Y10 Z-20 Q5 R1 F100 M99
G00 X90 Y65 Z2
G83 G99 X90 Y65 Z-20 Q5 R1 F100
G00 X10 Y65 Z2 2001
G83 G99 X10 Y65 Z-20 Q5 R1 F100 G91 G01 Z-2 F50
G00 Z5 G90
G91 G28 Z0 X0 Y0 M99
M05 M30
Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 63
CIM & AUTOMATION LABORATORY

MILL EX‐01

MILL EX‐02

MILL EX‐03

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 64
CIM & AUTO
OMATION LAB
BORATORY

MILL EX‐0
04

MILL EX‐0
05

MILL EX‐0
06

Copyright © 2013 @Deptt. of Mechaniical Engg, Ach


harya Institu
ute of Tech., Bangalore‐10
07 Paage ‐ 65
CIM & AUTO
OMATION LAB
BORATORY

MILL EX‐0
07

MILL EX‐0
08

MILL EX‐0
09

Copyright © 2013 @Deptt. of Mechaniical Engg, Ach


harya Institu
ute of Tech., Bangalore‐10
07 Paage ‐ 66
CIM & AUTOMATION LABORATORY

MILL EX‐10

MILL EX‐11

MILL EX‐12

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 67
CIM & AUTOMATION LABORATORY

VIVA QUESTIONS
1. Define CIM & Automation.
2. What do you understand by Numerical Control?
3. What are the basic components of NC system?
4. Mention the major components of the CNC machine?
5. What is the expansion of FANUC?
6. What are the important lathe operations?
7. What are the important milling operations?
8. Explain about G codes?
9. Mention few important G codes?
10. What is the use of M codes?
11. Mention few important M codes?
12. What is the use of box facing cycle?
13. What is the difference between G00 and G01codes?
14. How to make taper turning in lathe?
15. What is the code for canned cycle?
16. How to cut the thread in CNC lathe?
17. How to change the tool in CNC program?
18. How to change the tool speed in CNC lathe?
19. What is the difference between absolute and incremental system?
20. What are the axes to be considered while writing program for CNC lathe?
21. What is the file extension of CNC program?
22. What are the codes for coolants on or off?
23. What is the G code for Circular pocketing?
24. What is the G code for Rectangular pocketing?
25. How to change the depth of cut in milling operation?
26. What is the use of mirroring?
27. What are the functional keys used in FUNUC programming?
28. What is use of dry run option?
29. Differentiate between Manual part Promg. & Computer Assisted Part Promg.
30. Differentiate between Absolute and Incremental Positioning.
31. List important NC part programming languages.
32. List deferent types of CAM or Simulation software
33. What are the four types of statements in APT Languages?
34. Differentiate NC and CNC.
35. Discuss DNC and adaptive control machine systems.
36. What is the specification of CNC turning center in the CIM Lab.
37. List few standard CNC Controllers.

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 68
CIM & AUTOMATION LABORATORY

38. Which controller is used for CNC Lathe in the CIM lab?
39. Write sketch showing axis definitions for turning and milling operations.
40. What are the G codes for the following?
a. Rapid Traverse (or Positioning)
b. Traverse at Feed rate
c. Circular Interpolation
d. Dwell
e. Go to Home position
f. Metric Units
g. Feed/Min and Feed/Rev.,
41. Differentiate CSS (Constant Surface Speed) and variable speed. What are the
codes used?
42. Write the relationship between cutting speed (mm/Min and Spindle Speed
(rpm).
43. Explain the format of the following cycles.
a. G71 – Turning Cycle
b. G76 – Threading Cycle
44. What are M codes for the following
a. Spindle On & Off
b. Coolant On & Off
c. Chuck open & Chuck close
d. Tool Exchange
e. Door open & Door close
45. Where do you use the following M Codes? M98 and M99
46. What is tool length compensation?
47. What is cutter radius compensation?
48. What are the G codes used for cutter compensation in milling?
49. Differentiate 1) Part surface 2) Drive surface 3) Chuck surface
50. write process planning for the given component
51. What do you understand by the term offline simulation software?
52. Define Robot
53. Classify Robots based on physical configuration.
54. What are Degrees of freedom in robot?
55. What are the various methods of programming of robot?
56. List few Robot programming languages.
57. List few Robot applications.
58. List different types of Robot Sensors.
59. Explain parts classifications and coding
60. What are the benefits of group Technology?

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 69
CIM & AUTOMATION LABORATORY

ROUGH WORK

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 70
CIM & AUTOMATION LABORATORY

ROUGH WORK

Copyright © 2013 @Dept. of Mechanical Engg, Acharya Institute of Tech., Bangalore‐107 Page ‐ 71

S-ar putea să vă placă și