Haas Mill G141 3D+ Cutter Compensation

Haas G Codes Mill Reference

G141 3D+ Cutter Compensation (Group 07)

X X-axis command
Y Y-axis command
Z Z-axis command
A A-axis command (optional)
B B-axis command (optional)
D Cutter Size Selection (modal)
I X-axis cutter compensation direction from program path
J Y-axis cutter compensation direction from program path
K Z-axis cutter compensation direction from program path
F Feed rate in G93 or G94 (modal in G94)

This feature performs three-dimensional cutter compensation.
The form is:

G141 Xnnn Ynnn Znnn Innn Jnnn Knnn Fnnn Dnnn

Subsequent lines can be:

G01 Xnnn Ynnn Znnn Innn Jnnn Knnn Fnnn
Or
G00 Xnnn Ynnn Znnn Innn Jnnn Knnn

Some CAM systems are able to output the X, Y, and Z with values for I, J, K. The I, J, and K values tell the control the direction in which to apply the compensation at the machine. Similar to other uses of I, J, and K, these are incremental distances from the X, Y, and Z point called. The I, J, and K specify the normal direction relative to the center of the tool to the contact point of the tool in the CAM system. The I, J, and K vectors are required by the control to be able to shift the tool path in the correct direction.
The value of the compensation can be in a positive or negative direction. The offset amount entered in radius or diameter (Setting 40) for the tool will compensate the path by this amount even if the tool motions are 2 or 3 axes. Only G00 and G01 can use G141. A Dnn will have to be programmed; the D-code selects which tool wear offset to use. A feed rate must be programmed on each line if in G93 Inverse Time Feed mode.
With a unit vector, the length of the vector line must always equal 1. In the same way that a unit circle in mathematics is a circle with a radius of 1, a unit vector is a line that indicates a direction with a length of 1. Remember, the vector line does not tell the control how far to move the tool when a wear value is entered, just the direction in which to go. Only the end-point of the commanded block is compensated in the direction of I, J, and K. For this reason this compensation is recommended only for surface tool paths having a tight tolerance (small motion between blocks of code).
G141 compensation does not prohibit the tool path from crossing over itself when excessive cutter compensation is entered. The tool will be offset, in the direction of the vector line, by the combined values of the tool offset geometry plus the tool offset wear. If compensation values are in diameter mode (Setting 40), the move will be half the amount entered in these fields. For best results program from the tool center using a ball nose end mill.

G141 Example:

N1 T1 M06
N2 G00 G90 G54 X0 Y0 Z0 A0 B0
N3 G141 D01 X0.Y0. Z0. (RAPID POSIT WITH 3 AX C COMP)
N4 G01 G93 X.01 Y.01 Z.01 I.1 J.2 K.9747 F300. (FEED INV TIME)
N5 X.02 Y.03 Z.04 I.15 J.25 K.9566 F300.
N6 X.02 Y.055 Z.064 I.2 J.3 K.9327 F300.
..
N10 X2.345 Y.1234 Z-1.234 I.25 J.35 K.9028 F200. (LAST MOTION)
N11 G94 F50. (CANCEL G93)
N12 G0 G90 G40 Z0 (Rapid to Zero, Cancel Cutter Comp)
N13 X0 Y0
N14 M30

In the above example, we can see where the I, J, and K were derived by plugging the points into the following formula:

AB=√[(x2-x1)2 + (y2-y1)2 + (z2-z1)2],

a 3-D version of the distance formula. Looking at line N5, we will use .15 for x2, .25 for y2, and .9566 for Z2. Because I, J, and K are incremental, we will use 0 for x1, y1, and z1.
1

AB=√[(.15)2 + (.25)2 + (.9566)2]
AB=√[.0225 + .0625 + .9151]
AB=√1
AB=1

A simplified example is listed below:

N1 T1 M06
N2 G00 G90 G54 X0 Y0
N3 G43 H01 Z1.
N4 G141 D01 X0. Y0. Z0. (RAPID POSIT WITH 3 AX C COMP)
N5 G01 X10. Y0 I0. J-1. K0. F300.
N6 G40 Z1.0 (Rapid to Zero, Cancel Cutter Comp)
N7 M30

In this case, if the wear value (DIA) for T01 is set to -.02, then the tool will move from X0. Y0. Z0. (Line N4) to X10. Y.01. The J value told the control to compensate the end point of the programmed line only in the Y-axis. Line N5 could have been written using only the J-1. (not using I0. K0.), but a Y value must be entered if a compensation is to be made in this axis (J value used).


G141 3D+ Cutter Compensation