Online G-code viewer and checker: tool path, ranges, tools
Paste a CNC program, open a file or drag it here: the viewer draws the tool path in 3D, steps through the program block by block and checks it for the mistakes that cost a part or a tool. It reads ISO G code for mills and lathes (Fanuc type) and Heidenhain ISO programs. Your program never leaves your computer.
Summary
Checks
Your program stays on your computer: the viewer runs in your browser and sends nothing. Drag to rotate the view, Shift-drag or right-drag to move it, scroll to zoom. Click a line in the program to see where it goes.
How to check a program
- Open the program. Paste the text, click Open file or drag the file onto the box. The viewer detects a mill or lathe program and ISO or Heidenhain ISO code; if the guess is wrong, choose Machine and Dialect yourself.
- Look at the tool path. Blue lines are cutting moves, dashed orange lines are rapid moves. Rotate the view with the mouse or use the Top, Front and Side views.
- Step through it. Play runs the program, the arrows go one block back or forward, and the slider jumps anywhere. The line under the drawing shows the current block, the position, the feed rate, the spindle speed and the tool. Click a line in the program to jump to it.
- Read the checks. Errors are blocks that cannot run as written, Check marks something that is often a mistake, and Notes list what the viewer did not interpret. Click a line number to jump to the block.
- Copy the report for a colleague or for your records.
What the checks look for
| Check | Why it matters |
|---|---|
| Arc end point not on the circle | Most controls stop with an arc alarm, or cut a different contour |
| Arc radius too small for the end point (R) | The control cannot compute the arc and stops |
| Arc without a circle centre | Missing I/J/K or R: the block cannot run |
| Cutting move without a feed rate | An alarm, or a feed rate left over from another program |
| Cutting while the spindle is off | A broken tool or a scrapped part |
| Rapid move down to a negative Z | A crash if Z0 is the top of the part |
| Duplicate block numbers | Block search and GOTO can jump to the wrong block |
| No program end (M30, M02) | The program does not end or rewind as expected |
The summary adds what you compare with the machine and the set-up: the X, Y and Z ranges of all moves and of the cutting moves alone, the tools in the order they are used, the spindle speeds and feed rates, the length of the cutting and rapid moves, and an estimate of the cutting time.
What the viewer does not interpret
The viewer shows the programmed path. It does not follow macros and variables (#100, IF, GOTO), subprogram calls (M98, M99, G65), lathe turning and threading cycles (G70-G76, G90, G92, G94), Heidenhain cycles (G200 and up, G79) or conversational Klartext programs. It does not apply tool radius compensation, coordinate rotation, scaling, polar coordinates or work offsets (G54-G59), and a return to the reference point (G28) ends at the intermediate point. Drilling cycles G73 to G89 on a mill are drawn as the drill moves. Each of these appears as a note in the checks, so you know which parts of the drawing to read with care. Machine-specific codes differ between builders; the M code list explains why.
Online viewer or the backplotter in CNC Syntax Editor?
The online viewer is for a quick look and a check in any browser. When you write and correct programs every day, the backplotter in CNC Syntax Editor Enterprise runs on Windows next to the editor: it highlights the current line, stops at breakpoints, runs in slow motion, and you correct the code and run it again in the same window. The online viewer, on the other hand, draws drilling cycles and lathe programs with X as a diameter, which the backplotter does not. The editor also renumbers blocks, shifts, scales and mirrors axes, and compares two programs side by side. Download the Free Edition or the trial, or see how to open an NC file for other ways to open CNC programs.
Questions
Is my program uploaded? No. The viewer runs in your browser; the program is read and drawn on your computer and is not sent anywhere.
Which files can I open? Any CNC program saved as text, whatever the extension: .nc, .tap, .ngc, .cnc, .iso, .txt, Siemens .mpf, Heidenhain ISO .i, Okuma .min, Mazak .eia and others. Binary files and 3D-printer G code are not supported.
Does it read Heidenhain programs? Heidenhain ISO programs, yes: the circle centre in I, J and K is read as an absolute position, a centre may stand in its own block, and the blank form (G30/G31) is drawn as a box. Conversational (Klartext) programs are not supported.
How are lathe programs shown? In lathe mode X is read as a diameter, U and W as incremental moves, and the default view shows Z across and X upward. The viewer usually detects a lathe program by itself; you can also choose Mill or Lathe.
How exact is the cutting time? It is the cutting length divided by the programmed feed rate, without rapid moves, acceleration, dwells and tool changes, so the real time is longer. Moves with feed per revolution are counted only when a fixed spindle speed is known.
What is the difference to the backplotter in CNC Syntax Editor? The online viewer is for a quick look and a check in any browser. The backplotter in CNC Syntax Editor Enterprise runs on Windows next to the editor: it steps through the program with breakpoints, highlights the current line and lets you correct the code and run it again. The online viewer also draws drilling cycles and has a lathe mode with X as a diameter, which the backplotter does not offer; neither of them shows material removal.