CNC machines use specific codes, known as G-codes, to perform various operations. Among these, G91, G41, and G43 play crucial roles in milling operations. G91 sets the machine to incremental mode, G41 applies cutter compensation to the left, and G43 activates tool length compensation.
Usage Format
- G91: Indicates incremental positioning. The movement is relative to the current position.
- G41: Activates cutter compensation to the left. Used in conjunction with a D code to specify the offset number.
- G43: Engages tool length compensation. It is used with an H code to specify the tool length offset.
Explanation
G91 is useful when the same operation is to be repeated at different locations. Instead of programming each location, you can incrementally program the distance from the last point.
G41 is used for cutter compensation, which adjusts the tool path to account for the physical size of the tool’s diameter. This ensures the cut is made at the correct location, especially when following a contour.
G43 is essential for considering the length of the tool. It ensures that the machine knows the exact location of the tool tip relative to the workpiece, which is critical for precision.
Example
Here’s a simple program that demonstrates the use of G91, G41, and G43:
N10 G20 (Set to inch mode)
N20 G17 (Select XY plane)
N30 G90 (Set to absolute positioning)
N40 M06 T01 (Tool change to tool 1)
N50 G43 H01 Z1.0 (Tool length compensation for tool 1)
N60 G00 X2.0 Y2.0 (Rapid move to start position)
N70 G41 D01 (Cutter compensation left for tool 1)
N80 G91 (Set to incremental mode)
N90 G01 X0.5 (Move 0.5 inches in X)
N100 Y0.5 (Move 0.5 inches in Y)
N110 G40 (Cancel cutter compensation)
N120 G90 (Set to absolute mode)
N130 G00 Z1.0 (Retract tool)
N140 M30 (End of program)
Text Diagram:
Initial Position (X2.0, Y2.0)
|
| (X2.5, Y2.0)---G01---(X2.5, Y2.5)
| | |
| | |
| G00 G01
| | |
| | |
| (X2.0, Y2.0) (X3.0, Y2.5)
|
In this example, the tool starts at (X2.0, Y2.0), moves to (X2.5, Y2.0) using a rapid move (G00), then uses a linear move (G01) to reach (X2.5, Y2.5). After the incremental move, cutter compensation is canceled (G40), and the tool is retracted.