Haas Mill G143 5-Axis Tool Length Compensation

Haas G Codes Mill Reference

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 the program to run 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 effect 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)
X0 Y0

G143 5-Axis Tool Length Compensation