2. Computer numerical controls (CNC) machines
• The were invented to automate the machining process and
for increasing productivity. The then existing conventional
machines like lathes, milling, drilling, shaping and grinding
were in-competent to give repeatability and higher accuracy.
• Unmanned machining was not possible and manufacturing
complex curved geometries in 2D or 3D was extremely
expensive by mechanical means (which usually would
require complex jigs to control the cutter motions); these
causes led to the invention of a new class of machine tools,
categorized as the CNC’s.
3. Brief History:
• 1949: US Air Force asks MIT to develop a
"numerically controlled" machine.
• 1952: Prototype NC machine demonstrated
(punched tape input)
• 1980-CNC machines (computer used to link
directly to controller)
• 1990-DNC: external computer “drip feeds”
control programmer to machine tool controller
4. Advantages of CNC:
• These machines are easy to program.
• The existing program can be easily stored and retrieved.
• It is easy to change a program.
• It can avoid human errors
• These machines are safe to operate
• The complex geometries can be produced economically.
• They usually generates closer tolerances than manual
machines
• Considerable number of tools can be stored and held in the
tool magazine (about 8-20, depending on different models),
which can be retrieved accurately through a program.
5. Main motions executed by servo controls
~
Servo Controller
Counter Comparator
Encoder A/C Motor
Input (converted from analog to digital value)
Table
Leadscrew
6. • BLU: basic length unit smallest programmable move of each
axis.
• Controller: (Machine Control Unit, MCU) Electronic and
computerized interface between operator and the machine. It
mainly consists of the Data Processing Unit (DPU) and the
Control-Loops Unit (CLU)
• Data Processing Unit:
• It consists of the following:
• 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.
7. Control Loops Unit:
• It consists of the interpolator to supply machine-motion
commands between data points along with the position
control loop hardware for each axis of motion.
• The CNC machines are classified as under:
• Based on the type of motion: Point-to-point type or
continuous path type.
• Based on Control Loops: Open or closed loop systems.
• Based on Power Supply: Electric, hydraulic or pneumatic.
• Based on Positioning System: Incremental and absolute
systems.
9. • The output from the encoder is in the form of
electrical pulses (e.g. 500 pulses per
revolution).
• The rotation of motor is through linear motion
of the table executed by the lead-screw.
• The pitch of the lead screw is the horizontal
distance between two successive threads.
10. Part Programming:
• A computer program is required to specify the tool that should be
loaded on the machine spindle at the given cutting conditions
(speed, feed, coolant ON/OFF etc.).
• The start point and end point of a motion segment also needs to be
specified along with movement of the tool with respect to machine.
The RS274-D is a word address format. Each line of the program is
called as a block and each block comprises of several instructions or
words.
• The CNC instructions are called part program commands; while
running, a part program is interpreted. The interpretation takes place
sequentially as “one command line at a time” until all are completed.
• Commands, which are also referred to as blocks, are made up of
words which each begins with a letter address and ends with a
numerical value.
11. • Each letter address relates to a specific machine function. The “G” and
“M” letter addresses are most common. A “G” letter specifies certain
machine preparations such as inch or metric modes, or absolutes versus
incremental modes.
• The “M” letter specifies miscellaneous machine functions and work like
on/off switches for coolant flow, tool changing, or spindle rotation. Other
letter addresses are used to direct a wide variety of other machine
commands.
• The other important things to know are: Coordinate Systems (X, Y, Z, RX,
RY and RZ), units, positioning (incremental or absolute), feed rates and
spindle speeds.
• The coolant control comprises: On/off, flood and mist commands/
instructions.
12. Sequence and format of words:
• The sequence of letter codes in each program is illustrated in the following line consisting of a
series of instructions.
• N3 G2 X+1.4 Y+1.4 Z+1.4 I1.4 J1.4 K1.4 F3.2 S4 T4 M2
• N codes- These are sequence numbers specifying the line number to be executed by the MCU.
• G codes- These are preparatory functions, specifying initial machine setup and operating
conditions.
• Axis Codes: X, Y, Z - Used to specify motion of the slide along X, Y, Z directions.
• Feed and Speed Codes: F and S- Specify feed and spindle speed
• O - Program number (Used for program identification)
• 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 functions
13. Most common G codes:
• G00 – Preparatory code to control final position of the tool and not concerned
with the path that is followed in arriving at the final destination.
• G01 – Tool is required to move in a straight line connecting current position and
final position. Used for tool movement without any machining- point to point
control. (linear interpolation)
• G02 – Tool path followed is along an arc specified by I, J and K codes. (circular
interpolation)
• 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
• G28 Returns to the machines reference position (zero position)
14. G codes (Cont..d)
• G40 Cutter compensation cancel
• G41 Cutter compensation left
• G42 Cutter compensation right
• G43 Tool length compensation (plus)
• G44 Tool length compensation (minus)
• G49 Tool length compensation cancel
• G54 Indicates the part (0,0) to the center of table
• G80 Cancel canned cycles
• G81 Drilling cycle
• G82 Counter boring cycle
• G83 Deep hole drilling cycle
• G90 Absolute positioning
• G91 Incremental positioning
15. M Codes
• M00 Program stop
• M01 Optional program stop
• M02 Program end
• M03 Spindle on clockwise
• M04 Spindle on counterclockwise
• M05 Spindle stop
• M06 Tool change
• M08 Coolant on
• M09 Coolant off
• M10 Clamps on
• M11 Clamps off
• M30 End of program, rewind and reset mode.
16. Referencing & Initial tool setting
• During initial tool setting, a device “Edge finder” is used. It
helps to set the zero position (reference). Bring this tool to
required X point, Y point and Z point and press the “position
button”.
– This location is stored in the memory in G 54. It becomes (0,0,0).
Next, in the actual programming, the tool path is set as per this
reference point stored in G 54.
• In the absence of an edge finder, a suitable tool (drill) or
reamer) could be used to manually set X, Y and Z reference
position by touching each sides and storing its value in G 54
through zero position setting.
17. % (N)
N100 G21; {Metric Units}
N110 G0 G17 G40 G49 G80 G91; {Rapid, XY Plane; Cancel: cutter compensation, Tool length compensation &
cancel canned cycle; Incremental programming}
N120 T1 M6; {Tool change}
N130 G0 G90 G54 X0. Y0. M03 S1000; {Through this command, tool reference position is set, 2 mm before X}
N140 M08; {Coolant on}
N150 G01 X20. Y20. Z2; {Bring to “A” position & 2 mm above Z}
N160 Z-20 F1.2; {Drill 20 mm depth at a feed rate of 1.2 mm/rev}
N170 Z02; {Return above to Z2 at same feed}
N180 Y80 F600; {Bring to “B” position & 2 mm above Z}
N190 Z-20 F1.2; {Drill 20 mm depth at a feed rate of 1.2 mm/rev}
N200 Z02; {Return above to Z2 at same feed}
N210 Y80 F 600; {Bring to “C” position & 2 mm above Z}
N220 Z-20 F1.2; {Drill 20 mm depth at a feed rate of 1.2 mm/rev}
N230 Z02; {Return above to Z2 at same feed}
N240 X20 F600; {Bring to “D” position & 2 mm above Z}
N250 Z-20 F1.2; {Drill 20 mm depth at a feed rate of 1.2 mm/rev}
N260 Z02; {Return above to Z2 at same feed}
N270 Z 100; {Move the tool away to 100 mm above}
N280 G90 M09 G28; { Absolute positioning & return to original reference position}
N290 M30 {Spindle/ Machine close/ stop}
100 mm
100 mm
Tool: Drill
Dia.: 10 mm
60 mm
60 mm
A B
C
D
18. % (N)
N100 G21; {Metric Units} {CNC PROGRAM FOR MARKING A SLOT 12 mm, 3mm depth as
shown}
N110 G00 G17 G40 G49 G80 G91; {Rapid, XY Plane; Cancel: cutter compensation, Tool length compensation
& cancel canned cycle; Incremental programming}
N120 T2 M6; {Tool change}
N130 G0 G90 G54 X0 Y0 M03 S1000; {Through this command, tool reference position is set, 2 mm before X}
N140 M08; {Coolant on}
N150 G01 X20 Y50 Z2; {Bring to “A” position & 2 mm above Z}
N160 Z-3 F 0.3; {Create a slot 3 mm depth at a feed rate of 0.3 mm/rev}
N170 X80; {Move along X direction till 60 mm at same feed , 0.3 mm/rev}
N180 Z02 F 1.0; {Return above to Z2 at same feed}
N190 Z 100; {Move the tool away to 100 mm above}
N200 G90 M09 G28; { Absolute positioning & return to original reference position}
N210 M30 {Spindle/ Machine close/ stop}
100 mm
100 mm
Tool: End mill
Dia: 12 mm
60 mm
50
mm
B
A
19. (USING A TOOL OF 25 mm dia, the FACE MILLING cutter completes the work in 2 passes)
% (N)
N100 G21; {Metric Units}
N110 G00 G17 G40 G49 G80 G91; {Rapid, XY Plane; Cancel: cutter compensation, Tool length compensation
& cancel canned cycle; Incremental programming}
N120 T3 M6; {Tool change}
N130 G0 G90 G54 X0 Y0 M03 S1000; {Through this command, tool reference position is set, 2 mm before X}
N140 M08; {Coolant on}
N150 G01 X -15 Y 12 Z2; {Bring to “A” position & 2 mm above Z}
N160 Z-2 F 0.5; {Create a slot 3 mm depth at a feed rate of 0.5 mm/rev}
N170 X 150; {Move along X direction till 150 mm at same feed , 0.5 mm/rev}
N180 Y 35 F 100; {Move along Y 35 mm for second side facing }
N190 X -15 F 0.5; {Move X to -15 at feed rate = 0.5 mm/rev}
N190 Z 100; {Move the tool away to 100 mm above}
N200 G90 M09 G28; { Absolute positioning & return to original reference position}
N210 M30 {Spindle/ Machine close/ stop}
120 mm
45 mm
Tool Dia = 25 mm
M. S plate 120 x 45 x 12 mm is to be face milled to 10 mm thickness
20. CNC Machines
Adaptive Controls:
The controller adapts to the machining/ work piece variations arising due to:
• Hard Spots
• Change in surface roughness
• Slots and blind spaces etc.
• Other variations
• Whenever there is an increase/OR/ decrease in cutting forces, the sensor
senses it and immediately instructs the controller to reduce the speed/
feed accordingly, thereby saving the tool from getting blunt.
• It also improving productivity whenever the material is excessively soft or
when there is a large blind path, to increase the speed.