Computer Numerical Control
Sudip Phuyal
MS by Research
Dept. of Electrical and Electronics Engineering
Sunday, June 24, 2018
• Introduction to CNC
• Types of CNC machines
• Numerical Control Coordinate System
• CNC controller
• Part Programming for CNC
• Direct Numerical Control
• Applications of CNC
• Adaptive control machining and developments
Contents
Introduction
• CNC (Computer Numerical Control) is the
name received to machines that are able to
position a tool without human assistance
• To position the tool, CNC machines have an
interpreter that translate a series of
instructions (G-Code) to electronic orders
(for example, step and direction signals)
Introduction
Fig: Machine Control System
We can classify these machines by:
• Number of axis
• Tool used
• Control system
• Motion system
There are other variable elements in a CNC machine, but these
elements don’t change the way our machine works (for example the
materials used to build it).
Types of CNC machines
1. Two axis machines
They are two axis machines work like a plotter
Classification based on number of axis
2. Three axis CNC Machines
Classification based on number of axis
They are commonly used in
wood carving and 3D
modelling
3. Four or more axis
With four or more axis we can orientate the tool, adding more
possibilities of machining:
Classification based on number of axis
They are more popular
in CNC Lathes for
metalworks
Tools
Spindle Plasma CutterLaser Cutter
• We can use a open loop or closed loop control system
• Open loop uses stepper motors to reach a position. We’ll study them
later.
Control system
• When we use DC, AC or lineal motors we have to use a closed loop
control system
• To capture the position of the tool we need an encoder for each axis,
increasing total cost
• Most CNC machines use stepper motors due to their low cost and
high precision (0.9º per steep
Control system
• There are two type of motion elements:
• Active elements: They transmit movement from position motors to mobile
elements
• Passive elements: They act like a guide or rail for mobile elements
Motion system
Motion system
Leadscrews
Ballscrews
Rack and pinion
Belts
Linear and radial bearings
Stepper motor
Motion Actuators
• AC or DC motors are less used in CNC machines than stepper
motors due to requirement of encoders,
• Linear motors are not suitable for heavy loads and are expensive
AC or DC motor Linear motors
Numerical Control
• Programmable automation in which the mechanical actions of a
‘machine tool’ are controlled by a program containing coded
alphanumeric data that represents relative positions between a work
head (e.g., cutting tool) and a work part
Machine
Control Unit
Power
Program
Instructions
Transformation
Process
NC Co-ordinate System
Fig: NC Co-ordinate system [5]
For flat and prismatic (block-like) parts:
• Milling and drilling operations
• Conventional Cartesian coordinate system
• Rotational axes about each linear axis
For rotational parts:
• Turning operations
• Only x- and z-axes
Motion Control Systems
Point-to-Point systems
• Also called position systems
• System moves to a location and performs an
operation at that location (e.g., drilling)
• Also applicable in robotics
Continuous path systems
• Also called contouring systems in machining
• System performs an operation during movement
(e.g., milling and turning)
Fig: Motion Control systems [5]
• It has to receive a list of G-code instructions and translate it to
electronic signals
• These electronics signals are sent to motor controllers. These
controllers act like a power stage, amplifying and translating the
signals that motors will receive
CNC Motor controller
Programming a CNC
• The code used to program CNC machines is generically called Part
Programming
• G-code instructions are the major part of the programming language
• Specifically, G-codes give CNC machines the coordinates from which
to hold and engage the machining tool in order to cut and shape
metal to certain specifications.
• The entire series of codes used to operate CNC machines also include
M-codes and T-Codes, which manage the CNC machine and drill tool,
respectively. Tooling speed and feed controls are dictated by S-Codes
and F-Codes, while X, Y, and Z-codes determine absolute position.
G-code (Geometric code)
Part Programming Key Letters
O - Program number (Used for program identification)
N – Sequence / Line number (Used for line identification)
G - Motion
X,Y,Z - Axis designation
R - Radius designation
F – Feed rate designation
S - Spindle speed designation
T - Tool Designation
H - Tool length offset designation
D - Tool radius offset designation
M - Miscellaneous function
Motion instructions (G Codes)
G00 – Positioning at rapid
speed
G01 – Linear interpolation
(machining a straight line)
G02 – CW Circular
interpolation (machining arcs)
G03 – CCW Circular
interpolation
G09 – Exact stop
G12 – Circular pocket milling, CW
G13 – Circular pocket milling, CCW
G17 – X-Y plane for arc machining
G18 – Z-X plane for arc machining
G19 – Z-Y plane for arc machining
G20 – Imperial units (Inch)
G21 – Metric units (mm)
Miscellaneous functions (M Codes)
M00 – Program stop
M01 – Optional program stop
M02 – End of program
M03 – Spindle on clockwise
M04 – Spindle on CCW
M05 – Spindle stop
M06 – Tool change
M08 – Flood coolant on
M09 – Flood coolant off
M30 – End of program/return to
start
M41 – Spindle low gear range
M42 – Spindle high gear range
Sample Part Programming
O1284 (Program number)
N02 G21 (Metric programming)
N03 M03 S1000
(Spindle start clockwise with
1000rpm)
N04 G00 X0 Y0 (Rapid motion towards (0,0))
N05 G00 Z-10.0
(Rapid motion towards Z=-10
plane)
N06 G01 X50.0 (Linear interpolation)
N07 G01 Y20.0 (Linear interpolation)
N08 G02 X25.0 Y45.0 R25.0
(Circular interpolation
clockwise)
N09 G03 X-25.0 Y45.0 R25.0
(Circular interpolation
counter clockwise)
N10 G02 X-50.0 Y20.0 R25.0
(Circular interpolation
clockwise)
N11 G01 Y0.0 (Linear interpolation)
N12 G01 X0.0 (Linear interpolation)
N13 G00 Z10.0
(Rapid motion towards
Z=10 plane)
N14 M05 M09
(Spindle stop and
program end)
Direct Numerical Control (DNC)
• Direct Numerical Control or Distributed Numerical Control (DNC) is a
common manufacturing term for networking CNC machine tools
consisting of central computer connected to machine tool MCUs
• In some CNC machine controllers, the available memory is too small
to contain the machining program (for example machining complex
surfaces), in this case the program is stored in a separate computer
and sent directly to the machine, one block at a time
• DNC networking or DNC communication is always required
when CAM programs are to run on some CNC machine control
• Usually, the CNC manufacturer provides suitable DNC software
Direct Numerical Control (DNC)
Machine
Control Unit
Transformation
Process
Machine
Control Unit
Machine
Control Unit
Central
Computer NC Pgms
BTR BTR BTR
Computer Network
Fig: Distributed / Direct Numerical Control [6]
Applications of CNC
• Batch and High Volume production
• Repeat and/or Repetitive orders
• Complex part geometries
• Mundane operations
• Many separate operations on one part
Adaptive Control Machining
NC System
CNC Machine
Tool
Sensors
Adaptive
Controller
Part Program
Constraints, Strategy and
Performance Index
Drive
Command
Position
Command
Fig: Block diagram of adaptive control Machining
Adaptive Control Machining
• It is a logical extension of the CNC-mechanism
• In CNC mechanism the cutting speed and feed rates are prescribed by
the part programmer
• Adaptive control determines proper speeds and feeds during
machining as a function of variation in work piece hardness, width of
cut, air gaps in part geometry etc.
• there is improvement in the production rate and reduction in the
machining cost as a result of calculating and setting of optimal
parameters during machining
• Recent adaptive control uses microprocessor based controls and is
typically integrated with an existing CNC system [7]
Functions of adaptive Control
The three functions of adaptive control are:
1. Identification
Using the feedback data from the process performance quality of the system is
identified
2. Decision
Once the system performance is determined, the decision is carried out by
comparison with pre-programmed logic provided by the designer
3. Modification
Modification is concerned with a physical or mechanical change in the system
Developments in Computer Numerical Control
• Computer Aided Manufacturing (CAM) is widely implemented
• Adaptive control machining Increased production rates, Increased
tool life, Greater part protection and Less operator intervention
• Direct Numerical Control reduced the required memory size of CNC
machine controllers and distributed control of many CNCs in the same
network
• Laser cutting, Plasma Cutting and 3D printing technologies are the
latest developments of CNC technology
References
• http://nptel.ac.in/courses/112102103/Module%20F/Module%20F(1)/
p9.htm
• www.editcnc.com
• www.cnctrainingcentre.com
Thank You !

Computer numerical control (CNC)

  • 1.
    Computer Numerical Control SudipPhuyal MS by Research Dept. of Electrical and Electronics Engineering Sunday, June 24, 2018
  • 2.
    • Introduction toCNC • Types of CNC machines • Numerical Control Coordinate System • CNC controller • Part Programming for CNC • Direct Numerical Control • Applications of CNC • Adaptive control machining and developments Contents
  • 3.
    Introduction • CNC (ComputerNumerical Control) is the name received to machines that are able to position a tool without human assistance • To position the tool, CNC machines have an interpreter that translate a series of instructions (G-Code) to electronic orders (for example, step and direction signals)
  • 4.
  • 5.
    We can classifythese machines by: • Number of axis • Tool used • Control system • Motion system There are other variable elements in a CNC machine, but these elements don’t change the way our machine works (for example the materials used to build it). Types of CNC machines
  • 6.
    1. Two axismachines They are two axis machines work like a plotter Classification based on number of axis
  • 7.
    2. Three axisCNC Machines Classification based on number of axis They are commonly used in wood carving and 3D modelling
  • 8.
    3. Four ormore axis With four or more axis we can orientate the tool, adding more possibilities of machining: Classification based on number of axis They are more popular in CNC Lathes for metalworks
  • 9.
  • 10.
    • We canuse a open loop or closed loop control system • Open loop uses stepper motors to reach a position. We’ll study them later. Control system
  • 11.
    • When weuse DC, AC or lineal motors we have to use a closed loop control system • To capture the position of the tool we need an encoder for each axis, increasing total cost • Most CNC machines use stepper motors due to their low cost and high precision (0.9º per steep Control system
  • 12.
    • There aretwo type of motion elements: • Active elements: They transmit movement from position motors to mobile elements • Passive elements: They act like a guide or rail for mobile elements Motion system
  • 13.
    Motion system Leadscrews Ballscrews Rack andpinion Belts Linear and radial bearings
  • 14.
    Stepper motor Motion Actuators •AC or DC motors are less used in CNC machines than stepper motors due to requirement of encoders, • Linear motors are not suitable for heavy loads and are expensive AC or DC motor Linear motors
  • 15.
    Numerical Control • Programmableautomation in which the mechanical actions of a ‘machine tool’ are controlled by a program containing coded alphanumeric data that represents relative positions between a work head (e.g., cutting tool) and a work part Machine Control Unit Power Program Instructions Transformation Process
  • 16.
    NC Co-ordinate System Fig:NC Co-ordinate system [5] For flat and prismatic (block-like) parts: • Milling and drilling operations • Conventional Cartesian coordinate system • Rotational axes about each linear axis For rotational parts: • Turning operations • Only x- and z-axes
  • 17.
    Motion Control Systems Point-to-Pointsystems • Also called position systems • System moves to a location and performs an operation at that location (e.g., drilling) • Also applicable in robotics Continuous path systems • Also called contouring systems in machining • System performs an operation during movement (e.g., milling and turning) Fig: Motion Control systems [5]
  • 18.
    • It hasto receive a list of G-code instructions and translate it to electronic signals • These electronics signals are sent to motor controllers. These controllers act like a power stage, amplifying and translating the signals that motors will receive CNC Motor controller
  • 19.
    Programming a CNC •The code used to program CNC machines is generically called Part Programming • G-code instructions are the major part of the programming language
  • 20.
    • Specifically, G-codesgive CNC machines the coordinates from which to hold and engage the machining tool in order to cut and shape metal to certain specifications. • The entire series of codes used to operate CNC machines also include M-codes and T-Codes, which manage the CNC machine and drill tool, respectively. Tooling speed and feed controls are dictated by S-Codes and F-Codes, while X, Y, and Z-codes determine absolute position. G-code (Geometric code)
  • 21.
    Part Programming KeyLetters O - Program number (Used for program identification) N – Sequence / Line number (Used for line identification) G - Motion X,Y,Z - Axis designation R - Radius designation F – Feed rate designation S - Spindle speed designation T - Tool Designation H - Tool length offset designation D - Tool radius offset designation M - Miscellaneous function
  • 22.
    Motion instructions (GCodes) G00 – Positioning at rapid speed G01 – Linear interpolation (machining a straight line) G02 – CW Circular interpolation (machining arcs) G03 – CCW Circular interpolation G09 – Exact stop G12 – Circular pocket milling, CW G13 – Circular pocket milling, CCW G17 – X-Y plane for arc machining G18 – Z-X plane for arc machining G19 – Z-Y plane for arc machining G20 – Imperial units (Inch) G21 – Metric units (mm)
  • 23.
    Miscellaneous functions (MCodes) M00 – Program stop M01 – Optional program stop M02 – End of program M03 – Spindle on clockwise M04 – Spindle on CCW M05 – Spindle stop M06 – Tool change M08 – Flood coolant on M09 – Flood coolant off M30 – End of program/return to start M41 – Spindle low gear range M42 – Spindle high gear range
  • 24.
    Sample Part Programming O1284(Program number) N02 G21 (Metric programming) N03 M03 S1000 (Spindle start clockwise with 1000rpm) N04 G00 X0 Y0 (Rapid motion towards (0,0)) N05 G00 Z-10.0 (Rapid motion towards Z=-10 plane) N06 G01 X50.0 (Linear interpolation) N07 G01 Y20.0 (Linear interpolation) N08 G02 X25.0 Y45.0 R25.0 (Circular interpolation clockwise) N09 G03 X-25.0 Y45.0 R25.0 (Circular interpolation counter clockwise) N10 G02 X-50.0 Y20.0 R25.0 (Circular interpolation clockwise) N11 G01 Y0.0 (Linear interpolation) N12 G01 X0.0 (Linear interpolation) N13 G00 Z10.0 (Rapid motion towards Z=10 plane) N14 M05 M09 (Spindle stop and program end)
  • 25.
    Direct Numerical Control(DNC) • Direct Numerical Control or Distributed Numerical Control (DNC) is a common manufacturing term for networking CNC machine tools consisting of central computer connected to machine tool MCUs • In some CNC machine controllers, the available memory is too small to contain the machining program (for example machining complex surfaces), in this case the program is stored in a separate computer and sent directly to the machine, one block at a time
  • 26.
    • DNC networkingor DNC communication is always required when CAM programs are to run on some CNC machine control • Usually, the CNC manufacturer provides suitable DNC software Direct Numerical Control (DNC)
  • 27.
    Machine Control Unit Transformation Process Machine Control Unit Machine ControlUnit Central Computer NC Pgms BTR BTR BTR Computer Network Fig: Distributed / Direct Numerical Control [6]
  • 28.
    Applications of CNC •Batch and High Volume production • Repeat and/or Repetitive orders • Complex part geometries • Mundane operations • Many separate operations on one part
  • 29.
    Adaptive Control Machining NCSystem CNC Machine Tool Sensors Adaptive Controller Part Program Constraints, Strategy and Performance Index Drive Command Position Command Fig: Block diagram of adaptive control Machining
  • 30.
    Adaptive Control Machining •It is a logical extension of the CNC-mechanism • In CNC mechanism the cutting speed and feed rates are prescribed by the part programmer • Adaptive control determines proper speeds and feeds during machining as a function of variation in work piece hardness, width of cut, air gaps in part geometry etc. • there is improvement in the production rate and reduction in the machining cost as a result of calculating and setting of optimal parameters during machining • Recent adaptive control uses microprocessor based controls and is typically integrated with an existing CNC system [7]
  • 31.
    Functions of adaptiveControl The three functions of adaptive control are: 1. Identification Using the feedback data from the process performance quality of the system is identified 2. Decision Once the system performance is determined, the decision is carried out by comparison with pre-programmed logic provided by the designer 3. Modification Modification is concerned with a physical or mechanical change in the system
  • 32.
    Developments in ComputerNumerical Control • Computer Aided Manufacturing (CAM) is widely implemented • Adaptive control machining Increased production rates, Increased tool life, Greater part protection and Less operator intervention • Direct Numerical Control reduced the required memory size of CNC machine controllers and distributed control of many CNCs in the same network • Laser cutting, Plasma Cutting and 3D printing technologies are the latest developments of CNC technology
  • 33.
  • 34.

Editor's Notes

  • #4 Tool means Milling tool used in CNC
  • #15 AC or DC motors requires encoders and special control mechanism
  • #31 In adaptive control, this measure is called the index of performance (IP).