2.2 Preparatory Functions (G00, G01, G02/G03, G28)

Key Takeaways

  • G00 uses rapid motion. On a Haas mill the individual axes may finish at different times, producing a path that is not a straight line.

  • G01 interpolates a straight move. With G94 active, F is the programmed distance per minute in the active units.

  • On a Haas mill, the plane determines the center addresses for G02 and G03. For G17, I and J are signed distances from the start to the center, even with G90 active.

  • For Haas radius programming, positive R specifies an arc of 180 degrees or less; negative R specifies a larger sweep. Use center offsets for a full circle.

  • G28 with axis words goes through an intermediate point. G91 G28 Z0. removes the intermediate displacement but still commands a Z return to machine zero.

Last updated: November 2026

2.2 Preparatory Functions: Positioning, Cutting and Reference Return

A Haas mill reads a program one block at a time. A word combines an address and a value: X50.0 sets an X coordinate or displacement, F500.0 gives a feed in the active feed mode, and N70 can identify the block. Several G-codes can appear together when their groups permit it. A new motion code replaces the active motion in its group. A non-modal operation such as G28 applies in its own block.

G00 and G01

G00 rapidly positions the axes specified. Haas describes ordinary multi-axis rapids as potentially non-linear: the axes can complete their moves at different times. The shape depends on motion on each axis. Verify the complete path including the tool and holder envelope. The controller may reach the programmed endpoint even though an intermediate path would encounter a clamp. A planned Z-only move to known clearance can establish room for the following XY move.

G01 coordinates the addressed axes along a line at the programmed feed. On a Haas mill, G94 is feed per minute, G95 is feed per spindle revolution, and G93 is inverse-time feed. These examples use G94. At 20 in/min, an ideal steady move of 3 in in X and 4 in in Y traverses a 5-in line in 0.25 min, or 15 seconds. Actual cycle time also depends on acceleration, deceleration and limits.

MotionPathKey before proof
G00Rapid axis positioning, possibly a multi-segment pathCheck where Z clearance is achieved and whether a clamp crosses the path.
G01Straight segment toward the endpointConfirm feed mode and F, units, starting point, and endpoint.
G02 / G03Circular interpolation in the selected planeReconstruct the center, verify the two radii and determine the intended direction.

Reading G02 and G03

On the Haas mill in G17, look from +Z toward the XY plane. G02 is clockwise and G03 is counterclockwise. For I/J programming, calculate the center as start X + I and start Y + J. Compare the distance from that center to both endpoints. Equal distances establish the geometry of a circle. The direction then determines which way around it the tool travels.

Quarter arc: Start at (1.000, 2.000) in and end at (2.000, 3.000) in. With I+1.000 and J0.000 the center is (2.000, 2.000). The start is west and the end is north of the center, both 1.000 in away. West to north is clockwise through 90 degrees.

G17 G20 G90 G94
(At X1.000 Y2.000 with verified Z clearance)
G02 X2.000 Y3.000 I1.000 J0.000 F10.0

For this same quarter arc G02 X2.000 Y3.000 R1.000 F10.0 works from the same start. Run it as an alternative block. Running it after the first arc would give it a different start. Positive R chooses a sweep of 180 degrees or less, and negative R chooses a sweep greater than 180 degrees under Haas conventions. For a single full circle, omit the in-plane endpoint words and specify the appropriate center offsets. The start and end coincide and a radius alone does not establish the center.

Worked Contour Trace

Use this metric Haas fragment in graphics mode as a geometry exercise. Before the fragment, the simulated tool is at work X0.0 Y10.0, with the intended G54 origin, verified tool offsets and Z clearance. The points describe the programmed centerline with G40 active. Workpiece dimensions for a real job would depend on whether a CAM path or a separate cutter compensation routine offsets the center.

G21 G17 G90 G94 G40
G01 X50.0 Y10.0 F500.0
G03 X60.0 Y20.0 I0.0 J10.0
G01 Y40.0
G03 X50.0 Y50.0 I-10.0 J0.0
G01 X0.0 Y50.0
TransitionCenterRadial directionsTangent result
(50, 10) to (60, 20)(50, 20)South to eastCCW from an eastward line into a northward line
(60, 40) to (50, 50)(50, 40)East to northCCW from a northward line into a westward line

Both arcs have 10 mm radius at each endpoint. Reversing either arc command would take the other way around that center, a 270-degree sweep with a different path and approach direction.

G28 and the Intermediate Point

On a Haas mill, G28 with axis words first goes to the specified intermediate position and then returns those axes to machine zero. With no axis words, the Haas control can return all axes simultaneously. If work Z0 coincides with the top of the part, G90 G28 Z0. can first drive the tool toward that surface. The effect depends on the starting location and actual setup. In G91 G28 Z0., the intermediate Z displacement is zero, so the next move is directly to the Z machine reference. The path to that reference still requires clearance. A following ordinary move uses incremental mode until changed.

A Haas G90 G00 G53 Z0. addresses absolute machine Z0 for that block and does not ask for a work-coordinate intermediate point. This is a different instruction from either version of G28. Confirm the safe return position and which axes can move for the actual setup.

Sources: Haas basic programming, G02/G03 reference and Haas G-code reference.

Loading diagram...
Circular Interpolation Selection Matrix (IJK vs R)
Test Your Knowledge

On a Haas mill with work Z0 at the stock top, what is the risk of G90 G28 Z0. over the stock?

A

It permanently erases G54.

B

The axis can travel to work Z0 as the intermediate point before returning to machine zero.

C

It forces feed per revolution.

D

It sends X and Y to identical work coordinates.

Test Your Knowledge

How do you program a single full circle in G17 on the illustrated Haas mill?

A

Give a positive R value and repeat the starting X and Y as the endpoint.

B

Give a negative R value and leave the horizontal endpoint unspecified.

C

Enter the applicable signed I and J center offsets and omit the XY endpoint.

D

Enter the center as absolute X and Y and keep the I and J values at zero.

Test Your Knowledge

Why can a multi-axis G00 move on a Haas mill take a different path from G01 between the same endpoints?

A

Rapid axes can reach their endpoints at different times, so the route may bend.

B

Both moves follow the same line when they have the same F word.

C

G00 uses an arc that avoids fixtures automatically.

D

The rapid path must contain a 45-degree segment.

Test Your Knowledge

In G17 a block starts at (50, 10) mm and ends at (60, 20) mm with I0.0 J10.0. Which command gives the 90-degree sweep about that center?

A

G02, because Y increases

B

G02, because the start vector points south

C

Either G02 or G03 gives the same 90-degree sweep.

D

G03, because the radius turns counterclockwise from south to east.

Sections you finish are checked off in the contents.