Docs › Command line › machine
machine
Read a machine's real limits from its controller's settings, and optionally write them into a project. Controller settings are the only files that hold a machine's per-axis speeds and accelerations, which the run-time estimates need.
Synopsis
nativecam-cli machine <settings file>
[--apply project.nativecam [-o out.nativecam]]
Settings files
| Source | What NativeCAM takes from it |
|---|---|
Grbl / grblHAL $ output, saved as text | $110–$112 rates, $120–$122 accelerations, $130–$132 travel, $11 junction deviation, $30/$31 spindle range, with notes for laser mode, soft limits off and grblHAL's $341 tool-change mode. Grbl 0.8's older numbering is refused. |
Mach4 Machine.ini | Motor velocity and acceleration (divided by CountsPerUnit), the axis-to-motor mapping (a gantry takes its slower motor), soft-limit travel, the spindle range and the G-code units |
| LinuxCNC INI | [AXIS_X] (or [AXIS_0]) limits, velocities and accelerations, LINEAR_UNITS, [SPINDLE_0] |
FluidNC config.yaml | The axes map's rates, accelerations and travel, the spindle speed_map, and whether an ATC is configured |
Fusion 360 .mch | Axis limits, controller speeds, spindle range and tool-change time (no acceleration) |
Mach3 profiles and Masso's .htg files are refused, with the reason. In the app the same import is Material & Machine ▸ Motion ▸ Import Controller Settings…, where you choose which values to apply.
Output
The format, then each value with where it came from. Lengths are in the project's display units with --apply; otherwise in the file's G-code units, or inches if it doesn't say:
$ nativecam-cli machine grbl-settings.txt
Grbl $ settings
Controller: Grbl
X travel: 32.283 in ($130 X max travel (mm))
Y travel: 32.283 in ($131 Y max travel (mm))
Z travel: 4.331 in ($132 Z max travel (mm))
Rapid X/Y: 394 in/min (the lower of $110 and $111 max rate (mm/min))
Rapid Z: 98 in/min ($112 Z max rate (mm/min))
Max cutting feed: 394 in/min (the lower of $110 and $111 max rate (mm/min), which caps cutting feeds too)
Acceleration X/Y: 29.5 in/s² (the lower of $120 and $121 acceleration (mm/s²))
Acceleration Z: 11.8 in/s² ($122 Z acceleration (mm/s²))
Corner tolerance: 0.000 in ($11 junction deviation (mm))
Max RPM: 24000 RPM ($30 max spindle speed)
Min RPM: 10000 RPM ($31 min spindle speed)
Lines for the G-code units, a tool changer and any notes appear when the file has them. Here the 0.010 mm junction deviation shows as 0.000 in only because of rounding; the full value is applied.
Applying to a project
| Option | Description |
|---|---|
--apply <project> | Write every value found into the project's machine. When the file says which controller it's from, the machine switches to it (a $ dump makes it Grbl, on a custom machine). Each value records its source, so the app shows your numbers apart from estimates. |
-o <path> | Write the updated project here. Without -o, the project given to --apply is overwritten. |
$ nativecam-cli machine grbl-settings.txt --apply job.nativecam -o job-grbl.nativecam
Grbl $ settings
Controller: Grbl
...
Applied to job-grbl.nativecam
Unlike the app, which lets you pick values one by one, --apply takes all of them. Use -o to keep the original, and open the result in the app to review it.
Getting a Grbl $ dump
Send $ from your sender's console (gSender, CNCjs, UGS and others have one) and save the lines that come back, one setting per line ($110=10000.000), as a text file.
Exit status
0 when the file was read (and the project written). 1 when the settings file is missing, can't be read or is refused, or the project can't be read or written.