What is G90 and G91?
G90 and G91 are G-codes used in CNC (Computer Numerical Control) programming to control how a machine interprets movement commands. G90 sets the machine to absolute positioning, while G91 sets it to incremental positioning. Understanding these codes is crucial for precision in machining and manufacturing processes.
What is Absolute Positioning (G90)?
Absolute positioning, denoted by G90, instructs the CNC machine to interpret all movement commands from a fixed origin or reference point. This means each coordinate is measured from this fixed point, ensuring consistent and predictable movements.
- Example: If the origin is set at (0,0,0), a command to move to (10,5,2) will always move to that exact point, regardless of the machine’s current position.
Benefits of Using G90
- Precision: Ensures exact positioning, reducing errors in complex operations.
- Consistency: Ideal for repetitive tasks where each part needs to be identical.
- Ease of use: Simplifies programming by maintaining a constant reference point.
What is Incremental Positioning (G91)?
Incremental positioning, indicated by G91, makes the CNC machine interpret each movement command relative to its current position. This means each command moves the machine from its current location by the specified distance.
- Example: If the machine is at (5,5,5) and receives a command to move (2,3,1), it will move to (7,8,6).
Benefits of Using G91
- Flexibility: Useful for operations that require relative movements.
- Simplifies: Reduces complexity in programs that involve repeated small adjustments.
- Efficiency: Ideal for operations like drilling multiple holes along a path.
Practical Examples of G90 and G91
Example 1: Drilling Holes with G90
Imagine a scenario where you need to drill holes at specific coordinates on a workpiece. Using G90, you can program each hole’s position based on the workpiece’s origin, ensuring each hole is drilled accurately.
Example 2: Milling with G91
In a milling operation where you need to create a series of slots along a path, G91 allows you to program the machine to move incrementally from one slot to the next, simplifying the code and reducing errors.
Comparison of G90 and G91
| Feature | G90 (Absolute) | G91 (Incremental) |
|---|---|---|
| Reference Point | Fixed origin | Current position |
| Ideal For | Repetitive, precise tasks | Relative, flexible tasks |
| Complexity | Simpler for fixed tasks | Simpler for relative tasks |
| Programming Ease | Easier for beginners | Requires understanding of current position |
How to Choose Between G90 and G91?
Choosing between G90 and G91 depends on the specific requirements of your CNC operation:
- Use G90 when precision and consistency are paramount, such as in high-volume production runs or when creating complex parts that require exact positioning.
- Use G91 when flexibility and ease of movement are necessary, such as in prototyping or when working with parts that require frequent adjustments.
People Also Ask
What are G-codes in CNC programming?
G-codes are commands used in CNC programming to control the movements and operations of a CNC machine. They dictate actions like positioning, speed, and tool changes, enabling precise and automated machining processes.
How do you switch between G90 and G91?
Switching between G90 and G91 is straightforward. Simply include the desired code (G90 or G91) in your CNC program to change the positioning mode. Ensure the machine is at a known position before switching to avoid errors.
Why is understanding G90 and G91 important?
Understanding G90 and G91 is crucial for CNC operators and programmers. It ensures the correct interpretation of movement commands, leading to accurate machining and reduced waste due to errors.
Can G90 and G91 be used together?
Yes, G90 and G91 can be used together in a single CNC program. This allows for flexibility in operations, enabling both absolute and incremental movements as needed for complex tasks.
What are some common mistakes when using G90 and G91?
Common mistakes include not resetting the origin when switching from G91 to G90, leading to positioning errors. It’s also important to ensure the machine is at the correct starting position when using G91.
Conclusion
Understanding the distinction between G90 (absolute positioning) and G91 (incremental positioning) is essential for anyone involved in CNC programming and operations. By choosing the appropriate mode, you can enhance precision, flexibility, and efficiency in machining tasks. Whether you’re a beginner or an experienced CNC programmer, mastering these codes will significantly improve your work quality and productivity. For further insights into CNC programming, consider exploring topics like G-code syntax and advanced CNC techniques.





