Saving G-code #
When the toolpaths look right in the preview, you write them out as G-code: the text file of moves your machine's controller runs. Carvio does this with a post processor, a small definition that knows the dialect of your controller.
Open the Save Toolpaths form with the Save Toolpaths button on the Toolpaths tab, Toolpaths > Save Toolpaths... or File > Save Toolpaths.... Choose the post, which toolpaths to write and how tool changes are handled, then click Save....
Tip: If your machine is connected to Carvio you do not need to save a file at all: the Run panel builds the job from the toolpaths and sends it (see Machine Control). It uses the same post and the same tool change and probe settings as this form.
The Save Toolpaths form #
The form writes the toolpaths of the sheet and side you are working on. If the job has several sheets or two sides, a line at the top says which one will be written; switch sheet or side to write the others.
If some toolpaths are out of date (their vectors or model changed), a warning says so, with a Recalculate out of date button. Recalculate before saving: an out-of-date toolpath is written as it was last calculated.
Post #
The post processor that writes the G-code. Pick the one made for your controller and the units you want in the file; Carvio remembers your choice.
See Post processors for what each one does.
Edit post #
Opens the chosen post in the Post Processor Editor, to see or change exactly what it writes.
Visible, Selected, All #
Which toolpaths are written: the ticked (visible) ones, the selected one, or all of them, in list order. The form shows the toolpath list of the sheet and side you are working on: tick a toolpath to make it visible, click one to select it. The line under the list says how many toolpaths will be written.
Toolpaths that are switched off or have no moves are skipped.
Recalculate out of date #
Recalculates the toolpaths whose vectors or model changed since they were made, so the file matches the design.
Save #
Asks for a file name and writes the G-code. The name starts as the project's name with the
post's file extension (.gcode, .nc, .txt...). The status bar confirms what was saved.
Preview G-code #
Shows the G-code the form would write, in a window, without saving anything. Use it to check the header, the tool changes and the probe moves before you commit to a file. The whole program is shown, however long, with each word in its colour: G and M codes, X, Y and Z in the colours of their axes, arc centres, feeds and speeds, tools, line numbers and comments.
Tool changes #
When the toolpaths use more than one tool, Tool changes sets how the change is handled. A blue note lists the tools and counts the changes.
| Choice | What you get |
|---|---|
| One file per tool | One file for each tool; you change the tool between files |
| Post processor's tool change | One file; the post's own tool change block at each change (an ATC's M6) |
| Pause for a manual change | One file that stops at each change so you can swap the tool by hand |
One file per tool #
Each tool's toolpaths go to a file of their own, named after the file you choose with the
tool number added: sign_T1.gcode, sign_T2.gcode. This works with any controller and any
sender.
All toolpaths that use the same tool go into that tool's file, in list order, so plan the list with that in mind.
Post processor's tool change #
Writes the post's own TOOLCHANGE block at every change of tool, which is what a machine with
an automatic tool changer needs (usually M6 T2).
If the chosen post has no TOOLCHANGE block, the form warns you: the tools would change without any command. Pick one of the other choices then.
Pause for a manual change #
At every change of tool the program turns the spindle off, rises to the retract height and
pauses with M0, with a comment naming the tool to load. When you resume, the next toolpath
starts the spindle again.
| Option | What it does |
|---|---|
| Park at a position before the pause | Moves the tool to Park X / Y before pausing, so you can reach the collet |
| Park Z | The height the tool rises to before the park move (skipped when it is below the retract height) |
| Dwell after restart | Waits this many seconds after the spindle restarts, so it is up to speed |
| G-code after the pause | Extra lines sent after the pause, separated by a vertical bar |
A post can also define its own MANUAL_TOOLCHANGE block, which is then used instead of the built-in pause sequence.
Park at a position before the pause #
Before each manual tool change pause, the tool moves to the Park X and Park Y position (in the job's coordinates), so the spindle is somewhere easy to reach. Park Z is the height it rises to first; it is skipped when it is below the retract height.
Dwell after restart #
After a manual tool change, the program waits this many seconds once the spindle has restarted, so it is at full speed before the first cut. 0 means no wait.
G-code after the pause #
Your own G-code lines, written straight after each tool change pause, for example a probe
routine or a coolant command. Separate lines with |.
Touch plate probing #
The form can write a touch plate probe into the program, so the work zero is set by the program itself: at the start, after every tool change, or both. It follows the routine of the OpenBuilds XYZ probe plate: Z down onto the plate, then X and Y against its lips.
| Option | What it does |
|---|---|
| Probe at the start of the program (or of every file) | Probes before the first toolpath |
| Probe after every tool change | Probes again after each manual or post tool change |
| Z only after a change | After a change only Z is probed (the new tool's length); X and Y stay as they were |
| Axes | Which of X, Y and Z to probe |
| Plate corner | The corner of the stock the plate hooks over |
| Plate lip X / Y | How far the plate's lips reach past the stock's sides |
| Plate thickness | The thickness of the plate where the tool touches it |
| Probe distance | How far each probe move may travel before it gives up |
| Probe feed | How fast the probe moves |
The program zeroes the probed axes from the plate (Z at the top of the stock, or at its
bottom when the job's Z zero is the bottom), applies the job's XY origin, then pauses (M0)
so you can take the plate and its clip off. Use a sender that lets you jog during a pause;
Carvio's own machine control does.
The probe allows for the diameter of the tool of the toolpath that comes next. With One file per tool, the probe can be at the start of every file, but not after changes.
Probe at the start #
Writes a touch plate probe at the very beginning, before the first toolpath (of every file, when each tool has its own file). Start the program with the tool over the plate.
Probe after every tool change #
Writes a touch plate probe after each tool change, so every new tool is measured before it cuts. Not available with One file per tool (there each file can probe at its start instead).
Z only after a change #
After a tool change only Z is probed, which measures the new tool's length; X and Y keep the zero found at the start. This is usually what you want: the stock has not moved.
Axes #
The axes the probe sets: tick X, Y and Z for the full corner probe, or just Z to set the height with the plate lying on the stock.
Where to put the tool before the probe starts depends on the axes:
- Z with X or Y: above the outer corner of the plate.
- Z only: anywhere above the plate.
- X or Y without Z: 20 mm outside the plate's outer corner, level with its sides.
Plate corner #
The corner of the stock the touch plate hooks over: front left, front right, back left or back right. The probe moves are mirrored to match.
Plate lip X and Y #
How far the plate's lips stand out past the stock's X and Y faces (for the OpenBuilds plate, 10 mm). The probe adds the tool's radius to get the stock's edge.
Plate thickness #
The thickness of the plate under the tool. After probing Z the program sets Z to this height above the stock's top (or its bottom, when the job's Z zero is the bottom).
Probe distance #
How far each probe move may travel looking for the plate. If it does not touch within this distance the controller stops with an alarm, which protects the plate and the tool.
Probe feed #
How fast the probe moves towards the plate, in the app's speed unit. Slow is accurate; 100 mm/min is a good start.
Laser posts #
Laser toolpaths need a laser post, which writes the laser's power on every burning move. The form warns you if you mix them up:
- Laser toolpaths with a router post: no power commands would be written. Pick a Laser post.
- Spindle toolpaths with a laser post: they would be written without spindle or Z commands.
Setup and tool sheets #
Setup and tool sheets... opens the printable sheets for whoever runs the machine: the job size and datum, Z zero, the tools and every toolpath with its feeds, speeds and estimated time, with pictures. Print them or save them as a PDF (see Setup and Tool Sheets).
Home position and safe Z #
The program starts and ends at the home position and moves between cuts at the safe Z height. Both are set in the Material Setup section of the Toolpaths tab (Safe Z and Home X Y Z), in the job's coordinates.
- With the bundled posts, the program first rises to the home Z, then moves to home X and Y; at the end it goes back there and stops the spindle.
- Safe Z is the height of the rapid moves between cuts. Make it clear of clamps and screws.
- A manual tool change retracts to the home Z (or to the safe Z when the post has no home Z).
Warning: Both heights are measured from the job's Z zero. If Z zero is the bottom of the material, a safe Z of 5 mm is inside the material. Job Setup's Z zero and these numbers must agree.
Post processors #
A post processor turns Carvio's toolpaths into the exact text a controller expects: which
G-codes start the spindle, how arcs and feeds are written, what happens at a tool change. Carvio
reads post processors in the .pp format that other CAM programs use, so a post made for
your machine elsewhere works here too.
These posts come with Carvio:
| Post | For |
|---|---|
| Grbl (mm) / Grbl (inch) | grbl controllers; arcs as G2/G3; tool changes pause with M0 |
| OpenBuilds (mm) / (inch) | OpenBuilds BlackBox and CONTROL; comments name each toolpath; M6 tool changes for CONTROL's dialog |
| G-Code Arcs (mm) | Generic G-code: G21/G90/G17, M3/M5, arcs, M6 tool changes |
| Mach2/3 ATC Arcs (mm) / (inch) | Mach3 with an automatic tool changer: line numbers, M6T<n> |
| Grbl Laser (mm) / (inch) | grbl 1.1 in laser mode ($32=1): M4 dynamic power, no Z moves |
| Grbl Laser with Z (mm) / (inch) | The same, moving Z to the laser's focus height |
| Laser M3 / M5 (mm) | Lasers without a laser mode: the beam switched on and off around every burn |
Choosing a post #
- A grbl router (most hobby machines, Shapeoko, X-Carve, OpenBuilds): Grbl or OpenBuilds, in the units you work in.
- A machine with an automatic tool changer: a post with a TOOLCHANGE block such as Mach2/3 ATC Arcs or G-Code Arcs, and Post processor's tool change.
- A diode or CO2 laser on grbl: Grbl Laser; use Grbl Laser with Z when the laser module rides on a Z axis and should move to its focus.
The units of the post set the units of the file, whatever units the job is drawn in.
Adding your own post #
The posts that come with Carvio are built into it. To make your own, use the Post Processor
Editor (Machine > Post Processor Editor...): copy the bundled post
closest to what you need, or import a .pp file you have. Your posts are kept in the posts
folder inside Carvio's settings folder (%APPDATA%\Carvio\posts on Windows,
~/Library/Application Support/Carvio/posts on a Mac, ~/.config/carvio/posts on Linux); a
.pp file you put there yourself shows up the next time Carvio starts. A post there with the
same POST_NAME as a built-in one replaces it.
A post is plain text: POST_NAME, FILE_EXTENSION and UNITS settings, VAR lines that
say how each number is formatted, and begin blocks (HEADER, NEW_SEGMENT, TOOLCHANGE,
RAPID_MOVE, FEED_MOVE, arcs, FOOTER...) made of quoted lines with [tokens] such as [X],
[F] and [TOOL_NAME]. A post can build on another with POST_BASE (a built-in post too, by
its file name such as Grbl_mm). A post without arc blocks gets its arcs as short straight
moves.
Post Processor Editor #
Machine > Post Processor Editor... (or Edit post... in the Save Toolpaths form) shows every post with its text, so you can read, change or make one, and see the G-code it writes as you type.
The window lists the posts on the left: a padlock marks the ones built into Carvio, a page the
ones that are yours. In the middle is the chosen post's text, coloured by what each part is
(comments, settings, VAR lines, block names, quoted lines and their [tokens]). On the right
is the G-code the text writes. Under the text, Carvio says what is wrong with it, if anything.
Like the other big windows it opens in a window of its own (see
Preferences).
| Key | What it does |
|---|---|
Ctrl+S |
Save the post |
Ctrl+Z / Ctrl+Y |
Undo / redo |
Ctrl+F, F3, Shift+F3 |
Find, find next, find previous |
Tab / Shift+Tab |
Indent / outdent the selected lines |
Ctrl+A, Ctrl+C, Ctrl+X, Ctrl+V |
Select all, copy, cut, paste |
Built-in posts and your own #
The posts that come with Carvio are read only. When you save a change to one, Carvio saves your own copy of it in your posts folder, with the same name, and that copy is used instead of the built-in post from then on. Restore built-in deletes your copy and brings the original back.
Problems with the text #
Carvio checks the text as you type. An error (red) stops the post from loading, such as a
line it cannot read or UNITS that are neither mm nor inches; the line is marked in the text,
and the post is left out of the Post lists until it is fixed. A warning (orange) is
something that loads but will not do what it seems to: a [token] that is neither one of the
post's VAR ids nor a token Carvio fills in (it is written into the G-code as it is), a block
Carvio never writes, a VAR naming a value Carvio does not have, or a missing RAPID_MOVE or
FEED_MOVE block. Click a problem to go to its line.
Preview #
Shows the G-code the post writes, updated a moment after you stop typing. Sample moves are a few moves of every kind with two tools (rapids, a plunge, straight cuts, both directions of arc and a tool change; a laser post gets a laser toolpath); Toolpaths ticked in Save Toolpaths writes your project's toolpaths instead. Untick Preview for more room for the text.
Save #
Saves the text (Ctrl+S). The Post lists use the saved post at once, with no need to restart.
Saving a built-in post saves your own copy of it.
Revert #
Throws away the changes since the post was last saved.
Export #
Saves the text, as it is in the editor, to a .pp file wherever you choose: to back a post up
or to use it in another program.
Insert token #
Puts a [token] at the cursor: one of the post's VAR ids ([X], [F]...) or a text Carvio
fills in ([TOOL_NAME], [TOOLPATH_NAME], [DATE]...).
Find #
Type a word and press Enter to select the next place it is written, in any case; the arrows
(or F3 and Shift+F3) go to the next and the previous one.
New #
Makes a new post of your own from a simple grbl-style starting point, after asking its name.
Copy #
Makes a post of your own from the text shown (changes included), under a new name. The easiest way to make a post is to copy the bundled one closest to what you need.
Import #
Copies a .pp file (one made for another CAM program, say) into your posts folder, so it
appears in the list and the Post lists.
Delete #
Deletes a post of your own, after asking. On your copy of a built-in post the button says Restore built-in: the copy goes and the built-in post is used again. Built-in posts cannot be deleted.