GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

G-code fundamentals

How Do I and J Work on an I and J CNC Machine?

I and J are the incremental offsets from the arc start point to the arc center. On an i and j cnc machine they set the radius and direction of every G02 and G03 move. This guide shows how the control reads them, how to write them by hand, and which mistakes scrap parts.

G02 / G03G17 / G18 / G19Center offsetsFull circles
how does i and j work on an i and j cnc machine
Quick answer

Key takeaways

They are offsets, not coordinatesI and J measure from the arc start point to the arc center, never from part zero.
They are modal and incrementalBoth stay active until an R format or another I/J line replaces them.
G17 decides the planeOn the XY plane I runs along X and J along Y. G18 and G19 swap that mapping.
Sign errors show up as a wrong radiusA flipped sign usually doubles or halves the arc, and the control may alarm or cut air.
Full circles need I and JAn R word cannot describe a 360° arc. On most controls you repeat the start point as the end point.
Definition

What I and J mean in an i and j cnc machine program

When a program calls an arc with G02 or G03, the control already knows the start point from the previous block. What it does not know is where the center sits. I and J supply that missing vector. I is the signed distance along the active X axis, J is the signed distance along the active Y axis, and both are measured from the start point of the arc, not from the part zero.

That single sentence explains most confusion on the shop floor. An operator who reads I and J as absolute coordinates will place the center somewhere else entirely and wonder why the tool swings wide. On an i and j cnc machine the values are always incremental, even when the program runs in G90 absolute mode.

A short example keeps it concrete. Start point X10 Y10. Center at X15 Y15. The block reads G03 X20 Y10 I5 J5 F100. The center sits 5 mm to the right and 5 mm above the start, and the tool travels counterclockwise to X20 Y10 at 100 mm/min.

The control then checks the geometry itself. It compares the distance from the center to the start point against the distance from the center to the end point. If those two radii differ beyond the tolerance parameter, most controls raise an alarm instead of cutting a lopsided arc.

Coordinate context

Plane selection and coordinate context

I and J only carry meaning inside a declared plane. G17 selects XY, where I follows X and J follows Y. G18 selects XZ, where I follows X and K follows Z. G19 selects YZ, where J follows Y and K follows Z. The letters shift with the plane, and K appears whenever Z is one of the two axes in play.

Post-processors usually insert the plane code for you, which is exactly why hand edits go wrong. Delete a G17 line while editing a program at the machine, and the control keeps whatever plane was active before. The arc is then interpreted on the wrong pair of axes.

Work offsets matter too. G54 through G59 shift the origin, but they do not change how I and J are measured. The offsets stay relative to the arc start point in the active work coordinate system. A fixture that moves between operations changes the absolute numbers, never the I and J logic.

Cutter compensation adds another layer. When G41 or G42 is active, the control offsets the programmed path by the tool radius and rebuilds the arc from the compensated geometry. Keep I, J, and the arc radius consistent, or the control will reject the block.

Writing the block

How to write an arc block with I and J

Work in this order: confirm the plane, confirm the direction, calculate the offsets, then write the block. Skipping the first step is the most common cause of a rejected arc on an i and j cnc machine.

Direction comes from the arc itself. G02 cuts clockwise as seen looking down the positive Z axis toward the work. G03 cuts counterclockwise. Swap them and the tool takes the long way around, which often means a crash into the fixture.

Calculate the offsets from the drawing, not from the screen. I equals center X minus start X. J equals center Y minus start Y. Keep the sign. If the center sits to the left of the start point, I is negative, and that is correct.

Write the line with the end point and the offsets together. A typical block looks like G03 X20.0 Y10.0 I5.0 J5.0 F100. Some controls accept a radius word R instead, but R cannot describe a full circle and it flips behavior for arcs over 180°.

Leave the feed rate in the first arc block of a series. Once F is set it stays modal, so later arc blocks only need the geometry. Adding F to every line clutters the program and makes edits slower.

Machining meaning

What I and J control on the finished part

Arc accuracy shows up directly in the part. A fillet that should blend tangentially will leave a visible step if the center is off by a few hundredths. On a sealing face or a bearing shoulder, that step becomes a leak path or a stress riser.

