0
0
Ev-technologyComparisonBeginner · 4 min read

G90 vs G91 in CNC Programming: Key Differences and Usage

In CNC programming, G90 sets absolute positioning where coordinates refer to a fixed origin, while G91 sets incremental positioning where coordinates are relative to the current position. This difference changes how the machine interprets movement commands.
⚖️

Quick Comparison

Here is a quick side-by-side comparison of G90 and G91 codes in CNC programming.

FeatureG90 (Absolute Positioning)G91 (Incremental Positioning)
Position ReferenceFixed origin pointCurrent tool position
Coordinate MeaningCoordinates are absolute valuesCoordinates are relative distances
Use CasePrecise location from zero pointStepwise or repetitive moves
Movement CommandsMove to exact coordinateMove by specified offset
Typical ExampleMove to X=100, Y=50Move 10 units right, 5 units up
Reset Needed?No, always from originYes, depends on current position
⚖️

Key Differences

G90 and G91 control how the CNC machine interprets coordinate values in movement commands. With G90, all coordinates are absolute, meaning the machine moves to a fixed point measured from the program's origin or zero point. This is like using a map with fixed landmarks.

In contrast, G91 uses incremental positioning. Coordinates specify how far to move from the current position, not from a fixed origin. This is like giving directions step-by-step, such as "move 5 steps forward" rather than "go to the park."

Choosing between them affects programming style and machine behavior. G90 is preferred for precise, repeatable positioning, while G91 is useful for repetitive or relative moves where the exact absolute position is less important.

⚖️

Code Comparison

Example: Move the tool first to X=100, Y=50, then move 10 units right and 5 units up.

gcode
G90 ; Set absolute positioning
G00 X100 Y50 ; Move to absolute position X=100, Y=50
G01 X110 Y55 F100 ; Move to absolute position X=110, Y=55 at feed rate 100
Output
Moves tool to coordinate (100, 50), then moves to (110, 55) absolute positions.
↔️

G91 Equivalent

Using incremental positioning to achieve the same moves as above.

gcode
G91 ; Set incremental positioning
G00 X100 Y50 ; Move 100 units right and 50 units up from current position
G01 X10 Y5 F100 ; Move 10 units right and 5 units up at feed rate 100
Output
Moves tool 100 units right and 50 units up from current position, then moves 10 units right and 5 units up.
🎯

When to Use Which

Choose G90 when you need precise control over exact positions relative to a fixed origin, such as machining complex parts where repeatability is critical. It simplifies understanding the program because all coordinates refer to the same reference point.

Choose G91 when performing repetitive or incremental moves, like drilling a pattern of holes spaced evenly or making small adjustments relative to the current tool position. It can simplify programming for stepwise operations.

Key Takeaways

G90 uses absolute coordinates from a fixed origin for precise positioning.
G91 uses incremental coordinates relative to the current position for stepwise moves.
Use G90 for complex, repeatable machining tasks.
Use G91 for repetitive or relative movements.
Understanding the difference helps avoid positioning errors in CNC programs.