Cad Lab Manual - Muj

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 29

MANIPAL UNIVERSITY JAIPUR

DEHMI KALAN, JAIPUR – 303007.

DEPARTMENT OF MECHANICAL
ENGINEERING
(SAMM)

BTECH-ME
ME1734 – COMPUTER AIDED DESIGN LAB

LAB-MANUAL

REGISTER NO. :

NAME :

SEM. / YEAR :

Prepared By: Approved By:


1. Mr. Rakesh Kumar
2. Dr. Saurabh Devangan Dr. Rahul Goyal
Course Instructor Head of the Department
Dr. Rahul Goyal

Course Instructor Head of the Department


MANIPAL UNIVERSITY JAIPUR
1. Introduction to ANSYS and Finite Element Method

Background

ANSYS is a finite element analysis (FEA) software package. It uses a preprocessor software
engine to create geometry. Then it uses a solution routine to apply loads to the meshed
geometry. Finally it outputs desired results in post-processing.
Finite element analysis was first developed by the airplane industry to predict the behavior of
metals when formed for wings. Now FEA is used throughout almost all engineering design
including mechanical systems and civil engineering structures.
ANSYS is used throughout industry in many engineering disciplines. This software package
was even used by the engineers that investigated the World Trade Center collapse in 2001.
More information about the ANSYS FEA package and other ANSYS products can be found
at <www.ansys.com>.

• FEM grew out of aerospace industry and mainly post-WW II jets, missiles, space flight
• First developed in 1943 by R. Courant- utilized Ritz method of numerical analysis and
minimization of variational calculus to obtain approximate solutions to vibration
systems.
• By early 1970s- start of mainframe computers owned by the aeronautics, automotive,
defense, and nuclear industries

Familiarizing Yourself with ANSYS

Figure 1: ANSYS Main Menu

The fastest, easiest and most logical way to use ANSYS is through the Main Menu located
on the far left-hand side of the screen (Figure 1). It may look intimidating at first glance
however think about the information that you need to solve for all of the components in a
structure. You need to know the position, length, and material of the structural members, the
position, magnitude and direction of all the loads on the structure, and the constraints on the
structure. In order to get ANSYS to work properly, you simply need to tell the program this
information and it will do the rest for you!
MANIPAL UNIVERSITY JAIPUR

The Main Menu is designed so that you complete the steps required to build your model by
beginning at the top of the menu and working your way down. For the purposes of this
tutorial, you will need to be familiar with three of the commands on the Main Menu:
Preprocessor, Solution, and Post-processor (noted as General Postproc on the ANSYS main
menu) – these are the first three commands on the Main Menu. The construction steps to be
accomplished in each command are listed below:
Preprocessor Solution Post-processor
1. Member length 1. Load position Get displacement member
2. Member position 2. Load magnitude force data in both graphical
3. Member material 3. Load direction and text output.

You will use this Main Menu just like Windows Explorer or any other function that is
organized in a “tree fashion”.
You should complete these three major steps: (1) Preprocessing stage, (2) Solution, and (3)
Post-processing stage in the order given. If you do not, ANSYS will not know how to
properly solve your structure and give you bad results.

2. Typical ANSYS Analysis

The ANSYS program has many finite element analysis capabilities, ranging from a simple,
linear, static analysis to a complex, nonlinear, transient dynamic analysis. The analysis guide
manuals in the ANSYS documentation set describe specific procedures for performing
analyses for different engineering disciplines.

A typical ANSYS analysis has three distinct steps:


_ Build the model.
_ Apply loads and obtain the solution.
_ Review the results.

Building a Model
Building a finite element model requires more of an ANSYS user's time than any other part
of the analysis. First, you specify a job name and analysis title. Then, you use the PREP7
preprocessor to define the element types, element real constants, material properties, and the
model geometry.

Specifying a Job name and Analysis Title


This task is not required for an analysis, but is recommended.

Defining the Job name


