G17 G-Code Command

  • 2 mins read

G17 G-Code Command

G17 is a code used in CNC machining that specifies the plane in which circular interpolation will occur. In particular, G17 specifies that circular interpolation will occur in the XY plane. This means that any circular movements made by the CNC machine will be constrained to the XY plane, with the Z-axis remaining fixed. This code is particularly useful when machining parts with circular features or contours, as it allows the machine to move in a smooth and accurate circular motion in the specified plane.

How G17 G-Code Command is used

Here’s an example of how G17 might be used in a G code program:

G90 ; Set absolute coordinates
G17 ; Set circular interpolation plane to XY
G0 X0 Y0 Z0 ; Move to starting position
G2 X10 Y10 I5 J0 ; Move in a clockwise arc from current position to X=10, Y=10, with a center point of X=5, Y=0 (in the XY plane)
G1 X20 Y10 ; Move in a straight line to X=20, Y=10
G3 X30 Y0 I5 J-10 ; Move in a counterclockwise arc from current position to X=30, Y=0, with a center point of X=5, Y=-10 (in the XY plane)
G1 X30 Y-20 ; Move in a straight line to X=30, Y=-20

In this example, we start by setting the absolute coordinates and then setting the circular interpolation plane to XY using the G17 command. We then move to the starting position at X=0, Y=0, Z=0.

Next, we use the G2 command to move in a clockwise arc from the current position to X=10, Y=10, with a center point of X=5, Y=0 (in the XY plane). The I and J parameters specify the distance from the current position to the center point of the arc in the X and Y directions, respectively.

We then use the G1 command to move in a straight line to X=20, Y=10.

Next, we use the G3 command to move in a counterclockwise arc from the current position to X=30, Y=0, with a center point of X=5, Y=-10 (in the XY plane). The I and J parameters are again used to specify the distance from the current position to the center point of the arc.

Finally, we use the G1 command to move in a straight line to X=30, Y=-20.