I’m pulling my hair out, what is left of it. There are some great posts in here about dealing with tool changes, or splitting the gcode into multiple files to accomodate different tools. I’m sorry if I just can’t find the right thread, but each post I read refers to the M6 command, like this one:
I’m on the most recent firmware, in the ‘tool-change’ field of my controller, I have the new code to raise the bit, change the bit, probe for z, and resume…
However,
I’m using Carbide Create Pro, trying to do Advanced VCarves, and in all the gcode I export, it does not use M6, a tool change is written like this: with M0 ;T302 as the tool change prompt, but nowhere in the code is M6 written, and so the ‘tool-change’ code is never run. Like this:
Could be that it is not supported… any chance you (or anyone) knows if there is a code snippet I could swap out? The tool change - T command is easy to find, could it be exchanged with a comparable M6 code?
if you manage to insert a M6 command into your g-code program, then the code you previously entered into the ‘tool-change’ field in the General Configuration Tab of the Onefinity Controller will be executed.
Regarding what to insert there, I cited some information here the other day.
I don’t have any experience with the Carbide 3D products, but they have a forum. Maybe you ask there if there is a way to activate M6 commands in the g-code output?
Ya, I’ll head over there shortly, I found the code snippets here first, so thought I’d start here. I didn’t mean to call you out directly by quoting your earlier post, but it was a good example, so thanks for that.
I did wander over to the Carbide Create forums, but thankfully a bit of trial and error showed that it’s a simple code swap. In code like I shared above, replace:
M0 ;T302
with
M6 T302
(302 is just the tool number, so it will vary based on the bit you’ve specified) So ya, swap the M0 for M6 and remove the semi-colon. I’m guessing this is obvious for someone who knows gcode.
As referenced, I think it’s also helpful to add one line to the default tool-changer macro to raise the router higher, as explained in this thread:
I wouldn’t consider having to edit every g-code file manually really a solution. Maybe you should not have posted your “solution”. Now the question if there is a way to enable M6 commands being inserted into the g-code output by Carbide Create remains unanswered.
Hi,
Mac user here running Carbide Create Pro. I too have struggled with handling GCode files for Advanced VCarves. I know there was a Website shared that would separate the files. I don’t have Web access in my shop, so wrote a quick Python script to split an AVC file:
activeFile = “both”
for line in lines:
if line[0:4] == “M0 ;”:
if activeFile == “both”:
activeFile = “one”
elif activeFile == “one”:
f1.write(“M05\n”)
f1.write(“M02\n”)
f1.close()
activeFile = “two”
if activeFile == “both”:
f1.write(line)
f2.write(line)
if activeFile == “one”:
f1.write (line)
if activeFile == “two”:
f2.write(line)
f2.close()
= = = = = =
Named it avc_split.py – put a little script (called avc) in my GCode directory to save some typing:
python avc_split.py $1
Just pass the combined AVC toolpath file … it will split it into two files for the clearing and VCarve portions. Since I typically use a 1/8" clearing bit and 60 degree V bit, I put those in the file names. Obviously, you can modify the script for your situation.