You are on page 1of 2

In the context of computer numerical control (CNC) machining, the preparatory functions

are commands used to control the motion and behavior of the machine tool. These
functions are typically represented by G-codes, which are a standardized set of instructions
that tell the machine how to perform specific actions.

The G90 and G91 G-codes are part of the Coordinate System Group and are used to define
the interpretation of coordinates in the CNC program. They determine whether the
coordinates specified in subsequent commands are interpreted as absolute or incremental.

G90 - Absolute Programming Mode:

When the G90 command is executed, the machine tool enters the absolute programming
mode. In this mode, all coordinates specified in subsequent commands are treated as
absolute positions, referenced to a fixed point called the machine's reference point or the
part zero position. The reference point is usually established at the machine's home
position, which is a predefined location.

Example:

Let's say you have a CNC milling machine, and you want to move the tool to an absolute
position of X = 50, Y = 30, and Z = 10. You would use the following code:

scss

Copy code

G90 ; Switch to absolute programming mode

G0 X50 Y30 Z10 ; Move to the absolute position (50, 30, 10)

The machine will move the tool to the specified position in the absolute coordinate system.

G91 - Incremental Programming Mode:

When the G91 command is executed, the machine tool switches to the incremental
programming mode. In this mode, the coordinates specified in subsequent commands are
treated as incremental values, relative to the current position of the tool. The machine
moves the tool by adding or subtracting the incremental values from its current position.

Example:

Continuing from the previous example, let's say you want to move the tool by an
1
incremental distance of X = 10, Y = -5, and Z = 2 from its current position. You would use the
following code:

scss

Copy code

G91 ; Switch to incremental programming mode

G0 X10 Y-5 Z2 ; Move by the incremental distances (10, -5, 2)

The machine will move the tool by the specified incremental values relative to its current
position.

It's important to note that the interpretation of coordinates is context-dependent, and the
mode set by G90 or G91 remains in effect until changed by the other mode. The choice
between absolute and incremental programming modes depends on the specific
requirements of the machining operation and the desired control over tool positioning.

You might also like