0% found this document useful (0 votes)
75 views9 pages

Lecture 12 (Lab) Learning Numeric Coding - Lathe

The document discusses an introduction to mechatronics design fundamentals lecture. It covers common G-codes and M-codes used in computer numerical control (CNC) machining. It then provides steps to set up a simulator, including loading a lathe machine model and defining a workpiece. It presents a lab task to write G-code for milling a square box shape into a workpiece sheet, including cutting the first letter of the student's name at a shallower depth inside the box.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views9 pages

Lecture 12 (Lab) Learning Numeric Coding - Lathe

The document discusses an introduction to mechatronics design fundamentals lecture. It covers common G-codes and M-codes used in computer numerical control (CNC) machining. It then provides steps to set up a simulator, including loading a lathe machine model and defining a workpiece. It presents a lab task to write G-code for milling a square box shape into a workpiece sheet, including cutting the first letter of the student's name at a shallower depth inside the box.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

RIME-221 Introduction to

Mechatronics Design
Fundamentals
LEC. TAYYAB SHAHID

Lecture 11
Objective
Exploring more tasks at hand

Learning the automation and Robotics

SCHOOL OF MECHANICAL AND MANUFACTURING ENGINEERING 2


NUST
Common G-codes
G00 - Positioning at rapid speed; Mill and Lathe G31 - Skip function; Mill and Lathe G73 - Chip break drilling cycle; Mill
G01 - Linear interpolation (machining a straight line); Mill G32 - Thread cutting; Lathe G74 - Left hand tapping; Mill
and Lathe G33 - Thread cutting; Mill G74 - Face grooving or chip break drilling; Lathe
G02 - Circular interpolation clockwise (machining arcs); G40 - Cancel diameter offset; Mill. Cancel tool nose offset; G75 - OD groove pecking; Lathe
Mill and Lathe Lathe G76 - Fine boring cycle; Mill
G03 - Circular interpolation, counter clockwise; Mill and G41 - Cutter compensation left; Mill. Tool nose radius G76 - Threading cycle; Lathe
Lathe compensation left; Lathe G80 - Cancel cycles; Mill and Lathe
G04 - Mill and Lathe, Dwell G42 - Cutter compensation right; Mill. Tool nose radius G81 - Drill cycle; Mill and Lathe
G09 - Mill and Lathe, Exact stop compensation right; Lathe G82 - Drill cycle with dwell; Mill
G10 - Setting offsets in the program; Mill and Lathe G43 - Tool length compensation; Mill G83 - Peck drilling cycle; Mill
G12 - Circular pocket milling, clockwise; Mill G44 - Tool length compensation cancel; Mill (sometimes G84 - Tapping cycle; Mill and Lathe
G13 - Circular pocket milling, counterclockwise; Mill G49) G85 - Bore in, bore out; Mill and Lathe
G17 - X-Y plane for arc machining; Mill and Lathe with live G50 - Set coordinate system and maximum RPM; Lathe G86 - Bore in, rapid out; Mill and Lathe
tooling G52 - Local coordinate system setting; Mill and Lathe G87 - Back boring cycle; Mill
G18 - Z-X plane for arc machining; Mill and Lathe with live G53 - Machine coordinate system setting; Mill and Lathe G90 - Absolute programming
tooling G54~G59 - Workpiece coordinate system settings #1 t0 #6; G91 - Incremental programming
G19 - Z-Y plane for arc machining; Mill and Lathe with live Mill and Lathe G92 - Reposition origin point; Mill
tooling G61 - Exact stop check; Mill and Lathe G92 - Thread cutting cycle; Lathe
G20 - Inch units; Mill and Lathe G65 - Custom macro call; Mill and Lathe G94 - Per minute feed; Mill
G21 - Metric units; Mill and Lathe G70 - Finish cycle; Lathe G95 - Per revolution feed; Mill
G27 - Reference return check; Mill and Lathe G71 - Rough turning cycle; Lathe G96 - Constant surface speed control; Lathe
G28 - Automatic return through reference point; Mill and G72 - Rough facing cycle; Lathe G97 - Constant surface speed cancel
Lathe G73 - Irregular rough turning cycle; Lathe G98 - Per minute feed; Lathe
G29 - Move to location through reference point; Mill and G99 - Per revolution feed; Lathe
Lathe (slightly different for each machine)

SCHOOL OF MECHANICAL AND MANUFACTURING ENGINEERING


NUST 3
Common M-Codes
M00 - Program stop; Mill and Lathe
M01 - Optional program stop; Lathe and Mill
M02 - Program end; Lathe and Mill
M03 - Spindle on clockwise; Lathe and Mill
M04 - Spindle on counterclockwise; Lathe and Mill
M05 - Spindle off; Lathe and Mill
M06 - Toolchange; Mill
M08 - Coolant on; Lathe and Mill
M09 - Coolant off; Lathe and Mill
M10 - Chuck or rotary table clamp; Lathe and Mill
M11 - Chuck or rotary table clamp off; Lathe and Mill
M19 - Orient spindle; Lathe and Mill
M30 - Program end, return to start; Lathe and Mill
M97 - Local sub-routine call; Lathe and Mill
M98 - Sub-program call; Lathe and Mill
M99 - End of sub program; Lathe and Mill

SCHOOL OF MECHANICAL AND MANUFACTURING ENGINEERING


NUST 4
Setting up the simulator
First of all, we need to set millimeters as units and load an
appropriate machine for our project.

From the main menu, select Settings and click on Settings.

Ensure that you have millimeters selected as this tutorial is


made in millimeters.

SCHOOL OF MECHANICAL AND MANUFACTURING ENGINEERING


NUST 5
Setting up the simulator (Contd.)
Load Machine from the main menu or click the open machine
button

Double-click on the Milling folder.

In the dialog that shows, please deselect “Load demo”. Then


select the “Lathe Center” machine and click Open.

SCHOOL OF MECHANICAL AND MANUFACTURING ENGINEERING


NUST 6
Setting up the simulator (Contd.)
Fine, now let’s get started by defining our
workpiece. Press F2 on the keyboard to open the
Inventory Browser.
Click on the “Mill Workpieces” tab at the top of
the dialog.
Click on the green plus button to add a new
workpiece.
Change its size and then select OK.
Last to call your workplace, type this command
$AddRegPart (Workpiece Name) X Y positions on
the tool

SCHOOL OF MECHANICAL AND MANUFACTURING ENGINEERING


NUST 7
Lab Task 1
Write a G code for this Drawing and take the thickness of
this sheet as 10 mm. All values are in mm. The square box
dimension are 20 by 20. The depth of cut for square box
is 6mm

20
To reduce the chance of plagiarism, remember to
machine the first acronym of your name inside the box.
You can assume the dimensions but the cut depth should

10
be 3mm

15 20
Share the task pictures and G-Code at the end of lecture
because it would be graded!

8
Thank You

You might also like