HARBAIL

MECH. RULZ.

Friday, May 05, 2006

Computer Numerical Control (CNC)

The abbreviation CNC stands for Computer Numerical Control, and refers specifically to the computer control of machine tools for the purpose of (repeatedly) manufacturing complex parts in metal as well as other materials, using a program written in a notation conforming to the EIA-274-D standard and commonly called G-code. CNC was developed in the late 1940s and early 1950s by the MIT Servomechanisms Laboratory. CNC machines were relatively briefly preceded by the less advanced NC, or Numerical(ly) Control(led), machines.


Description

The introduction of CNC machines radically changed the manufacturing industry. Curves are as easy to cut as straight lines, complex 3-D structures are relatively easy to produce, and the number of machining steps that required human action have been dramatically reduced.

With the increased automation of manufacturing processes with CNC machining, considerable improvements in consistency and quality have been achieved. CNC automation reduced the frequency of errors and provided CNC operators with time to perform additional tasks. CNC automation also allows for more flexibility in the way parts are held in the manufacturing process and the time required to change the machine to produce different components.

In a production environment, a series of CNC machines may be combined into one station, commonly called a "cell", to progressively machine a part requiring several operations. CNC machines today are controlled directly from files created by CAM software packages, so that a part or assembly can go directly from design to manufacturing without the need of producing a drafted paper drawing of the manufactured component. In a sense, the CNC machines represent a special segment of industrial robot systems, as they are programmable to perform many kinds of machining operations (within their designed physical limits, like other robotic systems).

Basic ISO CNC Code
|
M03, M04, M05 Spindle CW, Spindle CCW, Spindle Stop
|
M08, M09 Coolant/lubricant on, Coolant/lubricant off
M02 Program Stop
M30 Program end, rewind
M99 Subprogram end
M00, M01 Program stop, optional stop
|
G96, G97 Constant surface speed, Constant Spindle speed
G50 Maximum spindle speed
G18, G19 Feed mm pr revolvation, feed mm/min
G00, G01 rapid movement, Linear Interpolation (cutting in a straight line)
|
F Feed
S Spindle Speed
|
direction Coordinats X Y Z A B C



Example of a simple CNC lathe program

the stock and the part the program producesO1234
G50 S2000
G96 S300 M03
G00 T0606 (ROUGHT TURN TOOL)
G18 X37. Z0.
G01 X-1. F0.2
Z1.
G00 X30.
G01 Z-20.
X33.
X35. Z-21.
Z-25.
X37.
G00 X150. Z300.
M01
T0101 (18MM DRILL)
G97 S1000
G19 M03
X0. Z5.
G01 Z-25. F100
G00 Z5.
X150. Z300.
M05
M30



Example of a simple CNC milling program

A simple example might be a 4" x 2" rectangle. The basic code might read something like:


the stock and the part the program producesN1X0Y0T01
N2X0Y2000
N3X4000Y2000
N4X4000Y0
N5X0Y0
N6M00

Line 1 (N1) tells the machine to traverse to grid point X0Y0 and to pick tool #1
Line 2 tells the machine to traverse to grid point X0Y2.000
Line 3 tells the machine to travel to grid point X4.000Y2.000
Line 4 tells the machine to travel to grid point X4.000Y0
Line 5 returns the machine to origin
Line 6 stops the machine
Note that the program does nothing to define the tool cutting path. If the machine is a router and uses a 1/8" radius cutter, the actual part will end up 1/4" smaller than designed (1/8" per side). To compensate, a G-code command (in this case) may be used to adjust the tool path.
N1G44M0125
N2X0Y0T01
N3X0Y2000
N4X4000Y2000
N5X4000Y0
N6X0Y0
N7M00

In this case, the controller sees the first line and adjusts the location of the cutter to .125 (or 1/8") to the outside of the cutting profile. Now the machine will make a part that matches the one designed. Depending on the cutting tool, the compensation can be set as needed. For example, a laser with a very fine beam might have a compensation of .005", while a waterjet with a .060 inside tip diameter may need a compensation of .030