Controllers
Controllers and G-code
NativeCAM writes each controller's own dialect, and its export checks hold every file to that controller's rules. Here's what it supports, and how far each one has been tested.
Supported controllers
| Controller | Machines | Files | Status |
|---|---|---|---|
| Avid Mach4 | Avid PRO series on Mach4 | .tap | Run on a real machine |
| Grbl 1.1, grblHAL, FluidNC, Carbide Motion | Shapeoko, X-Carve, LongMill, AltMill, many DIY machines | .nc | From documentation and firmware source |
| LinuxCNC | LinuxCNC and PathPilot machines | .ngc | From documentation |
| Masso | Masso G3 machines, Onefinity Elite (Masso) | .nc | From documentation |
| Centroid CNC12 | Acorn, Oak, Avid EX | .cnc | From Avid's EX posts |
| Buildbotics | Onefinity (original controller) | .nc | From documentation |
| ShopBot | ShopBot (OpenSBP part files) | .sbp | From ShopBot's command reference and vendor posts |
| RichAuto DSP | Axiom and many full-sheet routers | .nc | Conservative; its handling is undocumented |
| Anything else | With your own Vectric .pp | The post's | Checked against the controller's rules where known |
Only Avid Mach4 output has run on a real machine so far. Treat the rest as unverified: run the acceptance test, then air-cut. Results from your own machine are what move a controller from "from documentation" to tested, so please report them.
Pick the controller with the setup assistant or under Job Setup ▸ Machine ▸ Controller.
Avid Mach4
The post is modelled on Avid's own Vectric post (v3) and Fusion 360 post, so files behave like the ones Avid supports:
.tapfiles with CRLF line endings and parenthesised comments (nested parentheses become braces).- A safety line
G00 G94 G20 G17 G90 G40 G49 G80(orG21for metric), thenG91.1for incremental I/J andG64. - Tool changes retract, stop the spindle, then call
T#M6, so Avid's M6 macro handles the manual change and touch plate. ATC machines also getG43 H#. An optionalM00pause mode suits setups without an M6 macro. M07turns the dust collector on after each tool change, thenS#### M03and an optionalG04 P#spin-up dwell, always written with a decimal point.- Arcs as
G02/G03with I/J, each under 180°, including helical arcs. 4 decimal places in inches, 3 in millimetres. - The footer retracts, parks, then
M05,M09,M30.
Grbl family
Grbl 1.1, grblHAL, FluidNC and Carbide Motion have strict parsers, so the post only writes what each one accepts:
G90 G94 G17andG20/G21; noG64,G90.1,G43 Hor canned cycles..ncfiles with LF line endings, every line within Grbl's 79-character limit (126 on FluidNC); long comments are shortened.M8for the dust collector (stock Grbl has noM7),S#### M3, andG4 Pdwells in seconds.- Arcs as
G2/G3with incremental I/J, cut as lines where rounding would trip Grbl's arc check (error 33). - Tool changes. Stock Grbl rejects
M6but keeps running the lines after it, so the next tool's cuts would run with the old bit. NativeCAM writesT# M6only where something stops for it: Carbide Motion, a tool changer, or gSender or CNCjs named as the program that sends the file. Otherwise each tool gets its own file. Choosing the pause (M0) tool change keeps one file for senders that handle it. - Run-time estimates use Grbl's planner: 16 blocks of look-ahead, a 0.01 mm junction deviation and rapids blended like feeds.
Other controllers
| Controller | What NativeCAM writes |
|---|---|
| LinuxCNC | .ngc; G91.1 and G64 P blending at the arc tolerance; T# M6 then G43 H# (LinuxCNC's M6 doesn't apply the tool length); M8; G4 P in seconds; checked strictly, as LinuxCNC rejects anything it doesn't know. |
| Masso | .nc; T# M06 (Masso applies the length itself); G4 P in whole milliseconds; no G43, G64 or G91.1, which Masso's documentation doesn't list. |
| Centroid CNC12 | .cnc with CRLF, as Avid's EX posts write; T# M6 then G43 H# from CNC12's tool library; M7. |
| Buildbotics | .nc; G91.1; T# M6, which pauses for the change by default. |
| ShopBot (OpenSBP) | .sbp part files, not G-code: a check of ShopBot's unit setting before any move, SA, MS/JS speeds in units per second, M2/M3/MZ and J2/J3/JZ moves, CG arcs, PAUSE n dwells and END. Spindle and tool-change commands follow ShopBot's own posts. Without a tool changer each tool gets its own file. |
| RichAuto DSP | .nc in millimetres only, with no comments and arcs as short lines (their handling isn't documented), one file per tool. |
Rotary
What each controller can do with a 4th axis along X. None of this has been verified on a machine yet: Mach4's G93 feeds and which way Avid's rotary turns are still untested, so air-cut rotary programs with particular care.
| Controller | On faces (indexed) | Wrapped around, rounding and 3D finishing |
|---|---|---|
| Avid Mach4, LinuxCNC, grblHAL | Driven A axis: G00 A at safe Z between angles | Yes, with inverse-time (G93) feeds on moves that turn the blank |
| Centroid CNC12, Buildbotics | Driven A axis: G00 A at safe Z between angles | No: their rotary feeds aren't documented and they don't take G93 |
| Grbl 1.1, FluidNC, Carbide Motion, Masso | Turned by hand, with an M0 pause for each turn | No (needs a driven axis) |
| ShopBot, RichAuto | No | No |
Turned by hand, each new angle starts with a lift to safe Z, the spindle off and a pause with a comment such as "Turn the blank to 90°, then Cycle Start". Every file starts with a pause that asks for its first angle, so a job split into one file per tool never assumes where the last file left the blank.
Inverse time. On a wrapped cut each line's F is one over its time in minutes, worked out from the path the tool tip traces, as Avid's own wrap posts do, and lowered where the blank would otherwise turn faster than the rotary's turn speed. Moves that don't turn the blank stay in G94, and G94 is back on before every tool change and the program end. Before your first wrapped job on Mach4, with the tool raised and no blank in the chuck, run G21 G90, then G93 G01 A360 F10, then G94 from MDI: the turn should take exactly 6 seconds.
A rotary program turns the blank back to A0 at the end; after more than ten turns it stops on the nearest whole turn instead, and says so at the end of the file. See the indexed and wrapped tutorials.
Tapping and boring in imported G-code
When NativeCAM simulates a G-code file from another program, it reads tapping and boring cycles the way the project's controller runs them, following each controller's manual. A cycle the manual doesn't describe, or describes as something else, is skipped with a note naming the controller and the reason, and its holes don't show. None of this has been compared with a real controller (tutorial).
| Controller | G84 / G74 tap | G76 fine bore | G87 back bore | G88 bore, retract by hand |
|---|---|---|---|---|
| Avid Mach4 | Yes: feeds out to R, then rapids | Yes: shifts by I/J, or by Q toward +X | Yes | Yes |
| Centroid CNC12 | Yes: feeds out to R, then rapids | Yes: shifts by Q toward +Y | Skipped: not documented | Skipped: not documented |
| LinuxCNC 2.9 | Yes: feeds all the way out to the retract height | Skipped: lathe threading | Skipped: behaviour undefined | Skipped: behaviour undefined |
| grblHAL | Skipped: G84 experimental and undocumented, G74 an error | Skipped: lathe threading | Skipped: an error | Skipped: an error |
| Grbl, FluidNC, Carbide Motion, Masso, Buildbotics, RichAuto, ShopBot, a Vectric post with no known controller | Skipped | Skipped | Skipped | Skipped |
Taps are cut in one pass: a Q word isn't read as a peck depth, and a note says so. A back bore cuts under the material, which the simulation can't show, so it's carved as a hole right through, the width of the tool. Run times allow 0.5 seconds for the spindle to reverse at the bottom of a tap, 0.5 seconds for each spindle orient (G76, G87) and 10 seconds for each G88 stop to retract by hand. These are estimates.
Your own Vectric post
For a controller NativeCAM has no post for, Job Setup ▸ G-code Output ▸ Use a Vectric Post… runs your own Vectric .pp file as a template. Arcs the post can't express are written as short lines, a post with no tool-change block saves a file per tool, and posts that need rotary wrapping or inverse-time feeds are refused. Before you use it, a sheet compares its output with NativeCAM's own post on the acceptance test. NativeCAM never ships or shares anyone's posts. Tutorial →
Export checks
On export, NativeCAM reads back the file it's about to save and checks it before the save panel appears:
- Against the controller. Units set before moving and matching the machine, line length, accepted codes, I/J only on arcs, arc radii within the controller's tolerance, a feed before the first feed move, tool numbers, dwells written so the controller reads the right unit, the spindle on before cutting, a lift to safe Z before the first sideways move after each tool change, no rotary (A) moves for a controller without a rotary axis, on a blank turned by hand no pause for a turn with the spindle running or the tool below safe Z, and the inverse-time (
G93) rules: an F word on everyG93move, no arcs inG93,G94back on before any stop, and a feed given again after it. - Against the toolpaths. Every cutting move, arc direction and centre, feed, dwell, tool and spindle speed is compared with what the toolpaths asked for, and on a rotary job, the angle the blank is at (its A position, or the angle the last pause asked for when it's turned by hand) and every inverse-time F. This catches post bugs a simulation of the toolpaths can't, such as doubled coordinates or a dwell in the wrong unit.
- Against the machine. The whole program, retracts and park included, is measured against the machine's travel and Z travel with the tool's stick-out.
Errors here or in the job's checks ask you to confirm before exporting; the command line refuses to write the file, and exits with status 1, without --force. Warnings stop neither. Export Air Cut… saves the same program with every Z raised, and Export Setup Sheet… saves a printable page for the machine (example).
Trying a new controller safely
The acceptance program has a square, circles from 1 to 50 mm radius in all four quadrants, a helix, a 3-second dwell and two tool changes.
- Run it in check mode where the controller has one (Grbl's
$C). - Run it as an air cut.
- Run it 0.5 mm deep in scrap and measure the circles. Unit and arc errors show up in their sizes, and re-zero errors in the depth after each tool change.
Save it from the last page of the setup assistant, or from the command line:
swift run -c release nativecam-cli acceptance --controller grbl --sender gSender --units mm
Controller names: grbl, grblHAL, fluidNC, carbideMotion, linuxCNC, masso, centroid, buildbotics, openSBP, richAuto.