Getting started with NC toolpath viewing
A guide for people meeting NC programs and G-code for the first time: the steps to draw a first path with CNC Path Analyzer, what the screen elements mean, and which articles to read first.
An NC program is a set of directions for the tool
Instead of a person turning handwheels, a CNC machine reads the coordinates written in a program line by line and moves the tool. Each line (block) usually contains information such as "how" (G-code), "to where" (X/Y/Z coordinates) and "how fast" (F). For example, G01 X20. F0.2 means "cut in a straight line to X20 at 0.2 mm per revolution".
The problem is that it is hard to picture where the tool actually goes just by looking at hundreds of lines of numbers. CNC Path Analyzer draws that picture for you.
Understanding the lines and controls
| Element | Meaning |
|---|---|
| Dashed or light lines | Rapid traverse (G00): segments where the tool must not touch the workpiece |
| Solid lines | Cutting moves (G01, G02, G03, etc.): segments that actually cut the workpiece |
| Play, previous/next block | Moves the tool in program order and highlights the current source line |
| Tool layers | Shows or hides paths separately for each tool number (T) |
| Warnings | Lines that cannot be interpreted or need checking, with the reason |
Drawing your first path
- Copy a short example from the Learning Center article on lathe X diameter programming or on G00 and G01.
- In the machine settings of the tool, choose the machine type that matches the example (lathe or machining center).
- Paste the example into the program tab and press the toolpath view.
- Check the whole path with fit view, then press play to step through line by line and compare the drawing with the source.
- Try changing one number. For example, change an X value and you can immediately see how the line moves.
Good articles to read first
- G00 rapid traverse and G01 linear cutting: the two commands underlying every program.
- G02/G03 circular interpolation: how to determine direction, and R versus I/J commands.
- Why lathe X is a diameter: the first stumbling block when reading lathe programs.
- The G71 OD roughing cycle: the classic cycle where one line expands into dozens of moves.
How to read a single block
An NC block is a series of words, each an address letter followed by a number. Reading N100 G01 X24. Z-18. F0.1 word by word gives N100 (sequence number, a label), G01 (linear cutting), X24. (diameter 24 position), Z-18. (Z -18 position) and F0.1 (feed of 0.1 mm per revolution). The order of addresses is mostly free, but by convention they are written as N, G, coordinates, F/S/T, M for readability.
| Address | Meaning | Example |
|---|---|---|
O | Program number | O1000 |
N | Sequence number (referenced by P and Q in cycles) | N10 |
G | Type of operation (motion, cycle, coordinate system, etc.) | G01, G71 |
X Y Z | Target coordinates (lathe X is a diameter) | X30. Z-2. |
F | Feed rate | F0.2, F300 |
S | Spindle speed or cutting speed | S1500 |
T | Tool number | T0101 |
M | Miscellaneous functions (spindle, coolant, program end) | M03, M30 |
Viewing on a smartphone
On a small screen, collapse the top tool panel to make the path area larger. Spread two fingers to zoom in and drag with one finger to pan; the fit view button always takes you back to the whole path. For long programs, opening a file is easier than pasting, and stepping with the previous/next block buttons lets you follow the source and the path together even on a small screen.
Things to keep in mind at first
The drawing reflects only what is written in the program. It does not know the tool lengths or work offsets stored in the machine, or the size of the stock and chuck, so a plausible-looking line does not mean the part will actually be machined safely. If you see a warning, check Path troubleshooting and the supported scope before ignoring it.