Open a sliced print file and a posted mill program side by side and the first lines look like cousins: G28, G90, G1 with coordinates and a feed. Then the vocabularies fork, M104 S210 on one side, G54 G43 H1 on the other, and the useful mental model snaps into place: not one language with a deviant dialect, but two ecosystems that inherited the same skeleton and grew different organs, because the machines needed different things.

The shared skeleton

Both descend from RS-274, and the inheritance is the motion layer: G0 and G1 for travel and work moves, G2/G3 arcs, G90/G91 distance modes, F feeds, the word-and-block grammar, modal state. The Marlin index and the LinuxCNC reference document recognizably similar foundations, which is why fluency in either ecosystem’s motion layer transfers: a printer person reads a mill program’s moves on sight, and the coordinate intuition is common property.

The organs each ecosystem grew

NeedMarlin grewCNC grew
The working toolExtrusion: the E axis, retractionSpindle: M03/M05, S in RPM, tool changes
HeatM104/M109, M140: temperatures everywhereCoolant: M08/M09, the anti-heat codes
The reference problemG29 bed leveling, mesh compensationG54 offsets, G43 tool length, touch-off
Repetitive operationsSlicer-generated everythingCanned cycles: G81-G83, tapping, threading
Air movementM106/M107 part fansNothing: chips, not breeze

The table’s deeper lesson is that neither list is optional decoration: each ecosystem’s organs are its actual daily work. A printer file is mostly E-words and temperatures; a mill program is mostly offsets and cycles; and the shared motion layer, large as it is conceptually, is a minority of either file’s lines. This is why “is Marlin a subset of real G-code” gets the answer no twice over, the differences run through every layer, deposition versus removal shaping everything above the skeleton.

The authorship difference nobody mentions

One cultural split shapes both ecosystems more than any code: who writes the files. Printer G-code is slicer-born and human-ignored, regenerated per print, read by almost nobody, which is why the printer world tolerates dense, comment-free, million-line files. CNC code is read constantly, at prove-outs, during edits, in alarm diagnosis, so its culture grew headers, comments, and formatting conventions that make human reading survivable. A printer person’s instinct that G-code files are disposable output, and a machinist’s instinct that they are maintained documents, are both correct at home, and the migration in either direction includes adopting the other side’s relationship with the file.

The dangerous overlaps

The traps live where one word kept two meanings. G28: the printer’s gentle home-all command is, on CNC iron, a stored-position return that moves through a waypoint from wherever the tool sits, the single most expensive habit a printer person can carry into a shop. The S word: PWM fan and laser values in printer-land, often 0-255, against real spindle RPM on machines, S255 meaning full power on one and a 255-RPM crawl on the other. Feed culture: F as a quality dial printers tune, versus F as calculated cutter physics machines enforce with broken tools. Each is correct at home; migration is where they bite, and the full translation map for moving printer fluency onto machine controllers walks the whole list.

Using the kinship instead of being used by it

For the printer person eyeing CNC: the kinship is a genuine head start, the motion grammar and the work-zero concept both carry, and the remaining gap is vocabulary plus consequence culture, the former drilled in minutes a day through the free 60-second rounds on the G-code practice page, the latter learned by treating every machine word as calculated rather than tuned. For the machinist meeting a printer: relax slightly, the file is still G-code, the RepRap documentation reads like a dialect manual, and nothing in it bites the way iron does. Two ecosystems, one skeleton, and the skeleton is the part worth owning either way.

Sources

Frequently asked questions

What is the difference between Marlin G-code and CNC G-code?

Sibling ecosystems on one skeleton: the motion grammar is shared, and the vocabularies diverged with the machines, temperatures, extrusion, fans, and leveling on the printer side; spindles, offsets, compensation, and cycles on the CNC side. Neither contains the other.

Is Marlin G-code real G-code?

Entirely: a documented dialect of the same RS-274 tradition, specialized for deposition. Printer people who learn to read their files take to CNC code quickly.

What are the dangerous overlaps between the two dialects?

The words with two meanings: G28 (home versus waypoint return), the S word (PWM versus RPM), and feed culture (tuned versus calculated). Each is harmless at home and a trap in migration.

I know printer G-code. What is the fastest path to reading CNC code?

Keep the motion grammar, drill the CNC-specific vocabulary, offsets, spindle codes, cycles, with the free G-Code Sprint app’s 60-second recall rounds, and use the migration map for the traps.