Why won't the software save several tools into one file, and how do tool change commands get into my G-code?
Updated Oct 13, 20263 min readVCarve Pro & Aspire
Why it happens
On the Save Toolpaths form, Visible Toolpaths To One File only works when every selected toolpath uses the same tool, or when the chosen post processor is set up for an automatic tool changer (ATC). The software checks two things before saving and shows an error if either fails:
- the post has been configured to output tool change commands
- each different cutter has its own tool number
Inside the post, the tool change commands are written by the begin TOOLCHANGE block (the official guide does not say how the software decides a post is ATC-ready, so look for this block and for ATC in the post name). It is output at every change of tool except the first. The first tool is handled by lines in the HEADER.
If you change bits by hand
- Choose Visible Toolpaths To Multiple Files.
- Tick Group where possible so consecutive toolpaths that share a tool land in the same file.
- Run one file per bit and re-zero Z after each change.
If your machine or controller handles tool changes
- Pick the ATC version of your post if one exists.
- If not, make a custom copy and add a
TOOLCHANGEblock. The commands must come from your controller's documentation. The official guide's example sequence is: spindle off (M05), select the new tool with[T]and M06, apply that tool's length offset with G43 and H[T], then restart the spindle with[S]and M03. - Change
POST_NAMEso the new post is easy to spot in the list, then save under a new file name. - Give every bit a unique tool number in the Tool Database.
- Order the toolpaths with the Up and Down arrows, tick the ones to include and save to one file. The form lists each toolpath with its tool number in square brackets.
If you want tool change codes removed
Some controllers reject the tool lines. Standard Grbl, for example, does not list M6 among its supported codes and reports an unsupported command as error 20. Use a post made for that controller, or delete the tool line from the HEADER of a custom copy.
Pro tips
NEW_SEGMENTis output when the next toolpath keeps the same tool but may need a new spindle speed. A tool change calls it automatically, so do not repeat its lines inTOOLCHANGE.- On LinuxCNC, M6 does not change the tool length offset. A G43 after it does, which is why the example includes one.
- See the entry on depth being wrong after a mid-job tool change if cuts are off after the swap, and the entry on which toolpaths can be saved into one G-code file for naming and ordering.
Sources and further reading
Save Toolpathsthe software maker's documentation (opens in a new tab)15. Advancedthe software maker's documentation (opens in a new tab)Home · gnea/grbl Wiki · GitHubgithub.com (opens in a new tab)M-Codeslinuxcnc.org (opens in a new tab)Still stuck? Ask the community
Ask in your own words. Vector answers first, from the guides. If that does not cover it, post it to members and the shop from there.