Example of NC part programming (2D contouring)

This is part two of Workshop Technology Manual CNC Machining

Example of NC part programming (2D contouring)

Figure 3: Sample Part

We assume that the machining is a contouring operation along the outer boundary of a simple part, whose nominal geometry is as shown on Fig.3.

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 Zaxis 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 from p1 to 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.

// Block 1: start program, use absolute coordinates, spindle speed in rpm, feed in inch/min, select tool no 1001, turn coolant ON, use up milling (CCW in this case)

N010 G70 G90 G94 G97 M04[EOB]

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 [EOB]

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

Example of NC part programming (2D contouring)

Figure 4 : Calculating p1 coordinate

N030 G01 X3.875 Y3.698 [EOB]

// 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 [EOB]

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

Figure 5 : Calculating p3 coordinate

N050 G01 X5.635 Y9.125 [EOB]

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

Example of NC part programming (2D contouring)

Figure 6 : Circular movement from p3 to p4

The corresponding blocks are:

*NOTE: EOB stands for End Of Block

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

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

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

// block 9: the next move is to point p4 (coordinates computed similar to p3).

N090 G03 X7.366 Y9.125 I0.875 J0.00[EOB]

// 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 [EOB]

NOTE: here we did not specify the Y coordinate, so it will be kept constant !

N110 G01 X3.875 Y3.698 [EOB] N120 G01 X2.0 Y2.0 M30 [EOB]

Take the rest… :D

RELATED INFO


Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    Digg Sphinn del.icio.us Facebook Mixx Google Live Propeller Technorati TwitThis


Page 3 of 26«12345»...Last »