G91 G-Code Command

  • 2 mins read

G91 G-Code Command

G91 is a G-code command used in CNC machining. It is used to switch the machine’s coordinate system to incremental mode. In incremental mode, the machine moves in relation to its current position, rather than to an absolute position. This can be useful for certain machining operations, such as drilling a series of holes at precise intervals. The G91 command is typically followed by other commands that specify the amount and direction of the machine’s movement.

How G91 G-Code Command Is Used

Here’s an example of how G91 might be used in a G-code program, with comments in brackets:

G90                  (switch to absolute mode)
G0 X0 Y0             (move to the origin)
G91                  (switch to incremental mode)
G01 X10 Y10           (move 10 units in the X and Y directions)
G01 X-5 Y-5           (move back 5 units in the X and Y directions)
G90                  (switch back to absolute mode)
G0 X20 Y20           (move to a new position at 20, 20)

In this example, the program starts by switching to absolute mode and moving to the origin (0, 0). Then, it switches to incremental mode using the G91 command. The program then moves 10 units in the X and Y directions, followed by moving back 5 units in the X and Y directions. Finally, the program switches back to absolute mode using G90 and moves to a new position at (20, 20).