Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

NC and CNC Machines

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 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:

- Easier to program; easy storage of existing programs;

- Easy to change a program

- Avoids human errors

- NC machines are safer to operate

- Complex geometry is produced as cheaply as simple ones

- Usually generates closer tolerances than manually operated machines

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).

Data Processing Unit:

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.


Control Loops Unit:

Interpolator to supply machine-motion commands between data points

Position control loop hardware for each axis of motion

Classifications of NC Machine Tools:

Based on Motion Type:

Point-to-Point

Continuous path

Based on Control Loops:

Open loop

Closed loop

Based on Power Supply:

Electric

Hydraulic

Pneumatic

Based on Positioning System

Incremental

Absolute

Point-to-Point Control (PTP):

- Usually used for Drilling type of operations;


- Each axis is driven separately;

- Motion between Begin-Pt and End-Pt is at Maximum Velocity.

A PTP Open-Loop Schematic:

The following figure shows the basic idea of the control

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

X- and Y-axis table controls.

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.

If either the X or Y axis is still moving (not reached the programmed

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.

Basics of Motion control and Feedback for NC Machines

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]

The typical schematics of such closed loop systems (as

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


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

machines [source: Kalpakjiam]

Machines with stepper motors move in discrete length units,

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

angle.

Likewise, encoders usually give out pulse outputs (e.g. 500

pulses per revolution).

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

moved by the table in one revolution is 2*pitch.

The smallest distance that a machine table can be programmed

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.

(a) What is the BLU of the system ?

(b) If the motor receives 2000 pulses per minute, what is

the linear velocity in inch/min ?

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

(a) The linear velocity of the table

(b) The BLU of the machine

(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

controller to specify the following:

- 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

made up of segments, that are linear or circular arcs.

Different modes of motion control in NC machines

In your lecture handouts is a summary of the RS274-D

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


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

Variable Block Data Format for Positioning, Contouring, and

Contouring/Positioning Numerically Controlled Machines.

The RS274-D is a word address format -- this means

that each line (called a block) is composed of several instructions,

or (words). We shall now look at an example of how to (manually) code an NC

machine to perform milling tasks.

The format for each "word" is: ADDRESS[VALUE]

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

allowed alphabet in the RS274-D code.

Sequence and format of words:

N3 G2 X+1.4 Y+1.4 Z+1.4 I1.4 J1.4 K1.4 F3.2 S4 T4 M2 [EB]

N3: Sequence number followed by three integers, e.g. N001, N100...

G2: Preparatory function followed by two integers. Appendix II explains most

useful G-codes.

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


a decimal, followed by 4 digits.

Y+1.4, Z+1.4: Same as above.

I1.4, J1.4, K1.4: Dimension for circular interpolation.

Always positive, so no sign is specified.

F3.2: Feedrate specification, F followed by 2 digits, a

decimal, then three digits.

S4: Spindle speed, 4 digits to specify the spindle rpm.

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

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

most useful M-codes.

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).

Multiple G-codes can occur in the same block.

The machine tool controller interprets the block as follows:

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

points will be needed).

The cutting will proceed along the contour: p0 -- p1 -- p2 -- p3 -- p4 -- p5 -- p1.

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

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

up milling (CCW in this case)

N010 G70 G90 G94 G97 M04[EB]


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

use in the next block.

// block 2: cutting on XY plane, set feed, spindle speed,

N020 G17 F6.0 S300 T1001 M08 [EB]

// block 3: move to first point in a straight line (linear

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.

N040 G01 X3.875 Y9.125 [EB]

// 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

points, p31, and p32.

Programming for circular interpolation (moving the tool

along a circular arc):

Circular arcs are machined only in main planes. The plane

is selected by the preparatory functions (G17, G18, G19).

The direction of the tool along the arc must be specified

(G02, G03, G20 G21, G30, G31).

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,

I, J, K specify the distances parallel to the X, Y, Z axes, respectively.

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


The following figure shows the computations of the next

three blocks of motion:

The corresponding blocks are:

N060 G03 X5.625 Y9.0 I0.866 J0.125 [EB]

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


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

// block 9: the next move is to point p4 (coordinates

computed similar to p3).

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

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

point p5 are as follows:

p4: y = 9.125; x = 9 + 0.125 tan 67.5 = 9.302

N100 G01 X9.302

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

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

N120 G01 X2.0 Y2.0 M30

This completes our simple example program. As you can see,

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

visual checking by the operator.

Modern Machining Systems: Interpolation and DNC

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)

A commercial pantograph machine

Typically, pantographs can be used for cutting quite complex

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

wood/plastic by the craftsmen preparing the model.

(b) Software solution: Interpolation, and the use of DNC.

In many modern industries, complex geometric shapes can be

directly machined by using 3-axis or 5-axis machines, and CAM (Computer-Aided

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

surface into a set of smaller areas, called patches, each of which is

described by means of a 3- or 4-degree polynomial function in x- and

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

process is called linear approximation (circular approximation). The

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

approximations (circular approximations) can be quite large.

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

transferred to the controller from a computer. This is more popular in CNC

machines (Computer Numerically Controlled machines).

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

control is called DNC (Direct Numerical Control), and is popular in some

advance manufacturing systems.

You might also like