This document provides an introduction and overview of computer numerical control (CNC) machines. It discusses the history and development of CNC machines, comparing them to conventional machines. The key components of CNC machines are described, including the feed drive, measuring system, tool turret, and coordinate system. Different types of CNC machines are classified based on their motion, control loops, number of axes, and power supply. Programming codes for CNC machines are introduced, including G codes for preparatory functions and M codes for miscellaneous functions. Examples of basic CNC programs for turning, milling, and drilling operations are provided.
4. History and Development of Technology
Conventional M/C
NC M/C
(1948 US Air force, MIT 21 months )
1997 1stcommercial NC m/c
“CINCINNATIC HYDROTEL VERTICAL-SPINDLE MACHINE “
CNC M/C
6. Conventional vs. CNC machine
Machine Structure
The CNC machine tools are basically built in the same
way as conventional machine tools. The difference lies
in the fact that the machine components relevant for
turning and milling processes are controlled by
computers.
9. Conventional vs. CNC machine
Conventional machine
eyes, hands, brain, skill
CNC machine
ProgramControl u n i t M o t o r
M
o
t
i
o
n
Measuring & Reflection Unit
No skill is required for operating CNC m/c .
11. Difference between Conventional M/C & CNC M/C
Item Conventional
machine
CNC
machine
1. Movement Acme screw Ball screw
2. Feed Manual Motor
3. Measurement Manual Linear scale
12. Advantages of CNC
• Flexible, high accuracy
• Short production time
• Complex shapes
• Short setting time
• No skill requirement
• Short inspection time/ high quality product
• Low cost
13. Disadvantages of CNC
• High machine cost
• Complicated maintenance
• Skill & training are required for programming and
maintenance.
• Parts are imported from aboard.
• High tooling cost
• Temperature, humidity & dust must be controlled.
18. Feed drive
Measuring system Direct / Indirect
Work spindle hydraulic
Cooling system reduce heat
Tool turret
Component and Function of CNC
40. Driving System
The requirement is that the driving system has to response accurately according to the programmed
instructions.
The motor is coupled either directly or through a gear box to the machine lead screw to moves the
machine slide or the spindle.
Three types of electrical motors are commonly used:
1. Stepping motor
2. DC Servo motor
3. AC Servo moto
41. 1. Stepping Motor
The stepper motor is known by its property to convert a train of input pulses (typically square wave pulses)
into a precisely defined increment in the shaft position.
Each pulse moves the shaft through a fixed angle.
Multiple "toothed" electromagnets arranged around a central gear-shaped piece ofiron.
The electromagnets are energized by an external driver circuit or a micro controller. In that way, the motor can
be turned by a precise angle.
42. To make the motor shaft turn, first, one electromagnet is given power, which magnetically attracts the
gear's teeth.
When the gear's teeth are aligned to the first electromagnet, they are slightly offset from the next
electromagnet.
This means that when the next electromagnet is turned on and the first is turned off, the gear rotates
slightly to align with the next one.
From there the process is repeated. Each of those rotations is called a "step", with an integer number of
steps making a full rotation.
What does Stepper means?
49. How many steps are required for one complete revolution?
Six pole rotor, two electro magnets
50. The top electromagnet (1) is turned
on, attracting the nearest teeth of a
gear-shaped iron rotor. With the
teeth aligned to electromagnet 1,
they will be slightly offset from
electromagnet 2
electromagnet (1) is
The top
turned off, right
electromagnet
and the
(2) is energized,
pulling the nearest teeth slightly
to the right. This results in a
rotation of 3.6° in this example.
Practical Stepper motor operation
51. The bottom electromagnet (3)
is energized; another 3.6°
rotation occurs.
The left electromagnet (4) is enabled,
rotating again by 3.6°. When the top
electromagnet (1) is again enabled,
the teeth in the sprocket will have
rotated by one tooth position; since
there are 25 teeth, it will take 100
steps to make a full rotation in this
example.
55. Step 1 0 0 1 1
Step 2 1 0 1 0
Step 3 1 1 0 0
Step 4 0 1 0 1
+
CW CCW
Control sequence to turn a stepper motor
56. Advantages:-
Low cost for control achieved
Ruggedness
Simplicity of construction
Can operate in an open loop control system
Low maintenance
Less likely to stall or slip
Will work in any environment
Disadvantages:-
Require a dedicated control circuit
Use more current than D.C. motors
High torque output achieved at low speeds
Advantages / Disadvantages
57. Open Loop Positioning Systems
Stepper Motor calculations
It uses a stepper motor to rotate the lead screw. A stepper motor is driven by series of
electrical pulses generated by MCU.
For each pulse the motor rotates a fraction of revolution called Step Angle, it is givenby
Where, ns = Number of step angles for the motor (aninteger).
If np is the pulses received by the motor then angle through which motor rotates is
58. Stepper Motor calculations
Lead Screw is connected to the motor shaft through a gear box.
Angle of the lead screw rotation taking the gear ratio into account is givenby
rg = Gear ratio
= Am/A= Nm/ N
Nm= RPM of motor, N= RPM of lead Screw
The linear movement of worktable is given by
p = pitch of lead screw
59. Stepper Motor calculations
Total number of pulses required to achieve a specified x-position increment is calculated by:
Where ,ns = 360/α
Control pulses are transmitted from pulse generator at a certain frequency which drives the work table at
the corresponding velocity.
The rotational speed of lead screw depends on the frequencyof
the pulse train
Equation (1)
N = RPM of lead screw, fp = frequency of pulse train (Hz, Pulses/sec)
60. Stepper Motor calculations
The table travel speed in the direction of lead screw axis is determinedby:
Equation (2)
Where, Vt = Table travel speed (mm/min)
fr = Table feed rate(mm/min)
p= Lead screw pitch (mm/rev)
The required pulse train frequency to drive the table at aspecified
linear travel rate by combining equations (1) and (2):
61. 2. DC Servo Motor
The principle of operation is based on the rotation of an armature winding in a permanently energized
magnetic field.
The armature winding is connected to a commutator, which is a cylinder of insulated copper segments
mounted on the shaft.
DC current is passed to the commutator through carbon brushes, which are connected to the machine
terminals.
62. Servo Motor Detail
+ 5V
Actuator
Reduction gear
Position feedback
Potentiometer
(closed loop system)
Small electric DC motor
63. 3. AC Servo Motor
In an AC servomotor, the rotor is a permanent magnet while the stator is
windings.
equipped with 3-phase
The speed of the rotor is equal to the rotational frequency of the magnetic field of the stator, which
is regulated by the frequency converter.
64. CNC Programming
Programming consists of a series of instructions in form of letter codes
Preparatory Codes:
G codes- Initial machining setup and establishing operating conditions
N codes- specify program line number to executed by the MCU
Axis Codes: X,Y,Z - Used to specify motion of the slide along X, Y,Z direction
Feed and Speed Codes: F and S- Specify feed and spindle speed
Tool codes: T – specify tool number
Miscellaneous codes – M codes For coolant control and otheractivities
65. Programming Key Letters
O - Program number (Used for programidentification)
N - Sequence number (Used for line identification)
G - Preparatory function
X - X axis designation
Y - Y axisdesignation
Z - Z axis designation
R - Radius designation
F – Feed rate designation
S - Spindle speed designation
H - Tool length offset designation
D - Tool radius offset designation
T - Tool Designation
M - Miscellaneous function
66. Table of Important G Codes
G codes are instructions describing machine tool movement
G00: Rapid Transverse
G01: Linear Interpolation
G02: Circular Interpolation, CW
G03: Circular Interpolation, CCW
G17: XY Plane, G18: XZ Plane,G19:YZ Plane
G20/G70: Inch units
G21/G71: Metric Units
G40: Cutter compensation cancel
G41: Cutter compensation left
G42: Cutter compensationright
68. Table of Important M codes
M Codes are instructions
miscellaneous
describing
functions like calling
rotation, coolant
the tool,
on/off
spindle
etc.,