154
G Codes
96-8000 rev R June 2007
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).
For best results program from the tool center using a ball nose end mill.
G141 Example:
T1 M06
G00 G90 G54 X0 Y0 Z0 A0 B0
G141 D01 X0.Y0. Z0. (RAPID POSIT WITH 3 AX C COMP)
G01 G93 X.01 Y.01 Z.01 I.1 J.2 K.9747 F300. (FEED INV TIME)
X.02 Y.03 Z.04 I.15 J.25 K.9566 F300.
X.02 Y.055 Z.064 I.2 J.3 K.9327 F300
.
.
.
X2.345 Y.1234 Z-1.234 I.25 J.35 K.9028 F200. (LAST MOTION)
G94 F50. (CANCEL G93)
G0 G90 G40 Z0 (Rapid to Zero, Cancel Cutter Comp)
X0 Y0
M30
G143 5-Axis Tool Length Compensation + (Group 08)
(This G-code is optional; it only applies to machines on which all rotary motion is movement of the cutting tool.)
This G code allows the user to correct for variations in the length of cutting tools without the need for a CAD/CAM
processor. An H code is required to select the tool length from the existing length compensation tables. A G49 or
H00 command will cancel 5-axis compensation. For G143 to work correctly there must be two rotary axes, A and
B. G90, absolute positioning mode must be active (G91 cannot be used). Work position 0,0 for the A and B axes
must be so the tool is parallel with Z-axis motion.
The intention behind G143 is to compensate for the difference in tool length between the originally posted tool and
a substitute tool. Using G143 allows you to run the program without having to repost a new tool length.
G143 tool length compensation works only with rapid (G00) and linear feed (G01) motions; no other feed functions
(G02 or G03) or canned cycles (drilling, tapping, etc.) can be used. For a positive tool length, the Z-axis would
move upward (in the + direction). If one of X, Y or Z is not programmed, there will be no motion of that axis, even if
the motion of A or B produces a new tool length vector. Thus a typical program would use all 5 axes on one block of
data. G143 may affect commanded motion of all axes in order to compensate for the A and B axes.
Inverse feed mode (G93) is recommended, when using G143. An example follows:
T1 M06
G00 G90 G54 X0 Y0 Z0 A0 B0
G143 H01 X0. Y0. Z0. A-20. B-20. (RAPID POSIT W. 5AX COMP)
G01 G93 X.01 Y.01 Z.01 A-19.9 B-19.9 F300. (FEED INV TIME)
X0.02 Y0.03 Z0.04 A-19.7 B-19.7 F300.
X0.02 Y0.055 Z0.064 A-19.5 B-19.6 F300
X2.345 Y.1234 Z-1.234 A-4.127 B-12.32 F200. (LAST MOTION)
G94 F50. (CANCEL G93)
G0 G90 G49 Z0 (RAPID TO ZERO, CANCEL 5 AXS COMP)
X0 Y0
M30