Milling know-how

GRBL, Mach3 or LinuxCNC: which G-code dialect for your controller?

In short: the dialect is determined by your machine controller, not by the CAM. Hobby gantry routers mostly run GRBL, Windows controllers often use Mach3/Mach4 or UCCNC, DIY and retrofit machines run LinuxCNC. In the generator you simply pick the matching post-processor — it formats the G-code for exactly that controller.

Almost all controllers understand the core commands (G0, G1, G2/G3) the same way. The differences are in the details: program start and end, tool changes, comment syntax and special functions. A wrong dialect rarely causes a crash, but often error messages or ignored commands.

Generate G-code for your controller: to the milling tool →

Three steps to the right dialect

  1. Identify the controller: which software or board drives the machine? You find it in the manual, the order confirmation or directly on the controller board.
  2. Pick the matching post-processor in the generator — step2gcode offers GRBL, Mach3/Mach4, LinuxCNC, UCCNC, EstlCAM, Heidenhain and Fanuc, among others.
  3. Run a short test program as an air cut: if the controller loads the file without errors and moves as shown in the preview, the dialect fits.

Which controller needs which post-processor?

The mapping is usually unambiguous once the controller is known:

Controller / machinePost-processor
Shapeoko, X-Carve, most hobby gantry routersGRBL (default)
Windows controllers (Mach licence, often with breakout board)Mach3/Mach4
DIY and retrofit machines running LinuxLinuxCNC
Stepcraft and other machines using UCCNCUCCNC
Converted 3D printersMarlin or RepRapFirmware
Industrial controllersFanuc, Heidenhain, Centroid and others

How the dialects differ

Typical differences are the start and end sequences (which modes are set, how the spindle is controlled), the handling of tool changes (M6 with or without a pause), the comment syntax (parentheses or semicolons) and special functions such as coolant or probing cycles. The post-processor takes care of exactly these details so you do not have to.

What happens if you pick the wrong one?

Usually something harmless: the controller reports an unknown command or refuses to load the file. Silently ignored lines are worse — if, say, the spindle start command is not understood, the machine plunges into the material with a stopped spindle. That is exactly why an air cut belongs to the routine after every dialect change.