Tolerance targets drive how carefully you verify the numbers. General machining holds ±0.005 mm on features that matter, with surface finish between Ra 0.8 and 1.6 μm on functional faces. An arc that is geometrically correct but fed too fast will still miss the finish callout.

Material changes the practical limit. Aluminum 6061 and 7075 cut clean arcs at higher feed rates. Stainless 316L and 17-4PH work-harden if the tool dwells in the cut, so a steady arc path with a constant feed beats a hesitant one.

Inconel and titanium TC4 push the other way. Arc moves that change direction sharply load the tool tip unevenly. Programmers often break a long arc into two or three segments with a controlled feed to keep the load steady.

Procedure

Step by step: program and prove an arc

Follow the order. Skipping a step is what causes alarms and scrapped parts.

  • 1
    Confirm the active planeCheck that G17 is active for XY arcs, G18 for XZ, or G19 for YZ. Re-post the block if the plane line is missing. This is the first check on any i and j cnc machine.
  • 2
    Pick the direction from the drawingTrace the path as the tool sees it, looking down positive Z. Clockwise is G02, counterclockwise is G03. Mark it on the print before typing.
  • 3
    Compute I and J from the centerI = center X − start X. J = center Y − start Y. Keep the sign. Round to four decimal places for metric work, or four places in inches.
  • 4
    Check the radius both waysVerify that the distance from center to start equals the distance from center to end. A mismatch beyond about 0.01 mm usually triggers an alarm.
  • 5
    Write the full blockUse end point plus I and J, for example G03 X20.0 Y10.0 I5.0 J5.0 F100. Put the feed on the first arc block only.
  • 6
    Dry run above the partRun with the Z offset raised 50 mm and single block on. Watch the tool path on the screen against the drawing before any cut.
  • 7
    Cut and measure the arcMachine the feature, then check the radius with a radius gauge or a CMM. Adjust the offsets only if the measured arc is out of tolerance.
Decision table

I and J versus R, and when each one fits

Use this to choose the format before you post the program.

SituationUse I and JUse RReason
Arc is 180° or moreYesNoR flips to the long way past 180° on many controls
Full 360° circleYesNot possibleR has no end point to work from
Hand edit at the machineYesSometimesI and J stay readable when the center is known
Simple fillet under 90°WorksOften faster to typeR needs one number and no arithmetic
Arc on XZ or YZ planeYes, with KR still allowedPlane letters shift with G18 and G19
Cutter compensation activeYesUse with careComp rebuilds the arc from the offset path
Control alarms on R arcsYesAvoidOlder controls reject ambiguous R values
FAQs

Frequently asked questions

Do I and J change if the program runs in G90 absolute mode?

No. I and J stay incremental on an i and j cnc machine regardless of G90 or G91. The end point of the arc follows the active mode, but the center vector is always measured from the start point of that arc.

Why does my control alarm with a radius mismatch error?

The distance from the center to the start point and to the end point do not match, or they exceed the radius tolerance parameter. Recheck the I and J arithmetic and confirm the end point sits on the same circle. A rounding error of 0.01 mm is usually enough to trip it.

Can I use I and J for a helix or thread milling?

Yes. Add a Z move to the arc block and the control interpolates a helix. Keep the Z step per revolution small enough that the tool does not rub, and check that the control supports helical interpolation before posting.

What does K mean when I see it in a program?

K is the third center offset, paired with the axis the plane leaves out. On G18 it follows Z, and on G19 it follows Z as well. It appears in G17 XY work only on rare controls that support helical arcs with a Z offset word.

How tight should the arc tolerance be for a sealing face?

Tighter than general milling. General work holds ±0.005 mm, and a sealing or bearing surface usually needs the full callout plus a finish between Ra 0.8 and 1.6 μm. Measure the arc after the first part, not after the run.

Is it safe to switch between I and J and R in one program?

It is legal, but avoid it inside a single arc series. Mixing formats makes the program harder to read and easier to break during an edit. Pick one format per feature and stay with it.

Send us your arc features and get a quote

Upload a drawing with fillets, radii, or full circles. We review the geometry, flag arc features that need tighter control, and return a quote with DFM notes.

12-hour quote100% inspectionNo minimum order quantity

Follow

More machining notes

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC