0% found this document useful (0 votes)
5 views

CAM Module 3 Students

Computer Aided Manufacturing (CAM) has evolved from the first numerically controlled machine developed by MIT for the US Air Force in 1949 to the widespread use of CNC machines today. CNC automates machine tools using programmed commands, and consists of components like the part program, machine control unit, and machine tool, with various types of CNC machines based on motion type, control loops, and power supply. While CNC machines offer high precision and efficiency, they also come with high costs and require skilled operators.

Uploaded by

mohamedhidhaf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

CAM Module 3 Students

Computer Aided Manufacturing (CAM) has evolved from the first numerically controlled machine developed by MIT for the US Air Force in 1949 to the widespread use of CNC machines today. CNC automates machine tools using programmed commands, and consists of components like the part program, machine control unit, and machine tool, with various types of CNC machines based on motion type, control loops, and power supply. While CNC machines offer high precision and efficiency, they also come with high costs and require skilled operators.

Uploaded by

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

Computer Aided Manufacturing (CAM)

HISTORY
◼ US Air Force commissioned MIT to develop the first "numerically
controlled" machine in 1949. It was demonstrated in 1952.
◼ At 1970-1972 first Computer Numeric Control machines were
developed.
◼ Today, computer numerical control (CNC) machines are found almost
everywhere, from small job shops in rural communities to companies
in large urban areas.

3
Introduction to NC, CNC and DNC

◼ Computer Numeric Control (CNC) is the automation of machine tools


that are operated by precisely programmed commands encoded on
a storage medium
◼ Numerical Control (NC) refers to the method of controlling the
manufacturing operation by means of directly inserted coded
numerical instructions into the machine tool.
◼ Most NC today is computer (or computerized) numerical control
(CNC), in which computers play an integral part of the control. In
modern CNC systems, end-to-end component design is highly
automated using computer aided design (CAD) and computer-aided
manufacturing (CAM) programs.
NEW NCs or CNCs

•high speed spindle (> 40,000 rpm)

•high feed rate drive ( > 600 ipm)

