2012-08-06 15:46:22 (CET)

Programming Instructions


Turning Cutter Radius Compensation On

To start cutter radius compensation keeping the tool to the left of the contour, program G41 D…. The D word is optional (see "Use of D Number", just below).


To start cutter radius compensation keeping the tool to the right of the contour, program G42 D… .


In Figure A-1, for example, if G41 were programmed, the tool would move clockwise around the triangle, so that the tool is always to the left of the triangle when facing in the direction of travel. If G42 were programmed, the tool would stay right of the triangle and move counter clockwise around the triangle.


Turning Cutter Radius Compensation Off

To stop cutter radius compensation, program G40. It is OK to turn compensation off when it is already off.


If G40, G41, or G42 is programmed on the same line as tool motion, cutter

compensation will be turned on or off before the motion is made. To make the motion come first, the motion must be programmed on a separate, previous line of code.


Use of D Number

Programming a D word with G41 or G42, is optional.

If a D number is programmed, it must be a non-negative integer. It represents the slot number of the tool whose radius (half the diameter given in the tool table) will be used, or it may be zero (which is not a slot number). If it is zero, the value of the radius will also be zero. Any slot in the tool table may be selected. The D number does not have to be the same as the slot number of the tool in the spindle, although it is rarely useful for it not to be.

If a D number is not programmed, the slot number of the tool in the spindle will be used as the D number.


Material Edge Contour

When the contour is the edge of the material, the outline of the edge is described in the NC program.

For a material edge contour, the value for the diameter in the tool table is the actual value of the diameter of the tool. The value in the table must be positive. The NC code for a material edge contour is the same regardless of the (actual or intended) diameter of the tool.


Programming Entry Moves

In general, two pre-entry moves and one entry move are needed to begin compensation correctly. However, if there is a convex corner on the contour, a simpler method is available using zero or one pre-entry move and one entry move. The general method,

which will work in all situations, is described first. We assume here that the programmer knows what the contour is already and has the job of adding entry moves.


General Method

The general method includes programming two pre-entry moves and one entry move. See Figure A-2. The shaded area is the remaining material. It has no corners, so the simple method cannot be used. The dotted line is the programmed path. The solid line is the actual path of the tool tip. Both paths go clockwise around the remaining material. A cutter one unit in diameter is shown part way around the path. The black dots mark points at the beginning or end of programmed or actual moves. The figure shows the second pre-entry move but not the first, since the beginning point of the first pre-entry move could be anywhere.


Figure A 2, Cutting radius compensation entry moves (for material edge contour)

First, pick a point A on the contour where it is convenient to attach an entry arc. Specify an arc outside the contour which begins at a point B and ends at A tangent to the contour (and going in the same direction as it is planned to go around the contour). The radius of the arc should be larger than half the diameter given in the tool table. Then extend a line tangent to the arc from B to some point C, located so that the line BC is more than one tool radius long. After the construction is finished, the code is written in the reverse order from the construction. The NC code is shown in Table A-1; the first three lines are the entry moves just described.


Table A 1 NC program for figure A-2

N0010 G1 X1 Y5 (make first pre-entry move to C)

N0020 G41 G1 Y4 (turn compensation on and make second pre-entry move to point B)

N0030 G3 X2 Y3 I1 (make entry move to point A)

N0040 G2 X3 Y2 J-1 (cut along arc at top)

N0050 G1 Y-1 (cut along right side)

N0060 G2 X2 Y-2 I-1 (cut along arc at bottom right)

N0070 G1 X-2 (cut along bottom side)

N0080 G2 X-2.6 Y-0.2 J1 (cut along arc at bottom left)

N0090 G1 X1.4 Y2.8 (cut along third side)

N0100 G2 X2 Y3 I0.6 J-0.8 (cut along arc at top of tool path)

N0110 G40 (turn compensation off)


Cutter radius compensation is turned on after the first pre-entry move and before the second pre-entry move (including G41 on the same line as the second pre-entry move turns compensation on before the move is made). In the code above, line N0010 is the first pre-entry move, line N0020 turns compensation on and makes the second pre-entry move, and line N0030 makes the entry move.


Simple Method

If there is a convex (sticking out, not in) corner somewhere on the contour, a simpler method of making an entry is available. See Figure A-3.


First, pick a convex corner. There is only one corner in Figure A-3. It is at A, and it is convex. Decide which way you want to go along the contour from A. In our example we are keeping the tool to the left of the remaining material and going clockwise. Extend the side to be cut (DA in the figure) to divide the area outside the material near A into two regions; DA extended is the dotted line AC on the figure. Make a pre-entry move to anywhere in the region on the same side of DC as the remaining material (point B on the figure) and not so close to the remaining material that the tool is cutting into it. Anywhere in the diagonally shaded area of the figure (or above or to the left of that area) is OK. If the tool is already in region, no pre-entry move is needed. Write a line of NC code to move to B, if necessary. Then write a line of NC code for a straight entry move that turns compensation on and goes to point A.
If B is at (1.5, 4), the two lines of code for the pre-entry and entry moves would be:


N0010 G1 X1.5 Y4 (move to B)

N0020 G41 G1 X3 Y3 (turn compensation on and make entry move to A)


These two lines would be followed by four lines identical to lines N0050 to N0080 from Table A-1, but the end of the program would be different since the shape of remaining material is different.


It would be OK for B to be on line AC. In fact, B could be placed on the extension outside the part of any straight side of the part. B could be placed on EF extended to the right (but not to the left, for going clockwise), for example.


If DA were an arc, not a straight line, the two lines of code above would still be suitable. In this case, the dotted line extending DA should be tangent to DA at A.

Figure A-3 Simpler cutter radius compensation entry move (for material edge contour)

Figure A 3 Simpler compensation entry move