G01

From CNC.xyz Wiki
Revision as of 20:59, January 30, 2014 by AJ Quick (talk | contribs)
Jump to: navigation, search

The Linear Interpolation G-code, known as G01 allows the machine to move without the knowledge of its absolute position. The machine will move relative to the current position. This can be useful when replicating the same motion over and over, as well as in setting offsets.

Standard Format:
G1 X0.000 Y0.000 Z0.000 F100.0

Where the numbers following the X, Y, Z and F can be changed for the designed amount.

Code Examples

In this example, the machine will move from its current position to a relative position (1,1,0) units away at a federate of 100 units per minute. (The units can be set using G20 and G21.)

G1 X1.000 Y1.000 Z0.000 F100.0

This example will raise the height of the Z-Axis 1 unit higher at the current federate. Notice that units that are not changed, do not have to be entered.

G1 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 to the side and then convert back to inches. The final position will be (1.039, 1, 1). There is a mix of G00 (absolute positioning), a change of units with G20 and G21, as well as a M-code (M02) which indicates the end of the cycle.

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