G00

From CNC.xyz Wiki
Jump to: navigation, search

The Rapid Movement G-code, known as G00 tells the machine to move as quickly as it can, with no synchronization of the axes. The machine will move relative to the absolute position set initially or through offsets. The G00 G-code can also be written as G0, and most CNC programs can accept either G00 or G0. We use G0 in our examples to save space, which is important when using software such as Grbl.

Standard Format:
G0 X0.000 Y0.000 Z0.000

All arguments are optional, but one must be included. You can also expand this for larger axis machines using A, B, C.. etc.

Code Examples

In this example, the machine will move from its origin position to a position (2,1,0) units away. (The units can be set using G20 and G21.) Since this is a rapid movement, and not synchronized (G01), the machine will arrive at Y1 before it arrives at X2.

G0 X0.000 Y0.000 Z0.000
G0 X2.000 Y1.000 Z0.000

This example will raise the height of the Z-Axis from the origin to 1 unit higher. Notice that arguments that are not changed, do not have to be entered.

G0 Z0.000
G0 Z1.000

This example shows that negative movements are also possible. We will move from the origin position of (0,0,0) to (-3,-2,1). Since this is a rapid movement, and not linear interpolation, it will arrive at Z1, prior to arriving at Y-2 and X-3.

G0 X0.000 Y0.000 Z0.000 F100.0
G0 X-3.000 Y-2.000 Z1.000 

As a final example we will take a system that is setup to run in inches, move to an absolute position of (1,1,1) convert to mm, move one millimeter from the origin and then convert back to inches. The final position will be (1 mm, 1 inch, 1 inch). The change of units is done with G20 and G21, and an a M-code (M02) indicates the end of the cycle.

G20
G0 X0.000 Y0.000 Z0.000 F100
G0 X1.000 Y1.000 Z1.000 F100
G21
G0 X1.000
G20
M2