The job name is a name that identifies the ANSYS job. When you define a job name for an
analysis, the job name becomes the first part of the name of all files the analysis creates. (The
extension or suffix for these files' names is a file identifier such as .DB.) By using a job name
for each analysis, you insure that no files are overwritten. If you do not specify a job name,
all files receive the name FILE or file, depending on the operating system. Command(s):
/FILNAME
GUI: Utility Menu>File>Change Job name
MANIPAL UNIVERSITY JAIPUR

Defining Element Types


The ANSYS element library contains more than 100 different element types. Each element
type has a unique number and a prefix that identifies the element category: BEAM4,
PLANE77, SOLID96, etc. The following element categories are available

The element type determines, among other things:


The degree-of-freedom set (which in turn implies the discipline-structural, thermal,
magnetic, electric, quadrilateral, brick, etc.)
Whether the element lies in two-dimensional or three-dimensional space.
For example, BEAM4, has six structural degrees of freedom (UX, UY, UZ, ROTX, ROTY,
ROTZ), is a line element, and can be modelled in 3-D space. PLANE77 has a thermal degree
of freedom (TEMP), is an eight-node quadrilateral element, and can be modelled only in 2-D
space.

Defining Element Real Constants


Element real constants are properties that depend on the element type, such as cross-sectional
properties of a beam element. For example, real constants for BEAM3, the 2-D beam
element, are area (AREA), moment of inertia (IZZ), height (HEIGHT), shear deflection
constant (SHEARZ), initial strain (ISTRN), and added mass per unit length (ADDMAS). Not
all element types require real constants, and different elements of the same type may have
different real constant values.
As with element types, each set of real constants has a reference number, and the table of
reference number versus real constant set is called the real constant table. While defining the
elements, you point to the appropriate real constant reference number using the REAL
command
(Main Menu> Preprocessor>Create>Elements>Elem Attributes).

Defining Material Properties


Most element types require material properties. Depending on the application, material
properties may be:
Linear or nonlinear
Isotropic, orthotropic, or anisotropic
Constant temperature or temperature-dependent.

As with element types and real constants, each set of material properties has a material
reference number. The table of material reference numbers versus material property sets is
called the material table. Within one analysis, you may have multiple material property sets
(to correspond with multiple materials used in the model). ANSYS identifies each set with a
unique reference number.
Main Menu > Preprocessor> Material Props > Material Models.

Creating the Model Geometry


Once you have defined material properties, the next step in an analysis is generating a finite
element model-nodes and elements-that adequately describes the model geometry. There are
two methods to create the finite element model: solid modelling and direct generation.

With solid modelling, you describe the geometric shape of your model, and then instruct the
ANSYS program to automatically mesh the geometry with nodes and elements. You can
control the size and shape of the elements that the program creates. With direct generation,
you "manually" define the location of each node and the connectivity of each element.
Several convenience operations, such as copying patterns of existing nodes and elements,
symmetry reflection, etc. are available.

Apply Loads and Obtain the Solution


In this step, you use the SOLUTION processor to define the analysis type and analysis
options, apply loads, specify load step options, and initiate the finite element solution. You
also can apply loads using the PREP7 preprocessor.

Applying Loads
The word loads as used in this manual includes boundary conditions (constraints, supports, or
boundary field specifications) as well as other externally and internally applied loads. Loads
in the ANSYS program are divided into six categories:
DOF Constraints
Forces
Surface Loads
Body Loads
Inertia Loads
Coupled-field Loads
You can apply most of these loads either on the solid model (keypoints, lines, and areas) or
the finite element model (nodes and elements).
Two important load-related terms you need to know are load step and substep. A load step is
simply a configuration of loads for which you obtain a solution. In a structural analysis, for
example, you may apply wind loads in one load step and gravity in a second load step. Load
steps are also useful in dividing a transient load history curve into several segments.
Practice 1: Bars of Tapered Cross section Area
Consider the Tapered bar shown in figure below. Determine the Nodal Displacement,
Stress in each element, Reaction forces
5 2 2
E = 2 x 10 N/mm2, Area at root, A1 = 1000 mm , Area at the end, A2 = 500 mm .

Solution: The tapered bar is modified into 2 elements as shown below with modified area of
cross section.
(A1 + A2)/2= (1000+500)/2=750 mm2
A1 = (1000+750)/2= 875 mm2
A2= (500+750)/2=625 mm2
L1 = 187.5 mm & L2 = 187.5 mm

1. Ansys Main Menu – Preferences-Select – STRUCTURAL- h method– ok


2. Element type – Add/Edit/Delete – Add – link, 3D Finit stn 180 – ok- close.
3. Real constants – Add – ok – real constant set no – 1 – cross-sectional AREA1 – 875 –
apply-ok
4. Add – ok – real constant set no – 2 – cross-sectional AREA 2 – 625-ok
5. Material Properties – material models – Structural – Linear – Elastic – Isotropic – EX– 2e5
–PRXY – 0.3 – ok – close.
6. Modeling – Create – keypoints– In Active CS, =0, Y=0 – Apply (first key point is created)
– location in active CS, X= 187.5, Y=0, apply (second key point is created) - location in
active CS X=375, Y=0(third key point is created) -ok.
7. Modeling-Create – lines-straight lines-pick key points 1 & 2-ok- pick key points 2 & 3-ok
8. Meshing-mesh attributes-picked lines (pick the lines)-ok-material no= 1, real constants set
no = 1, element type no =1, link 1, element section= none defined-pick the other line-ok-
material number 2-define material id 2- real constants set no = 2, element type no =2-element
section= none defined-ok.
9. Meshing-size controls-manual size-lines-all lines- no of element divisions=10(yes)-ok
10. Meshing-mesh tool-mesh-pick the lines-ok (the color changes to light blue)
11. Loads – Define loads – apply – Structural – Displacement – on key points- pick key point
1 – apply –DOFs to be constrained – ALL DOF, displacement value=0 – ok.
12. Loads – Define loads – apply – Structural – Force/Moment – on key points- pick last key
point – apply – direction of For/Mom – FX – Force/Moment value – 1000 (+ve value) – ok.
13. Solve – current LS – ok (Solution is done is displayed) – close.
MANIPAL UNIVERSITY JAIPUR

14. Element table – Define table – Add –‘Results data item’ – By Sequence num – LS – LS1 –
ok.
15. Plot results – contour plot –Element table – item to be plotted LS,1, avg common nodes-
yes average- ok.
16. List Results – reaction solution – items to be listed – All items – ok (reaction forces will
be displayed with the node numbers).
17. Plot results- nodal solution-ok-DOF solution- x component of displacement-ok.
18. Animation: PlotCtrls – Animate – Deformed shape – def+undeformed-ok.

Practice/Assignment 2: Stepped Bar


Consider the stepped bar shown in figure below. Determine the Nodal Displacement, Stress
in each element, Reaction forces.
Practice/Assignment 3: Truss (2 Elements)
Consider the two bar truss shown in figure. For the given data, find Stress in each element,
2
Reaction forces, Nodal displacement. E = 210 GPa, A = 0.1 m .

1. Ansys Main Menu – Preferences-select – STRUCTURAL- h method – ok


2. Element type – Add/Edit/Delete – Add – Link – 3D Finit stn 180 – ok – close.
3. Real constants – Add – ok – real constant set no – 1 – c/s area – 0.1 – ok – close.
4. Material Properties – material models – Structural – Linear – Elastic – Isotropic – EX –
210e9– Ok – close.
5. Modeling – Create – Nodes – In Active CS – Apply (first node is created) – x,y,z location
in CS– 0.75 (x value w.r.t first node) – apply (second node is created) – x,y,z location in CS –
(0, -0.5),(x, y value w.r.t first node) – ok (third node is created
6. Create–Elements–Elem Attributes – Material number – 1 – Real constant set number – 1 –
ok
7. Auto numbered – Thru Nodes – pick 1 & 2 – apply – pick 2 & 3–– ok (elements are
created through nodes).
8. Loads – Define loads – apply – Structural – Displacement – on Nodes – pick node 1 &3 –
apply – DOFs to be constrained – All DOF – ok
9. Loads – Define loads – apply – Structural – Force/Moment – on Nodes- pick node 2 – apply
– direction of For/Mom – FY – Force/Moment value – 5000 (-ve value)
10. Solve – current LS – ok (Solution is done is displayed) – close.
11. Element table – Define table – Add –‘Results data item’ – By Sequence num – LS – LS1 –
ok.
12. Plot results – contour plot –Element table – item to be plotted LS,1, avg common nodes-
yes average- ok.
13. List Results – reaction solution – items to be listed – All items – ok (reaction forces will
be displayed with the node numbers).
14. Plot results- nodal solution-ok-DOF solution- Y component of displacement-ok.
15. Animation: PlotCtrls – Animate – Deformed shape – def+undeformed-ok.
Practice/Assignment 4: Truss (3 Elements)

Consider the three bar truss shown in figure. For the given data, find Stress in each element,
2
Reaction forces, Nodal displacement. E = 300 GPa, A = 60 mm . The length L1 = 750 mm
and L2 = 100 mm. The load P1 = 20 kN and P2 = 25 kN. Determine nodal displacement,
stresses and reaction forces in the truss system. Also write down the flow steps.
Practice/Assignment 5: Simply Supported Beam
Compute the Shear force and bending moment diagrams for the beam shown and find the
maximum deflection. Assume rectangular c/s area of 100 mm * 100mm, Young’s modulus
of210 MPa, Poisson’s ratio 0.27.

1. Ansys Main Menu – Preferences-Select – STRUCTURAL- h method – ok


2. Element type – Add/Edit/Delete – Add – BEAM – 2 node BEAM 188– ok- close.
3. Material Properties – material models – Structural – Linear – Elastic – Isotropic – EX –
2.10e5– PRXY – 0.27 – ok – close.
4. Sections-Beams-common sections- sub type- rectangle (1st element) -enter b=100, h=100-
preview-ok.
5. Modeling – Create – Nodes – In Active CS – Apply (first node is created) – x,y,z location
in CS– 1000 (x value w.r.t first node) – apply (second node is created) – 2500 (x value w.r.t
first node) – apply(third node is created)- x,y,z location in CS-3500 (x value w.r.t first node)-
ok.
6. Create – Elements – Auto numbered – Thru Nodes – pick 1 & 2 apply – pick 2 & 3 apply –
pick 3 & 4 – ok (elements are created through nodes).
7. Loads – Define loads – apply – Structural – Displacement – on Nodes- pick node 1 & 4 –
apply –DOFs to be constrained – all DOF – ok.
8. Loads – Define loads – apply – Structural – Force/Moment – on Nodes- pick node 2 – apply
–direction of For/Mom – FY – Force/Moment value – -2000(-ve value) – ok- Force/Moment
– on Nodes- pick node 3 – apply –direction of For/Mom – FY – Force/Moment value – -
4000(-ve value) – ok.
9. Solve – current LS – ok (Solution is done is displayed) – close.
10. Displacement: Plot Results – Contour plot – Nodal solution – DOF solution –
displacement vector sum – ok.
11. Stress: Plot Results – Contour plot – Nodal solution – stress – vonmises stress – ok.
12. Element table – Define table – Add – ‘Results data item’ – By Sequence num – SMISC –
SMISC, 6 – apply, By Sequence num – SMISC – SMISC, 19 – apply, By Sequence num –
SMISC – SMISC, 3 – apply, By Sequence num – SMISC – SMISC,16 – ok – close.
13. Plot results – contour plot – Line Element Results – Elem table item at node I – SMIS6 –
Elem table item at node J – SMIS19 – ok (Shear force diagram will be displayed).
14. Plot results – contour plot – Line Element Results – Elem table item at node I – SMIS3 –
Elem table item at node J – SMIS16 – ok (bending moment diagram will be displayed).
15. Reaction forces: List Results – reaction solution – items to be listed – All items – ok
(reaction forces will be displayed with the node numbers).
NOTE: For Shear Force Diagram use the combination SMISC 6 & SMISC 19, for Bending
Moment Diagram use the combination SMISC 3 & SMISC 16.
16. Animation: PlotCtrls – Animate – Deformed results – DOF solution – USUM – ok.
Practice/Assignment 6: Simply Supported Beam-II

Compute the shear force and bending moment diagrams for the beam shown and find the
maximum deflection. Assume rectangular c/s area of 100mm * 100m m, Young’s modulus of
5
2.1×10 N/mm2, Poisson’s ratio= 0.27.
1. Introduction to CATIA V6
Theory

Presentation of CATIA V6 GUI:

Figure 1: CATIA V6 GUI

1. Specification Tree:
• Provides access to the history of how a part was constructed, and shows the product structure
• Parts can be modified by selecting them from the spec. tree.

2. Toolbars:
As mentioned before, the different workbenches contain different toolbars. Although some toolbars will appear
in almost every workbench. This section will discuss how to customize your toolbars.
In most of the workbenches, there are too many toolbars to display in one column or row along the right side of
the screen and along the bottom of the screen. In this case, it is important to move the toolbars around so that
you can view all of them. If you can’t view a toolbar, then you can’t use the toolbar.

3. The Compass:
The Compass provides you with instant access to PLM information at any time, on any object. It is present
in all document windows and is composed of four quadrants(North, South, East, West).

4. The Bar:
The Bar serves as a quick access tool for:
Searching for data
Examining the impacts of modifications
Collaborating with people
Saving the modifications to the database

5. The Robot:

View Options
CATIA Modules:

• Sketcher
• Part Design
• Assembly Design
• Drafting
• WireFrame and Surface Design
• Sheet Metal Design

Sketcher:

The Sketcher workbench is a set of tools that helps you create and constrain 2D geometries. Features (pads,
pockets, shafts, etc...) may then be created solids or modifications to solids using these 2D profiles. You can
access the Sketcher workbench in various ways. Two simple ways are by using the top pull down menu (Start –
Mechanical Design – Sketcher), or by selecting the Sketcher icon. When you enter the sketcher, CATIA requires
that you choose a plane to sketch on. You can choose this plane either before or after you select the Sketcher
icon. To exit the sketcher, select the Exit Workbench icon.

The Sketcher workbench contains the following standard workbench specific toolbars.

• Profile toolbar: The commands located in this toolbar allow you to create simple geometries (rectangle,
circle, line, etc...) and more complex geometries (profile, spline, etc...).

• Operation toolbar: Once a profile has been created, it can be modified using commands such as trim, mirror,
chamfer, and other commands located in the Operation toolbar.

• Constraint toolbar: Profiles may be constrained with dimensional (distances, angles, etc...) or geometrical
(tangent, parallel, etc...) constraints using the commands located in the Constraint toolbar.

• Sketch tools toolbar: The commands in this toolbar allow you to work in different modes which make
sketching easier.

• User Selection Filter toolbar: Allows you to activate different selection filters. Copyrighted Material
Copyrighted Material Copyrighted Material Copyrighted Material.
• Visualization toolbar: Allows you to, among other things to cut the part by the sketch plane and choose
lighting effects and other factors that influence how the part is visualized.

• Tools toolbar: Allows you to, among others other things, to analyze a sketch for problems, and create a
datum.

The Sketch tools Toolbar

The Sketch tools toolbar contains icons that activate and deactivate different work modes. These work modes
assist you in drawing 2D profiles. Reading from left to right, the toolbar contains the following work modes;
(Each work mode is active if the icon is orange and inactive if it is blue.)

• Grid: This command turns the sketcher grid on and off.


• Snap to Point: If active, your cursor will snap to the intersections of the grid lines.
• Construction / Standard Elements: You can draw two different types of elements in CATIA a standard
element and a construction element. A standard element (solid line type) will be created when the icon is
inactive (blue). It will be used to create a feature in the Part Design workbench. A construction element (dashed
line type) will be created when the icon is active (orange). They are used to help construct your sketch, but will
not be used to create features.
• Geometric Constraints: When active, geometric constraints will automatically be applied such as tangencies,
coincidences, parallelisms, etc...
• Dimensional Constraints: When active, dimensional constraints will automatically be applied when corners
(fillets) or chamfers are created, or when quantities are entered in the value field. The value field is a place
where dimensions such as line length and angle are manually entered.

Part Design:

• The Part Design application is used to create solid models of parts


• Solid parts are usually created from 2D profiles that are extruded or revolved to form a base feature
• Parts can be modified by selecting their features in the specification tree

1. Sketch Based Features:


The Sketch based features are, Pad (Extrude), Pocket (Negative Extrude), Shaft (Revolve), Rib, Hole, Swept,
Slot, MutiSection Solid etc.

2. Dress Up Features:
The Dress-up Features are, Fillet, Chamfer, Draft Shell, Thickness etc.
3. Transformation Features:
The Transformation Features are, Translate, Rotate, Mirror, Pattern etc.

Assembly Design:

• The Assembly Design application allows you to create a product model from a number of separate
parts
• The parts in a product assembly are not joined together, but assembled as they would be in a physical
assembly
• The product assembly structure is hierarchical and allows you to model complex product relationships
• Constraints can be applied between the parts in assembly to define relationships between them

• Constraints Toolbar


Coincidence

Contact

Offset

Angular

• Product Structure Tools


Insert New Component

Insert New Product

Insert New Part

Insert Existing Component

Replace Component

Drafting:
To access „Drafting‟ click „Start‟ in the bar > „Mechanical Design‟ > „Drafting‟

Under the „Drawing‟ tab, enter „Your_Name_Crankshaft_Drawing‟ as


„Representation Name‟
Under the „Drawing Information‟ tab
a. Select „ISO‟ as „Standard‟
b. Select „A4 ISO‟ as „Sheet Style‟
c. Check „Landscape‟
d. Select „Empty Sheet‟ as „Automatic View Creation Layout‟
Create the front view
a. Click on the „Front view‟ icon
b. Select the face of the crankshaft as shown opposite. c.
Use arrows to orientate the view as indicated opposite d.
Then click anywhere on the sheet to validate the view
We will now add the dimensions to the front view

a. Activate the „FRONT‟ view if it has not already done

b. Click on the „Dimensions‟ icon


SKETCHER MODULE
ASSIGNMENT. NO. : 01
DATE :

ASSIGNMENT. NO. : 02
DATE :
PART DESIGN MODULE
ASSIGNMENT. NO. : 03
DATE :

ASSIGNMENT. NO. : 04
DATE :

ASSIGNMENT. NO. : 05
DATE :
Aim:
To study G and M codes and working of CNC machine.

G –codes for turning machine:


G- To define tool movement, also known as preparatory function.
G 00 Rapid movement
G 01 Linear movement with feed rate
G 02 Circular interpretation clockwise with feed rate
G 03 Circular interpretation counter clockwise with feed rate
G 04 Dwell time in seconds
G 17 XY plane
G 18 XZ plane
G 19 YZ plane
G 20 Input (in”)
G 21 Input (mm)
G 28 Return to reference point (home position)
G 40 Tool nose radius compensation cancel
G 41 Tool nose radius compensation left
G 42 Tool nose radius compensation right
G 70 Finishing cycle
G 71 Multiple turning cycle
G 72 Multiple facing cycle
G 74 Deck drilling cycle in z axis
G 75 Grooving cycle in z axis
G 76 Thread cutting cycle
G 90 Absolute mode
G 91 Incremental mode
Cycle G 90 Turning cycle
Cycle G 92 Thread cutting cycle
Cycle G 94 Facing cycle
G 98 Feed per minute
G 99 Feed per revolution

M- Codes / Miscellaneous codes:


M 00 Program stop
M 01 Optional stop
M 02 Program end
M 03 Spindle forward (cw)
M 04 Spindle reverse (ccw)
M 05 Spindle stop
M 06 Tool change
M 08 Coolant ON
M 09 Coolant OFF
M 10 Chuck open
M 11 Chuck close
M 30 Program stop and restart
M 98 Sub program call
M 99 Sub program exit

G- Codes for milling machines:


G 00 Point to point rapid positioning
G 01 Linear interpretation
G 02 Circular interpretation arc clockwise
G 03 Circular interpretation arc counter-clockwise G 04 > Dwell time in seconds
G 12 Circular pocketing clockwise
G 13 Circular pocketing anticlockwise
G 15 Polar coordinate system OFF
G 16 Polar coordinate system ON
G 17 XY plane selection for arc movement
G 18 XZ plane selection for arc movement
G 19 YZ plane selection for arc movement
G 20 Selecting inch mode input
G 21 Selecting metric mode input
G 40 Cutter compensation/offset,cancel
G 41 Cutter radius compensation / offset-left
G 42 Cutter radius compensation / offset-right
G 43 Tool length compensation -positive
G 44 Tool length compensation -negative
G 49 Tool length compensation -cancel
G 50 Scaling mode cancel (OFF)
G 51 Scaling mode ON
G 54 Shift of coordinate
G 55 Shift of coordinate
G 56 Shift of coordinate
G 57 Shift of coordinate
G 58 Shift of coordinate
G 59 Shift of coordinate
G 68 Coordinate rotation system ON
G 69 Coordinate rotation system ON
G 70 Inch programming
G 71 Metric programming
G 80 Drilling cycle
G 81 Fixed cycle no 1 drill, spot drill
G82 Fixed cycle no 2 drill, counter bore
G 83 Fixed cycle no 3 drill, deep hole
G 84 Tapping cycle
G 85 Fixed cycle no 4 drill, bore
G 86 Boring cycle
G 87 Back boring cycle
G 88 Boring cycle
G 89 Boring cycle
G 90 Absolute dimension input
G 91 Incremental dimension input
G 94 Feed rate selection per min
G 95 Feed rate selection per minute
G 98, 99 Tool return position
G 28 Return to reference point (home position)
G 70 Finishing cycle
G 71 Multiple turning cycle
G 72 Multiple facing cycle
G 74 Peck drilling cycle in z axis
G 75 Grooving cycle in z axis
G 76 Thread cutting cycle
G 90 Turning cycle
G 92 Thread cutting cycle
G 94 Facing cycle
G 98 Feed per minute
G 99 Feed per revolution

M- Codes / Miscellaneous codes:


M 00 Program stop
M 01 Optional program stop
M 02 Program end
M 03 Spindle motor ON and forward direction (cw)
M 04 Spindle motor ON and reverse direction ( ccw)
M 05 Spindle stop
M 06 Automatic tool change
M 08 Coolant pump motor ON
M 09 Coolant pump motor OFF
M 21 Mirror image along x axis
M 22 Mirror image along y axis
M 23 Mirror image along z axis
M 30 Program stop and restart
M 98 Sub program call
M 99 Sub program exit

Working of CNC Machine:


CNC machine performs its operation from instructions given to it in the form of codes. There are several code
words which is used to provide instruction to machine tool is listed above. In CNC machines DC motor is
replaced by servo system which provides us fully controlled motion. It operates by pulse input, there is fixed
motion of spindle for each input of pulse. Basically we controls the pulses with the help of programing using G-
codes and M-codes.
N-code. A part program block usually begins with an “N” word. The N word specifies the sequence number. It
is used to identify the block within the program. It is especially useful for program editing. For example when
the format is “4” a proper sequence number would be N0010. It is a good practice to program N values in
increments of 10 or greater. This allows additional blocks to be inserted between two existing blocks.
G-code. The G-code is also called preparatory code or word. It is used to prepare the MCU for control functions. It
indicates that a given control function is requested or that a certain unit or default be taken. There are modal functions
and non-modal functions. Modal functions are those that do not change after they have been specified once, such as
unit selection. Non modal functions are active in the block where they are specified. For example,
circular interpolation is a non-modal function. Some commonly used G-codes arc listed above. Some of these
functions are explained in what follows.
G00 is the rapid traverse code that makes the machine move at maximum speed. It is used for positioning
motion.
When G01. G02, or G03 are specified, the machine moves at the feed speed. G01 is linear interpolation; G02
and G03 are for circular interpolation. For circular interpolation, the tool destination and the circle center are
programmed in one block. G04 (dwell) is used to stop the motion for a time specified in the block. XY, YZ, and
XZ planes. The interpolation plane can be selected using G 17, G18 or G 19. 19. When a machine is equipped
with thread-cutting capability, (G33-G35), the part program must specify the proper way to cut the thread.
Codes G4O-G43 deal with cutter compensation. Most canned cycles are manufacturer-defined. They include
drilling, peck drilling, spot drilling, milling, and profile turning cycles.
F-Code. The F-code specifics the feed speed of the tool motion. It is the relative speed between the cutting tool
and the work piece. It is typically specified in in./min (ipm). Some Controllers offer a G-code that specifies the
ipr programming mode. The F-code must be given with G01, G02 or G03 can be used. Feed speed can be
changed frequently in a program, as needed. When an F-code is present in a block, it takes effect immediately.
S-Code. The S-code is the cutting-speed code. Cutting speed is the specification of the relative surface speed of
the cutting edge with respect to the work piece. It is the result of the tool (or workpiece in turning) rotation.
Therefore, it is programmed in rpm. The S-code is specified before the spindle is turned on The S-code does not
turn on the spindle. The spindle is turned on by an M-code. To specify a 1000-rpm spindle speed, the program
block is N0010 S1000.
T-Code. The T-code is used to specify the tool number. It is used only when an automatic tool changer is
present. It specifies the stot number on the tool magazine in which the next tool is located. Actual tool change
does not occur until a tool-change M-code is specified.
M-Code. The M-code is called the miscellaneous word and is used 10 control miscellaneous functions of the
machine. Such functions include turn the spindle on/off, start/stop the machine, turn on/off the coolant, change
the tool, and rewind the program. M00 and M01 both stops the machine in the middle of a program. M01 is
effective only when the optional stop button on the control panel is depressed. The program can be resumed
through the control panel. M02 marks the end of the program. M03 turns on the spindle (clockwise). The spindle
rpm must be specified in the same line or in a previous line. M04 is Similar to M03, except it turns the spindle
on counter clockwise. M05 turns off the spindle. M06 signals the tool-change operation. On a machine equipped
with an automatic tool changer, it stops the spindle, retracts the spindle to the tool-change position, and then
changes the tool to the one specified in the T-code. M07 and M08 turn on different modes of coolant. MO9 turns
off the coolant. M30 marks the end of the tape. It stops the spindle and rewinds the program. On some
controllers, more than one M-code is allowed in the same block.

Manual part programming:

G00 Positioning (Rapid Traverse)


Format
N…. G00 X(U)….Z(W)….
The slides are traversed at maximum speed to the Programmed target point
Incremental and absolute commands can be used at the same time.
G01 Linear Interpolation (Feed)
Format
N…. G01 X(U)….Z(W)….F…
Linear slide movements (face, longitudinal, taper turning) at the programmed federate.
G03 Circular Interpolation CCW (Feed)
Format
N…. G03 X(U)….Z(W)….R….F…
Circular slide movements

Result:
Thus the “G” codes and “M” codes and working of CNC machines were studied.

You might also like