G-code

G-code is the shared language of CNC controllers: one command per line, a letter and a number each. Every maker adds words of their own, so netool writes only the core that all of them read the same way.

Extension
.gcode
Type
Plain text
Media type
text/plain
Vendor
ISO 6983, every controller maker
Usually produced by
CAM post-processors, netool converters and the drawing editor

What a .nc file contains

Plain text, one block per line. A block is words such as G1 X100 Y50 F6000: G says what kind of move, X and Y where to, F how fast. G0 travels, G1 cuts straight, G2 and G3 cut arcs clockwise and counter-clockwise with the centre as an I and J offset from the start. T and M6 pick a tool, S and M3 start the spindle, M5 and M30 stop it and end the program.

Why dialects matter

Fanuc, Siemens, Heidenhain, Osai, LinuxCNC, GRBL and Mach all read the core the same way and then diverge: canned cycles, work offsets, macro variables, arc spelling by radius. A file written in one dialect can behave differently or stop on another. netool writes none of the extras, which is why its output is portable and also why it says so little.

How netool writes it

G21 G90 G17 at the top, so the units, the coordinate mode and the plane are stated rather than assumed. A safe height of 5 mm between cuts. One plunge per path at the given feed. Tool compensation as G41 or G42, for the controller to work out from its own tool table. Nothing a machine's own format says that G-code cannot is dropped quietly; it is refused and named.

Converters that read it

No converter yet

Converters that produce it

.xxl .nc

XXL to G-code converter

Turn a Xilog Plus XXL program into plain ISO G-code for routers that take it.

Open tool
.pgm .nc

PGM to G-code converter

Turn a Morbidelli PGM program into plain ISO G-code for routers that take it.

Open tool
.mpr .nc

MPR to G-code converter

Turn a woodWOP MPR program into plain ISO G-code for routers that take it.

Open tool

Frequently asked questions

Does netool read G-code?

No. Reading would mean choosing a dialect and getting its extensions right, and there is no reference file to prove any reading against yet. netool writes G-code from Xilog, PGM and woodWOP programs and from drawings made on this site.

Will this run on my router?

If it reads standard G-code, the words here are ones it knows. Whether the safe height, the feeds and the tool numbers suit your machine is for you to check, and the file is written so those are the easiest things to find and change.

Which extension is right, .nc or .gcode?

Controllers differ and most accept several. netool writes .nc, which is the most widely accepted. Rename the file if your machine wants .gcode, .tap or .ngc; the contents are the same.