SEARCH

How does G91 differ from G90?

Understanding G91 vs. G90 in CNC Machining

If you've ever delved into the world of CNC (Computer Numerical Control) machining, you've likely encountered codes like G91 and G90. These are fundamental commands that tell your machine how to interpret the coordinates it's given. For the average American reader, understanding this distinction is key to grasping how CNC machines execute tasks with precision. Let's break down what these codes mean and how they differ.

What is G90? Absolute Positioning

G90, in the realm of CNC programming, stands for Absolute Positioning. When your CNC program is set to G90 mode, every coordinate you provide – whether it's for a tool path, a drilling location, or any other movement – is interpreted relative to the machine's home position. Think of the home position as the ultimate origin (0,0,0) for the entire machine. It's a fixed, predetermined point that the machine knows precisely where it is.

Key Characteristics of G90:

  • Fixed Reference Point: All coordinates are measured from the machine's origin.
  • Predictable Movements: This makes it easier to visualize and plan complex tool paths because you always know the absolute destination.
  • Less Room for Error in Simple Paths: For straightforward cuts and patterns, G90 can be less prone to cumulative errors.

For example, if your G90 code is active and you command a move to X10.0 Y5.0, the machine will move its cutting tool to a point that is exactly 10 inches along the X-axis and 5 inches along the Y-axis from the machine's home position. This is true regardless of where the tool was before this command.

What is G91? Incremental Positioning

On the other hand, G91 signifies Incremental Positioning. When your CNC program is in G91 mode, each coordinate you provide is interpreted relative to the tool's current position. Instead of referring back to the machine's home, G91 tells the machine to move a certain *distance* from where it is right now.

Key Characteristics of G91:

  • Relative Movement: Coordinates specify the distance to travel from the current tool location.
  • Easier for Repeating Patterns: Ideal for creating repetitive features or making small, consistent adjustments.
  • Potential for Error Accumulation: If an error occurs in one incremental move, all subsequent incremental moves will also be affected.

Let's use an example. Suppose your tool is currently at X10.0 Y5.0 (absolute coordinates). If you then command a move using G91 to X2.0 Y-1.0, the machine will not move to X2.0 Y-1.0 from home. Instead, it will move 2 inches *further* along the X-axis (to X12.0) and 1 inch *down* along the Y-axis (to Y4.0) from its current position.

The Core Difference Summarized

The fundamental difference between G90 and G91 boils down to their reference point:

  • G90 (Absolute): All coordinates are relative to the machine's origin (home position).
  • G91 (Incremental): All coordinates are relative to the tool's current position.

Think of it like giving directions. G90 is like saying, "Go to 123 Main Street." G91 is like saying, "Go 2 blocks north and 1 block west from where you are right now."

When to Use Each (and Why)

Both G90 and G91 have their specific applications in CNC machining, and skilled programmers know when to switch between them to optimize their code.

Using G90:

  • Setting up a workpiece: When you're first positioning your material on the machine, G90 is often used to establish known points on the workpiece relative to the machine's origin.
  • Creating complex profiles: For intricate shapes where precise distances from a common reference point are needed, G90 is invaluable.
  • Ensuring accuracy in critical features: If a specific hole or feature needs to be exactly at a certain coordinate from home, G90 ensures that.

Using G91:

  • Drilling multiple holes in a pattern: If you need to drill a series of holes spaced evenly apart, G91 makes it very simple. You might command the first hole with G90, then use G91 to move incrementally for each subsequent hole. For example: G01 X.5 Y0 (move 0.5 inches in X, incremental).
  • Making small, repetitive adjustments: For tasks like pecking in drilling or making slight offsets, G91 is more efficient.
  • Creating chamfers or fillets: You can use G91 to create small, consistent movements that form rounded edges or angled cuts.

Many CNC programs will start in G90 mode for initial setup and then switch to G91 for repetitive operations before potentially switching back to G90 for a final positioning or tool change. The ability to toggle between these modes is a powerful aspect of CNC programming.

Understanding the difference between G90 and G91 is crucial for anyone working with or learning about CNC machines. It directly impacts how movements are interpreted and executed, ultimately affecting the precision and efficiency of the machining process.

Example Scenario: A Simple Part

Imagine you need to machine a rectangular part with a single hole in the center.

Using G90 (mostly):

  1. Set the machine origin.
  2. Use G90 to command the four corners of the rectangle.
  3. Use G90 to command the center of the hole.

Using a mix of G90 and G91:

  1. Set the machine origin.
  2. Use G90 to command the first corner of the rectangle.
  3. Use G91 to command movements to the other three corners (e.g., move 10 inches in X, then 5 inches in Y, then 10 inches in negative X, etc.).
  4. Use G90 to command the center of the hole relative to the machine origin.

While both methods can achieve the result, the second approach might be more efficient if the rectangle's dimensions are easily expressed as incremental steps from the first corner. However, for a single, precisely located hole, G90 is often preferred.

FAQ Section

How does the CNC machine know which mode (G90 or G91) it's in?

The CNC machine is programmed to follow the last G-code command it received. When a G90 or G91 code is encountered in the program, the machine's control system sets its current mode to that specific positioning system. This mode remains active until a different positioning code (either the other one or a cancel code) is programmed.

Why would a programmer choose G91 for repeating holes when G90 could also work?

Choosing G91 for repeating holes is generally more efficient and less prone to errors in the programming itself. If you need to drill, say, ten holes spaced 1 inch apart in a line, with G91 you'd program the first hole (perhaps with G90) and then use G01 X1.0 (or G01 Y1.0, depending on the orientation) ten times. If you used G90, you'd have to calculate the absolute X coordinate for each of those ten holes (X1, X2, X3, ..., X10), which is more writing and more opportunities to miscalculate.

Can I switch between G90 and G91 within the same program?

Absolutely. It's very common and often necessary to switch between G90 and G91 within a single CNC program. For example, you might use G90 to define the initial setup and critical features of a part, then switch to G91 to efficiently create a series of repeating patterns or features, and then switch back to G90 to perform a final operation or tool change at a specific, known location.

What happens if I don't explicitly set G90 or G91?

Most CNC machines have a default mode that is active when the machine is powered on or reset. This default is typically G90 (absolute positioning). However, it's always best practice for a programmer to explicitly include either a G90 or G91 command at the beginning of their program or whenever they intend to change the positioning mode. Relying on the default can lead to unexpected behavior if the machine's state isn't precisely as assumed.

How does G91 differ from G90