•high precision ( < 0.00005" accuracy)


NC machines

Motion control is done by: servo-controlled motors

Table
Leadscrew
Encoder A/C Motor
~

Servo Controller

Counter Comparator

Input (converted from analog to digital value)


CNC terminology

BLU: basic length unit ➔


smallest programmable move of each axis.

Controller: (Machine Control Unit, MCU) ➔


Electronic and computerized interface between
operator and m/c
Controller components:
1. Data Processing Unit (DPU)
2. Control-Loops Unit (CLU)
Controller components

Data Processing Unit:


Input device [RS-232 port/ Tape Reader/ Punched Tape Reader]
Data Reading Circuits and Parity Checking Circuits
Decoders to distribute data to the axes controllers.

Control Loops Unit:


Interpolator to supply machine-motion commands between data points
Position control loop hardware for each axis of motion
Types of CNC machines

Based on Motion Type:


Point-to-Point or Continuous path

Based on Control Loops:


Open loop or Closed loop

Based on Power Supply:


Electric or Hydraulic or Pneumatic

Based on Positioning System


Incremental or Absolute
Open Loop vs. Closed Loop controls
Open loop control of a Point-to-Point NC drilling machine

NOTE: this machine uses stepper motor control


Components of Servo-motor controlled CNC

Motor lead screw rotation table moves

Motor speed control feedback position sensed by encoder

Two types of encoder configurations


ELEMENTS OF A CNC
◼ A CNC system consists of three basic components :
◼ Part Program

◼ Machine Control Unit (MCU)

◼ Machine tool (lathe, drill press, milling machine etc)

◼ The part program is a detailed set of commands to be followed by the machine


tool.
◼ Command specifies a position in the Cartesian coordinate system (x,y,z) or
motion (workpiece travel or cutting tool travel), machining parameters and on/off
function.
◼ Knowledge in machine tools, machining processes, effects of process variables,
and limitations of CNC controls.
◼ The part program is written manually or by using computer assisted language
such as APT (Automated Programming Tool).
MAJOR COMPONENTS RELATED TO CNC MACHINE
TOOLS
Any CNC machine tool essentially consists of the following parts:

Part program:

• A series of coded instructions required to produce a part.

• Controls the movement of the machine tool and on/off control of


auxiliary functions such as spindle rotation and coolant.

• The coded instructions are composed of letters, numbers and


symbols.

14
Program input device

• The program input device is the means for part program to


be entered into the CNC control.

• Three commonly used program input devices are punch tape


reader, magnetic tape reader, and computer via RS-232-C
communication.

15
Machine Control Unit

The machine control unit (MCU) is the heart of a CNC system. It is


used to perform the following functions:
• To read the coded instructions.
• To decode the coded instructions.
• To implement interpolations (linear, circular, and helical) to
generate axis motion commands.
• To feed the axis motion commands to the amplifier circuits for
driving the axis mechanisms.
• To receive the feedback signals of position and speed for each
drive axis.
• To implement auxiliary control functions such as coolant or
spindle on/off and tool change.
16
Machine Tool

• CNC controls are used to control various types of machine tools.

• Regardless of which type of machine tool is controlled, it always


has a slide table and a spindle to control position and speed.

• The machine table is controlled in the X and Y axes, while the


spindle runs along the Z axis.

17
Feed Back System

The feedback system is also referred to as the measuring


system.
• It uses position and speed transducers continuously to monitor
the position at which the cutting tool is located at any particular
instant.
• The MCU uses the difference between reference signals and
feedback signals to generate the control signals for correcting
position and speed errors.

18
Drive System

• Drives are used to provide controlled motion to CNC elements


• A drive system consists of amplifier circuits, drive motors, and ball
lead-screws
• The MCU feeds the control signals (position and speed) of each axis
to the amplifier circuits.
• The control signals are augmented to actuate drive motors which in
turn rotate the ball/lead-screws to position the machine table.

19
POWER DRIVES

• In machine tools, power is generally required for driving the main spindle,
saddles and carriages and to some auxiliary units.

• The motors used for CNC system are of two kinds


✓ Electrical - AC, DC or Stepper motors
✓ Fluid - Hydraulic or Pneumatic

.In CNC, usually stepper and servo electrical drives are used
• Exhibit favorable torque-speed characteristics and are relatively in
expensive

20
STEPPER MOTOR
A stepper motor is a pulse-driven motor that changes the
angular position of the rotor in steps.
Due to this nature of a stepper motor, it is widely used in
low cost, open loop position control systems.

Types of stepper motors:


o Permanent Magnet
Employ permanent magnet
Low speed, relatively high torque
o Variable Reluctance
Does not have permanent magnet Low
torque
21
Permanent magnet (PM) stepper motor
• Rotor is a permanent magnet.
• PM motor rotor has no teeth and is designed to be
magnetized at a right angle to its axis.
• Figure shows a simple, 90⁰
PM motor with four phases
(A-D).
• Applying current to each
phase in sequence will cause
the rotor to rotate by adjusting
to the changing magnetic
fields
Permanent magnet stepper
• Although it operates at fairly low speed, the PM motor has a
relatively high torque characteristic.
• These are low cost motors with typical step angle ranging
between 7.5⁰ to 15⁰ 22
Variable Reluctance Motor
• The cylindrical rotor is made of soft steel and has four poles
• It has four rotor teeth, 90⁰ apart and six stator poles, 60⁰ apart.
• Electromagnetic field is produced by activating the stator coils
in sequence.
• It attracts the metal rotor. When
the windings are energized in a
reoccurring sequence of 2, 3, 1,
and so on, the motor will rotate
in a 30⁰ step angle.
• In the non-energized condition,
there is no magnetic flux in the
air gap, as the stator is an Fig. Variable reluctance stepper motor
electromagnet and the rotor is a
piece of soft iron; hence, there is
no detent torque. 23
Hybrid stepper motor

Hybrid stepping motors combine a permanent


magnet and a rotor with metal teeth to provide
features of the variable reluctance and
permanent magnet motors together.

The number of rotor pole pairs is equal to the


number of teeth on one of the rotor’s parts.
The hybrid motor stator has teeth creating more
poles than the main poles windings
Hybrid stepper

24
• Rotation of a hybrid stepping motor is produced in the similar
fashion as a permanent magnet stepping motor, by energizing
individual windings in a positive or negative direction.

• When a winding is energized, north and south poles are created,


depending on the polarity of the current flowing.

• These generated poles attract the permanent poles of the rotor and
also the finer metal teeth present on rotor.

25
• The rotor moves one step to align the offset
magnetized rotor teeth to the corresponding
energized windings.

• Hybrid motors are more expensive than motors with


permanent magnets, but they use smaller steps, have
greater torque and maximum speed.

• Step angle of a stepper motor is given by,

26
Advantages of stepper motors

• Low cost
• Simplicity of construction
• Low maintenance
• Less likely to stall or slip
• Will work in any environment
• Excellent start-stop and reversing responses
Disadvantages of stepper motors
• Low torque capacity compared to DC motors
• Limited speed
• During overloading, the synchronization will be broken.
Vibration and noise occur when running at high speed.
27
SERVO MOTORS
• Servomotors are special electromechanical devices that produce
precise degrees of rotation.

• A servo motor is a DC or AC or brushless DC motor combined with


a position sensing device.

• Servomotors are also called control motors as they are involved in


controlling a mechanical system.

• The servomotors are used in a closed-loop servo system as shown in


Figure A reference input is sent to the servo amplifier, which controls
the speed of the servomotor.

Servo system block diagram 33


• A feedback device is mounted on the machine, which is either an
encoder or resolver.
• This device changes mechanical motion into electrical signals and
is used as a feedback.
• This feedback is sent to the error detector, which compares the
actual operation with that of the reference input.
• If there is an error, that error is fed directly to the amplifier, which
will be used to make necessary corrections in control action.

34
• In many servo systems, both velocity and position are monitored.
• Servomotors provide accurate speed, torque, and have ability of
direction control.

DC servomotors
DC operated servomotors are usually respond to error signal
abruptly and accelerate the load quickly. A DC servo motor is actually
an assembly of four separate components, namely:

o DC motor
o gear assembly
o position-sensing device
o control circuit 35
AC servo motor

• Magnetic force is generated by a permanent magnet and


current which further produce the torque.
• It has no brushes so there is little noise/vibration. This
motor provides high precision control with the help of high
resolution encoder.
• The stator is composed of a core and a winding. The rotor
part comprises of shaft, rotor core and a permanent
magnet.
• Digital encoder can be of optical or magnetic type. It gives
digital signals, which are in proportion of rotation of the
shaft
36
Advantages of servo motors
• Provides high intermittent torque, high torque to inertia
ratio, and high speeds
• Work well for velocity control
• Available in all sizes
• Quiet in operation
• Smoother rotation at lower speeds

Disadvantages of servo motors


• More expensive than stepper motors
• Require tuning of control loop parameters
• Not suitable for hazardous environments or in vacuum
• Excessive current can result in partial demagnetization
of DC type servo motor
32
LINEAR MOTION DRIVES
• Linear motion drives are mechanical transmission systems which are used to
convert rotary motion into linear motion.

• The conventional thread forms like vee or square are not suitable in CNC
because of their high wear and less efficiency.

• Therefore CNC machines generally employ ball screw for driving their
workpiece carriages.

• These drives provide backlash free operation with low friction- wear
characteristics.

• These are efficient and accurate in comparison with that of nut- and-screw
drives. Most widely used linear motion drives are ball screws.
33
Advantages of CNC machines
• Machining is accurate and have very high precision
• Time taken to perform a job is very less
• Safe to operate
• Number of operators required to operate a machine are reduced
• No possibility of human error
• Reliable
• They are versatile
• Uniformity in designs
• They could run for all 24 hours a day
• Wastage generated by CNC machining is low as compared to conventional machining
• It reduces the number of defective products produced to almost zero
• It is more efficient and faster compared to conventional machining
• It is energy efficient
• It reduces overall production cost
• Products manufactured by CNC machines are highly consistent in nature
• Prototyping of the product is not required
• By updating the software machine can be updated to some extent
• One operator can supervise more than one machine at a time
• It can work on a wide range of material
Disadvantages of CNC machines
• Costly
• Trained operator is required to operate the machine
• In case of breakdown a highly skilled professional is required to solve the
problem
• Reduction in manual labour can lead to unemployment
• Its installation cost is high
• Applications of CNC machines
• Metal removal industries
• Material fabrication industries
• For non-conventional machining industries where the machining task is difficult
to perform manually
CNC APPLICATIONS
◼ Machining
2.5D / 3D
Turning ~ Lathes, Turning Centre
Milling ~ Machining Centres
◼ Forming
2D
Plasma and Laser Cutting
Blanking, nibbling and punching
3D
Rapid Prototyping
◼ In the non-machine tool category, CNC applications include
welding machines (arc and resistance), coordinate measuring
machine, electronic assembly, tape laying and filament winding
machines for composites etc
Direct numerical control (DNC)
◼ Direct numerical control (DNC) can be described as a various type of a
manufacturing system in which that multiple NC machine or CNC machines are
remotely controlled from a host computer or DNC control of multiple machines tools
by a single computer through a direct connection.
Functions of DNC System
◼ Following are the functions of the DNC machine:
1. For use the central computer for storage and editing programs for all machine
tools connected to it.
2. To give the stored programs to the connected machines on demand.
3. For to post-process part programs written in higher-level languages like APT.
4. To combine CAD with CAM by having a common database.
5. To provide a link between a central computer and various plant computers
connected through modems and networks even though the plants may be
placed several kilometres away from each other.
Components Used in DNC Machine
Following are the main components used in CNC machine:
1. Central computer

2. Bulk memory for storing programs

3. Communication network

4. NC machine

Types of DNC system


Following are the main two types of DNC system:
1. Behind the Tape Reader (BTR) system

2. Specialised MCU
Behind The Tape Reader (BTR) System
Specialised MCU
Advantages and Disadvantages
◼ Following are the advantages of the DNC system:
1. The DNC rejects the use of tape readers, which are absolutely the weakest
component of the NC system.
2. Time-sharing by central control makes it possible to keep close control over the
entire machine shop.
3. The huge memory of DNC allows it to store a large number of part programs for
subsequent use. It also receives the memories of NC control unit.
4. Presence of a central bulk memory allows the same program to be run on
different machines at the same time without duplicating it at individual places.
◼ Following are the disadvantages of the DNC system:
1. DNC uses a central control and in an event of computer failure, the complete
activities of the machine shop would come to a standstill.
2. DNC is expensive and its use is practical in areas where high automation is
required.
PART PROGRAMMING

44
INTRODUCTION

A group of commands given to the CNC for operating the


machine is called the program.
It consists of:
• Information about part geometry
• Motion statements to move the cutting tool
• Cutting speed
• Feed
• Auxiliary functions such as coolant on and off, spindle
direction

45
❑ CNC program structure

There are four basic terms used in CNC programming


Character -> Word -> Block -> Program
• Character is the smallest unit of CNC program. It can have Digit/
Letter / Symbol.
• Word is a combination of alpha-numerical characters. This creates a
single instruction to the CNC machine. Each word begins with a
capital letter, followed by a numeral. These are used to represent
axes positions, federate, speed, preparatory commands, and
miscellaneous functions.
• A program block may contain multiple words, sequenced in a
logical order of processing.
• The program comprises of multiple lines of instructions, „blocks‟ which
will be executed by the machine control unit (MCU).

46
FIXED ZERO v/s FLOATING ZERO

Fixed zero:
• Origin is always located at some position on M/C table
(usually at south west corner/Lower left-hand) of the
tables & all tool location are defined W.R.T. this zero
Floating Zero:
• Very common with CNC M/C used now a days.
• Operator sets zero point at any convenient position on
M/C table.
• The Coordinate system is knows as work coordinate
system (WCS)

47
Modal and Non modal commands
• Commands issued in the NC program may stay in effect
indefinitely (until they explicitly cancelled or changed by some
other command), or they may be effective for only the one time
that they are issued.
• The former are referred as Modal commands. Examples
include feed rate selection and coolant selection.
• Commands that are effective only when issued and whose
effects are lost for subsequent commands are referred to as
non-modal commands.
• A dwell command, which instructs the tool to remain in a given
configuration for a given amount of time, is an example of a
non-modal command.
48
Structure of an NC part program
• An NC part program is made up of a series of commands that are input
into the MCU in a serial manner.

• The MCU interprets these commands and generates the necessary signals
to each of the drive units of the machine to accomplish the required action.

• The NC program is required to have a particular structure that the


controller can understand and it must follow a specific syntax.

• Commands are inputs into the controller in units called blocks or


statements.

• Each block is made up of one or more machine commands.

49
• In general, several commands are grouped together to accomplish a specific
machining operation, hence the use of a block of information for each
operation.

• Each command gives a specific element of control data, such as dimension or


a feed rate. Each command within a block is also called a word.

• The way in which words are arranged within the block is called block format.

• Three different block formats are commonly used, (Fixed sequential format,
Tab sequential format and Word address format)

50
Word Sequential Format : Used on virtually all modern
controllers.

N50 G00 X50 Y25 Z0 F0


N60 G01 Z-1 F50 M08
N70 Z0 M09

• With this type of format, each type of word is assigned as address that is identified
by a letter code within the part program.

• Thus the letter code specifies the type of word that follows and then its associated
numeric data is given.

• For example, the code T represents a tool number. Thus a word of the form T01
would represent tool number 1.

• Theoretically, with this approach, the words in a given block can be entered in any
sequence and the controller should be able to interpret them correctly.
51
• With the word address format only the needed words for a
given operation have to be included within the block.

• The command to which the particular numeric data applies


is identified by the preceding address code.

• Word format has the advantage of having more than one


particular command in one block something that would be
impossible in the other two formats.

52
COMMONLY USED WORD ADDRESSES

• N-CODE: Sequence number, used to identify each block


with in an NC program and provides a means by which NC
commands may be rapidly located. It is program line
number. It is a good practice to increment each block
number by 5 to 10 to allow additional blocks to be inserted if
future changes are required.

• G-CODE: Preparatory Word, used as a communication


device to prepare the MCU. The G-code indicates that a
given control function such as G01, linear interpolation, is
to be requested.

• X, Y & Z-CODES: Coordinates.These give the


coordinate positions of the tool.
53
• F-CODE: Feed rate. The F code specifies the feed in the machining
operation.

• S-CODE: Spindle speed. The S code specifies the cutting speed of


the machining process.

• T-CODE: Tool selection. The T code specifies which tool is to be


used in a specific operation.

• M-CODE: Miscellaneous function. The M code is used to designate


a particular mode of operation for an NC machine tool.

• I, J & K-CODES: They specify the centre of arc coordinates from


starting. 54
Sequence and format of words:

N3 G2 X+1.4 Y+1.4 Z+1.4 I2.0 J2.0 K2.0 F5 S4 T4 M2

sequence no destination coordinates feed rate tool Other function


dist to center of circle spindle speed
preparatory function
56
List of M codes
M codes vary from machine to machine depending on the
functions available on it. They are decided by the manufacturer of
the machine. The M codes listed below are the common ones.

57
G00 Rapid traverse
When the tool being positioned at a point preparatory to a cutting
motion, to save time it is moved along a straight line at Rapid
traverse, at a fixed traverse rate which is pre-programmed into the
machine's control system.
Typical rapid traverse rates are 10 to 25 m /min., but can be as high
as 80 m/min.

Syntax: N010 [G90/G91] G00 X10 Y10 Z5


G01 Linear interpolation (feed traverse)
The tool moves along a straight line in one or two
axis simultaneously at a programmed linear speed,
the feed rate.

Syntax: N010[G90/G91] G01 X10 Y10 Z5 F25


G02/G03 Circular interpolation
Format

N G02/03 X Y__Z__ I J K F using the arc center or


N G02/03 X Y__Z__ R F using the arc radius Arc center
The arc center is specified by addresses I, J and K. I, J and K are the X, Y and Z co-
ordinates of the arc center with reference to the arc start point.

G02 moves along a CW arc G03 moves along a CCW arc


G90 ABSOLUTE POSITION COMMAND

• When using a G90 absolute position command, each dimension or


move is referenced from a fixed point, known as ABSOLUTE ZERO
(part zero).

• Absolute zero is usually set at the corner edge of a part, or at the


center of a square or round part, or an existing bore. ABSOLUTE
ZERO is where the dimensions of a part program are defined from.

• Absolute dimensions are referenced from a known point on the part,


and can be any point the operator chooses, such as the upper-left
corner, center of a round part, or an existing bore.

Syntax: N.. G90 X.. Y.. Z.. A.. B.. C..


G91 INCREMENTAL POSITION COMMAND
• This code is modal and changes the way axis motion
commands are interpreted. G91 makes all subsequent
commands incremental. Zero point shifts with the new
position.

Syntax: N.. G91 X.. Y.. Z.. A.. B.. C..


G 17 G18 G19 : PLANE SELECTION

G 17 : XY plane selection
Syntax: N.. G17

G 18 : ZX plane selection
Syntax: N.. G18

G 19 : ZY plane selection
Syntax: N.. G19

Syntax: N020 G17 G75 F6.0 S300 T1001 M08


G 70 Inch data input

G 71 Metric data input

Syntax : N010 G70 G90 G94 G97 M04


CNC PROGRAMMING

General syntax : N G XY Z ABC UWFSTM

ADDRESS CHARACTERS

N Block number/sequence number

G Preparatory function, operation function

X , Y, Z Absolute dimensions in X , Y and Z axis

A,B,C Angular rotation about axis X , Y & Z.

U Incremental dimensions in X axis

W Incremental dimensions in Z axis

F Feed function

S Speed function

T Tool function

M Miscellaneous Code
Rules for programming

Block Format
N135 G01 X1.0 Y1.0 Z0.125 F5

Sample Block
• Restrictions on CNC blocks
• Each may contain only one tool move
• Each may contain any number of non-tool move G-codes
• Each may contain only one feed rate
• Each may contain only one specified tool or spindle speed
• The block numbers should be sequential
• Both the program start flag and the program number must be independent of all
other commands (on separate lines)
• The data within a block should follow the sequence shown in the above sample
block
Manual Part Programming Example

5”
2.5”
p4
p2 p3 p5

1”

Tool size = 0.25 inch,


5” Feed rate = 6 inch per minute,
Cutting speed = 300 rpm,
Tool start position: 2.0, 2.0
Programming in inches
45°

(4, 4)
p1
Motion of tool:
p0 → p1 → p2 → p3 → p4 → p5 → p1 → p0
p0 (2, 2)
1. Set up the programming parameters

5”
2.5”
p4
p2 p3 p5

1”

Programming in inches
5”
Use absolute coordinates

Feed in ipm
45°
N010 G70 G90 G94 G97 M04
(4, 4)
p1
Spindle speed in rpm
p0 (2, 2)
Spindle CCW
2. Set up the machining conditions

5”
2.5”
p4
p2 p3 p5

1”
Machine moves in XY-plane

Use full-circle interpolation


5”
Feed rate

Spindle speed
45°
N020 G17 G75 F6.0 S300 T1001 M08
(4, 4)
p1
Tool no.
p0 (2, 2)
Flood coolant ON
3. Move tool from p0 to p1 in straight line

5”
2.5”
p4
p2 p3 p5

Linear interpolation
1”
target coordinates

5” N030 G01 X3.875 Y3.698

45°

(4, 4)
p1

p0 (2, 2)
4. Cut profile from p1 to p2

5”
2.5”
p4
p2 p3 p5

1”

Linear interpolation

5” target coordinates

N040 G01 X3.875 Y9.125


45°
or
(4, 4)
p1 N040 G01 Y9.125

p0 (2, 2)

X-coordinate does not change ➔ no need to program it


5. Cut profile from p2 to p3

5”
2.5”
p2 p3
p4
p5 Linear interpolation

target coordinates
1”

N050 G01 X5.634 Y9.125

5”

y = 9 + 0.125 = 9.125
(6.5 - x)2 + 0.1252 = (1 - 0.125)2
x = 5.634
45° p3
(x, y)
(4, 4)
p1 (6.5, 9)
.125

p0 (2, 2)

1”
6. Cut along circle from p3 to p4

5”
2.5”
p4
p2 p3 p5

1”

circular interpolation, CCW motion

5”
target coordinates

45° N060 G03 X7.366 Y9.125 I6.5 J9.0

(4, 4) coordinates of center of circle


p1

p0 (2, 2) N060 G03 X7.366 Y9.125 I0.866 J-0.125


7. Cut from p4 to p5

5”
2.5”
p4
p2 p3 p5

1”

5”

Linear interpolation

45° target coordinates (Y is unchanged)

(4, 4) N070 G01 X9.302


p1

p0 (2, 2)
8. Cut from p5 to p1

5”
2.5”
p4
p2 p3 p5

1”

5”
Linear interpolation

target coordinates (see step 3)


45°
N080 G01 X3.875 Y3.698
(4, 4)
p1

p0 (2, 2)
9. Return to home position, stop program

5”
2.5”
p4
p2 p3 p5

1”
Linear interpolation

5” target coordinates (see step 3)

N090 G01 X2.0 Y2.0 M30

45°
end of data
(4, 4)
N100 M00
p1

p0 (2, 2) program stop


10. Complete RS-274 program

N010 G70 G90 G94 G97 M04


N020 G17 G75 F6.0 S300 T1001 M08
N030 G01 X3.875 Y3.698
N040 G01 X3.875 Y9.125
N050 G01 X5.634 Y9.125
N060 G03 X7.366 Y9.125 I0.866 J-0.125
N070 G01 X9.302
N080 G01 X3.875 Y3.698
N090 G01 X2.0 Y2.0 M30
Canned Cycle

In the canned cycles, the additional data such as the


clearance plane position has to be specified. For example,
the G81 canned cycle is used for carrying out the drilling
operations for through holes. The actual operations
embedded in the G81 canned cycle are shown in Fig. 13.27.
The format to be used as follows:

N G81 X Y Z R

X, Y Refer to the centre coordinates of the point where the


drilling is to be carried out.

Z Refer to the final depth of the hole to be drilled

R Refer to the position of the clearance plane (same as the


Z-axis position of the clearance plane)
Canned Cycle
The component to be machined is shown in Fig. 13.29. Write a program using
canned cycles to drill all the holes shown in Fig 13.29.times
CNC PROGRAMMING
PART PROGRAM FOR SIMPLE FACING
Billet X20 Z60
G21 G40 G98
G28 U0 W0
M06 T0101
G97 M03 S1200
G00 X21 Z1
G90 X0 Z-1
F1.5

Z-2

Z-3

Z-4

Z-5
G28 U0 W0
M05
M30
PART PROGRAM FOR SIMPLE TURNING

Billet X20 Z60


G21 G40 G94
G28 U0 W0
M06 T0101
G97 M03 S1200
G00 X21 Z1
G00 X19
G01 Z-30
G01 X20
G00 Z1
G00 X 18
G01 Z-30
G01 X20
G00 Z1
G00 X 17
G01 Z-30 Billet X20 Z55
G01 X20 G21 G40
G00 Z1 G28 U0 W0
G00 X 16 M06 T01
G01 Z-30 M03 S1200
G01 X20 G00 X21 Z1
G00 Z1 G90 X19 Z-30 F0.3
G00 X 14 X 18
G01 Z-30 X 17
G01 X20 X 15
G28 U0 W0 X 14
M05 G28 U0 W0
M30 M05
M30
PART PROGRAM FOR THREAD CUTTING

Billet X22 Z36


G21 G98
G28 U0 W0
M06 T0701
M03 S1200
G92 X22 Z1 F 1.5
G92 X21.5 Z-25
G92 X 21.3 Z-25
X 21.17 Z-5
G28 U0 W0
M05
M30
Simple G Code Example CNC Lathe
Simple G Code Example CNC Lathe
PART PROGRAM

N5 M12
N10 T0101
N15 G0 X100 Z50
N20 M3 S600
N25 M8
N30 G1 X50 Z0 F600
N40 Y-30 F200
N50 X80 Y-20 F150
N60 G0 X100 Z50
N70 T0100
N80 M5
N90 M9
N100 M13
N110 M30
Taper Turning
G00 X 21 Z21 Z-15
G77 X31 Z-20 R0 F1
R-1
R-2
R-5
G00 X25 Z1
G00 X0 Z0
G03 X10 Z-5 R5
G28 U0 W0
M05
M30
Code Explanation
N5 Clamping workpiece
N10 Changing No.1 tool and executing its offset
N15 Rapidly positioning to A point
N20 Starting the spindle with 600 r/min
N25 Cooling ON
N30 Approaching B point with 600mm/min
N40 Cutting from B point to C point
N50 Cutting from C point to D point
N60 Rapidly retracting to A point
N70 Cancelling the tool offset
N80 Stopping the spindle
N90 Cooling OFF
N100 Releasing workpiece
N110 End of program, spindle stopping and Cooling OFF
CNC MILLING EXAMPLE
N5 G90 G71
N10 T1 M6
N15 G92 X-100 Y86 Z95
N20 G0 X0 Y0 S2500 M3
N25 Z12.5
N30 G1 Z-12.5 F150
N35 X-20 Y30
N40 G2 X10 Y100 R80
N45 G1 X140 Y60
N50 G2 X150 Y0 R50
N55 G1 X0 Y0
N60 G0 Z12.5
N65 G91 G28 Z0 M5
N70 G91 G28 X0 Y0
N75 M30
CODE EXPLANATION
N5 absolute positioning, metric unit
N10 tool change to T1
N15 define work zero point at A
N20 rapid traverse to A, spindle on (2500 RPM, CW)
N25 rapid plunge to 12.5 mm above Z0
N30 feed to Z-12.5, feed rate 150 MMPM
N35 cut line AB to B
N40 cut arc BC to C
N45 cut line CD to D
N50 cut arc DE to E
N55 cut line EA to A
N60 rapid retract to Z12.5
N65 reference point return in Z direction, spindle off
N70 reference point return in X and Y directions
N75 end of program
SAMPLE PROGRAM ON DRILLING
N1M06 T16
N2 G90 G54 G00 X0.5 Y-0.5
N3 S1450 M03
N4 G43 H16 Z1. M08
N5 G81 G99 Z-0.375 R0.1 F9.
N6 X1.5
N7 Y-1.5
N8 X0.5
N9 G80 G00 Z1. M09
N10 G53 G49 Z0. M05
N11 M30
CODE EXPLANATION

N1- Tool change (M06) to tool no.16


N2- Tool rapidly moves (G00) to first drilling position X0.5 Y-0.5 while taking into
account Zero-offset-no. 1 (G54)
N3- Drill starts rotating clockwise (M03) with 1450 rpm (S1450).
N4- Drill takes depth Z1. taking into account tool length compensation (G43 H16),
coolant is turned on (M08).
N5- Drilling cycle (G81) parameters, drill depth (Z) and cutting feed (F) are given,
with this command first drill is made at current position (X0.5 Y-0.5).
N6- As drilling cycle continues it’s work with every axis movement so next drill is
done at X1.5
N7- Third drilling hole at Y-1.5
N8- Fourth drill at X0.5
N9- Drilling cycle is cancelled (G80), Coolant is turned off (M09).
N10- Taking Machine-coordinate-system (G53) into account the drill is taken
to Z0 position. Tool length compensation is cancelled (G49), cutter rotation
is stopped (M05).
N11- CNC part-program is ended.
PART PROGRAM FOR THE MIRRORING OPERATION
BILLET X100 Y100 Z10;
TOOL DEF T1 D6;
EDGE MOVE X-50 Y-50;
G21 G94;
G91 G28 Z0;
G28 X0 Y0;
G68 X0 Y0 R45(Tilt the coordinates
to 45)
M06 T01;
M03 S1200;
G00 X0 Y0 Z5;
M98 P 011200
M70
M98 P 011200
M80
M71
M98 P 011200
M 70 M70 - X Mirror on
M98 P 011200 M71 – Y mirror on
M80
G91 G28 Z0; M80 – X mirror off
G28 X0 Y0; M81 – Y mirror off
M05;
M30;
PART PROGRAM FOR THE MIRRORING OPERATION

Save as 1200
G90
G00 X10 Y10 Z5;
G01 Z-1 F50;
G01 X 40 Y10 ; (A-F)
X 40 Y 20 (F-E)
X 20 Y20 ; (E-D)
X 20 Y40 ; (D-C)
X 10 Y40 ; (C-B)
X 10 Y10 ; (B-A)
X10 Y10 Z 5;
M99.
Typical PROGRAMMING - TURNING OPERATIONS

Write a part program for turning operations being carried out on a


CNC turning center. Let us take an exercise:
Figure shows the final profile to be generated on a bar stock by
using a CNC turning center. After studying the required part
geometry and features, the main program can be written as follows.

Figure A component to be turned.


97
98
Thank You!

99

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy