Sie sind auf Seite 1von 25

# NC i CNC maine

History: US Air Force commissioned MIT to develop the first "numerically controlled"
machine in 1949. It was demonstrated in 1952.

## Motivation: To manufacture complex curved geometries in 2D or 3D was extremely

expensive by mechanical means (which usually would require complex jigs to control
the cutter motions).

Most modern machine tool companies manufacture only NC or CNC machine tools.
The dominant advantages of NC machines are:

## A brief look at conventional milling machines:

The above picture shows a simple 3-axis vertical milling machine. The following
figures show schematic views of different popular types of milling machines.

Schematic of a vertical milling machine [source: Mfg Engg & Tech, Kalpakjian]
Schematic of a horizontal milling machine [source: Mfg Engg & Tech, Kalpakjian]

In manual milling, the operator rotates the X- Y- and Z- axis lead-screws to move the
machine table. In NC machines, the three lead-screws are driven by motors.

Control of NC Machines

The most common motor types for larger machines are servo-controlled motors.
A schematic of the servo control hardware

Depending upon the hardware the smallest distance unit that the machine tool can
be moved by is referred to as a BLU (Basic Length Unit). In practice, the BLU is
equivalent to the accuracy of the machine tool.

## Every NC machine tool structurally has two components:

- The conventional machine tool, with servo motors to drive the lead-screws

## - A Machine Control Unit (MCU), or the controller.

The MCU is made up of a Data Processing Unit (DPU) and a Control-Loops Unit (CLU).

## Decoders to distribute data to the axes controllers.

Control Loops Unit:

Point-to-Point

Continuous path

Open loop

Closed loop

Electric

Hydraulic

Pneumatic

Incremental

Absolute

## - Usually used for Drilling type of operations;

- Each axis is driven separately;

## The following figure shows the basic idea of the control

circuits in a PTP controller for a drilling machine, using stepper motors for

## How does this control logic work ?

The end-of-count circuit is in logical ON state while the table is being

moved by the stepper motor. When the table reaches its required

position, it turns the line voltage to 0 (logical OFF). This switches off the

AND gate, and stops any further pulses to the drive unit.

## value), then the corresponding End-of-count line is at logical 1 (ON) ,

and the OR gate output is ON. When the OR gate turns OFF, the machine can

start drilling.

## In most modern NC machines, the actuator is a servo-motor,

and the control system is a closed loop feedback system, with an encoder (see

figure below) to provide feedback on the actual position of the table. This

## feedback is used to control the speed of the motion.

Two types of encoder configurations [source: Kalpakjiam]

## compared to the open-loop systems are shown in the following figure.

(a) Open loop control, (b) Closed loop control of NC

## Machines with stepper motors move in discrete length units,

since each pulse to the stepper motor makes it rotate through a fixed, finite

angle.

## Rotational motion of the motor is converted to linear motion

of the table by the leadscrew. The pitch of the leadscrew is the horizontal

distance between successive threads of the screw. Most screws have single

threads (called single start screw) -- in this case, the pitch equals the

## horizontal distance moved by the table in one revolution of the table.

Similarly, for a double start thread, the horizontal distance

## to move (programming resolution of the machine) is called a Basic Length Unit

(BLU).

Example:

A Stepping motor of 20 steps per revolution moves a machine table through a leadscrew of 0.2 mm
pitch.

Example:

## A DC servo-motor is coupled to a leadscrew (pitch 5mm)

of a machine table. A digital encoder, which emits 500 pulses per revolution,
is mounted on the leadscrew. If the motor rotates at 600 rpm, find

## (c) The frequency of pulses emitted by the encoder.

Manual NC Programming

## In the control of NC machines, the programmer (usually

called the part programmer) writes the instructions for the machine tool

## - Which tool should be loaded on the machine spindle;

- What are the cutting conditions (speed, feed, coolant ON/OFF etc)

## - The start point and end point of a motion segment

- how to move the tool with respect to the machine.

## The motion of the machine tool with respect to the part

depends on the machine and the controller capabilities. Many drilling machines

use PTP control. Most milling machines can perform contouring -- that is, they

can move the tool along specified geometric paths. These paths are typically

## standard, with emphasis on milling. The entire standard is available in the

library, under the title: ANSI/EIA 274-D-1980 (R1988): Interchangeable

## The ADDRESS is an alphabet, possibly followed by an integer.

The VALUE, when needed, is usually a number. Appendix I gives the use of each

useful G-codes.

## X+1.4: X dimension, followed by sign (+ or -), one digit,

a decimal, followed by 4 digits.

## T4: Tool number is specified, using upto 4 digits.

M2: Miscellaneous function; two digits are specified. Appendix III explains

## In each block, the words as described above must occur in

the same sequence as shown (only those words that are needed will appear in

the block; you may not need all of them in any one block).

## It reads the character, thus identifying the function. Then

it reads the number following the character, to get the exact meaning of the

## function/the location. Not all fields need to be specified in each block.

Thus, the last changed value of any field is carried over to subsequent blocks

## until it is reset in the current block.

NOTES: In some older controllers, a different format called

the TAB Sequential Format is used. Here, the sequence in which the words must

appear in each block is fixed. There is a "TAB" character between each word.

Hence, there is no need for the alphabetical identifier that begins each word.

## The basic idea of the language is the same, of course.

Example of NC Programming
Example of NC part programming (2D contouring)

## We assume that the machining is a contouring operation

along the outer boundary of a simple part, whose nominal geometry is as shown.

The tool size is 0.25 inch, and the feed rate of 6 inch per minute is used.

## The cutting speed is required to be 300 rpm. To simplify the program, we

ignore the Z-axis motions, and that the home position of the tool is at the

correct height, centered on the point located in the machine tool coordinates

as (2, 2).

## In order to specify the geometry of the motion, we need to

compute the location of 5 points p1-p5 (later, we shall see that additional

## // First block: start program, use absolute coordinates,

spindle speed in rpm, feed in ipm, select tool no 1001, turn coolant ON, use

## N010 G70 G90 G94 G97 M04[EB]

NOTE: we could use M14 instead of M04 and M08 that we shall

## interpolation). We now need to compute the coordinates of p1, as shown in

figure below:
N030 G01 X3.875 Y3.698 [EB]

// block 4: move to p2 in straight line. coordinates of point p2: x = same as p1; y = 4 + 5 + 0.125.

## // block 5: move to p3. coordinates calculated as shown in figure below:

N050 G01 X5.635 Y9.125 [EB]

## // blocks 6, 7, 8: now we need to cut along a circular arc.

Most NC controllers cannot cut along a full circle directly -- they need to be

programmed once FOR EACH QUADRANT of the arc. In our case, the circular path

of the tool goes through tree quadrants, so we need to find two additional

## Four dimension words are needed per block. Two dimension

words specify the distance to the end of the arc from current position. Two

circular dimension words specify the distance to the arc center. Usually,

## The I, J, K values are absolute values (unless there is ambiguity).

The following figure shows the computations of the next

## N070 G03 X6.5 Y8.125 I0.875 J0.0 [EB]

N080 G03 X7.375 Y9.0 I0.0 J0.875 [EB]

## N090 G03 X7.366 Y9.125 I0.875 J0.00

// blocks 10, 11, 12: all linear interpolation. Computations for the

## NOTE: here we did not specify the Y coordinate, so it will

be kept constant !
N110 G01 X3.875 Y3.698

## the calculations for coordinates can be sometimes tricky -- so actual NC

programs are often "dry-tested" before actual use. They are either executed on

the machine tool without the workpiece, or they are simulated on a computer,

using software to simulate the motions, and generating the tool path for

## Many parts that need to be machined have very complex

shapes (for example, dies for casting or plastic injection moulding of common

## parts). Such shapes require complex mathematical functions to describe them.

As we have seen, we can only program our machine tool to move along straight

lines or circular arcs. How can we machine a part with geometry that is more

complex ?
(a) Hardware solution: Pantograph machines (very common in HK and China area)

## 2D as well as 3D shapes. This is a dominant method for cutting molding dies in

the SAR. The method usually involves first making a plastic/wood model of the

required mold in 2:1 (double size) or 1.5: 1 ratio. This model is used as a

## template to move a stylus around it which guides a cutting tool (usually a

flat end mill, a ball-end mill, or sometimes a grinding tool) across the die
block till the die is machined. By using the pantograph, the scaled model can

be directly converted to the correct sized die. The models are usually larger

than the actual part (die) since more details can be carved into the

## Manufacturing) software. This software typically converts the CAD (Computer-

Aided Design) data of a part into the required NC part program. since most

parts have very complex geometry, the mathematical functions used to describe

the shape of the part are not simple -- they usually partition the entire

## y- variables. On 3-axis machines, such shapes are machined by first generating

the profile of the part along many subsequent layers at different values of

the z-coordinate. The part is machined by cutting the profile at each layer,

proceeding to the next deeper layer, and so on. Of course, the geometry of each

## layer is described by a sequence of complex mathematical functions (not

straight lines or arcs) -- hence we must first convert this data into a format

that the NC controller can understand -- namely straight lines and arcs. This

## approximation can result in thousands of small linear segments along which

the tool must move, for each layer. Thus the NC program for such linear

## Many NC controllers cannot handle such large part program

files. Therefore, several machine tool companies allow the user to drip-feed

the part program into the NC machine (that is, the part program is transferred

## to the controller in several small segments). As the controller finishes a

fixed percentage (e.g. 90%) of the previous segment, the next segment is

## It is even possible that for a complex machine shop with

several machine tools, the central computer can decide, depending on the

status of each machine tool, which part must be machined on which machine tool.

In such cases, the central computer is linked to each CNC machine, and uploads

the required part program to the selected machine at the correct time. Such