top of page

What are directional vectors?

Current model CNC controls make it easy to create circular commands. You simply specify the direction (G02: clockwise or G03: counter clockwise), the end point (usually X and Y), and the radius (with R). The machine figures out the rest. Here’s an example program that mills a rectangular shape with corner radii:

  • O0001

  • N005 T01 M06

  • N010 G54 G90 S400 M03

  • N015 G00 X-0.475 Y-0.250

  • N020 G43 H05 Z0.1 M08

  • N025 G01 Z-0.250 F50

  • N030 X4.50 F4.5

  • N035 G03 X5.250 Y0.50 R0.750

  • N040 G01 Y3.50

  • N045 G03 X4.50 Y4.250 R0.750

  • N050 G01 X0.50

  • N055 G03 X-0.250 Y3.50 R0.750

  • N060 G01 Y0.500

  • N065 G03 X0.50 Y-0.250 R0.750

  • N070 G00 Z0.10 M09

  • N075 G91 G28 Z0 M19

  • N080 M30

Again, notice that every circular motion is counter clockwise (G03), includes an end point in XY, and a radius word.


Frankly speaking, this is the way I recommend commanding circular motion. But I do get a lot of questions about directional vectors (I, J, and K) from people wondering what they are and how they’re used. It seems many computer aided manufacturing (CAM) systems are still set to output circular commands using directional vectors – and people are wondering how they work.


First and foremost, remember that directional vectors were used with circular motion commands in the early days of NC. That is, they were the only way to specify the arc size back then. While there is one advantage to using directional vectors, for the most part, CNC control manufacturers have continued to make it possible to use them in simply to maintain compatibility with older controls. Old programs can be run in new machines. So there’s really no need to learn about them because the R word provides a much easier way to specify the arc size.

Note that almost all CAM systems can be configured to output circular motion commands using the R word, so if yours is outputting directional vectors, you may want to reconfigure.


The one “advantage” of using directional vectors is that they are less forgiving than the R word – meaning even a tiny mistake in the end point or arc size will cause the machine to generate an alarm. The R word may be a bit too forgiving. The machine will cause some kind of motion (though not the intended motion) even if there is a position or arc size mistake. As long as coordinates match up, there is no advantage to using directional vectors.


To use directional vectors, you must understand that there is a polarity involved. Directional vectors must point from the start point of the arc to the center of the arc. Letter address I is used to point in the X direction. J points in the Y direction. And K points in Z. Here is the program shown before modified to use directional vectors.

  • O0001

  • N005 T01 M06

  • N010 G54 G90 S400 M03

  • N015 G00 X-0.475 Y-0.250

  • N020 G43 H05 Z0.1 M08

  • N025 G01 Z-0.250 F50

  • N030 X4.50 F4.5

  • N035 G03 X5.250 Y0.50 J0.750

  • N040 G01 Y3.50

  • N045 G03 X4.50 Y4.250 I-0.750

  • N050 G01 X0.50

  • N055 G03 X-0.250 Y3.50 J-0.750

  • N060 G01 Y0.500

  • N065 G03 X0.50 Y-0.250 I0.750

  • N070 G00 Z0.10 M09

  • N075 G91 G28 Z0 M19

  • N080 M30

In line N035, for example, J0.750 is telling the machine that the distance from the arc’s start point to its center is a positive 0.750 inches along the Y axis. Notice that the start point and end point are in the same location along the X axis. You could include I0 in this command, or simply leave it out as I have.

348 views0 comments

Recent Posts

See All

Which measurement system is initialized at power-up?

Actually, the choice between whether the Imperial measurement system or the Metric measurement system is initialized can be done on the Setting display screen page (though it is also a parameter setti

How does G66 work?

G66 is one of the more misunderstood custom macro B commands. Fanuc calls it a modal custom macro call. It looks just like a G65 command. Consider these two commands: N045 G65 P1000 X3.0 Y3.0 Z0 A45.0

bottom of page