Looking to find out how to program the g-code in makercam so that cutting will automatically pause to allow for a router bit change. Thank you!!
I believe it should be done automatically. As long as you specify bits of different sizes for the cuts it should detect that you will need at least two different bits and change pause to switch between them.
If you wanted to use two different 1/4 inch bits for example you might have to specify one of them as 0.2501 inches or something to make it recognize them as different.
I apologize in advance if I go too deeply into G-Code here. You can check the G-code file before running it to make sure that the program will call a tool change. Open the .nc file in the text editor of your choice. You can use notepad, I use sublime myself for line numbers and other nice features.
Here is what one of my files looks like at the beginning of a profile:
Line 12 is the tool change command in this example. The specific G-Code command for a tool change is M6. The variable for a tool change is T1. If you want another tool aside from tool 1, you can change it to T2 or T5. Most posts will automatically insert this command when you change tools in your CAM program (in this case MakerCAM).
The Maslow will initiate a tool change only if the tool number is different than the one it thinks it’s currently using. This means that the first program you run after booting up the machine will start a tool change. After that, it only will pause for a tool change if the M6 command calls another tool aside from the first one you loaded. This is really nice if you’re running the same tool for a bunch of programs in a row.
If you find you don’t have an M6 command in your code and you don’t feel like fixing it in your CAM, you can always just write in T1 M6 (or whatever tool # you’re planning on using) before a profile. As with any G-Code edits, make sure that you’re only affecting the part of the code for that tool. It could ruin a part (or even a bit) if you accidentally run the wrong tool on the wrong path.
Traditionally you’d give every different tool (not counting identical duplicates) a unique number so, say, tool 1 is always Bar’s 1/4" single flute upcut bit, tool 2 is your favorite v bit, etc. Your CAM program would have a “tooltable” with a complete description of your bit’s properties (sizes, shapes, type of material, form and number of flutes, etc). With MakerCAM you’d keep it on (maybe virtual) paper in your notebook but the idea still applies.
Consistency might be the hobgoblin of little minds, but it does make keeping track of an ever expanding collection of bits easier
Here is some code I use for tool change. I use a 4"x24" piece of sheet metal and alligator clips connected to the AUX 4 Signal and Ground pins. I also have a IOT Power Relay connected to AUX 1 for spindle automation.
G00 X0.00000 Y12.00000
G38.2 Z-.15 F1
The T1 M6 powers off the router and pauses the program allowing me to change the bit. I also physical power off the router at this point for safety even though I have the router plugged into the Normally Closed socket on the IOT Relay.
Once I hit resume it raises the Z-Axis to a safe travel height and moves the sled to 12" below the center top of back board. It then lowers the Z-Axis to .1 inch and the M0 pauses the program. This pause allows me to slide the sheet metal under the sled and connect the alligator clips to the bit and to the sheet metal. The reason I bring it up to 12" from the top is so the sheet metal can clear the top of the back board so I can attache the alligator clip.
Hit resume again and the program then lowers the bit until it touches the sheet metal and sets the Z-Axis to 0. The next M0 pause is so I can remove the alligator clips and also remove the sheet metal from under the sled. This is also the point that I turn the power back on to the router, but it should still be powered off at the IOT Relay.
Hit resume again and the Z-Axis is raised to a safe height, the router is powered back on again, and the program resumes cutting.
I hope this helps.
Thanks Bill for a very useful post. I made an attempt to follow those instructions, but for the life of me, I can’t get my maslow to turn the relay on.
I have it wire to the aux 1 port as you mentioned. I’m wondering if there is a setting in ground control or in the firmware that needs to be activated to let it know it’s supposed to be controlling the relay?
I’m hoping to get my machine controlling the cutting tool as much as possible so I can do what most of you would say not to, and leave while it’s cutting, knowing successful or not when it finishes or gets to a tool change the cutter will turn off & I will get it going again as soon as I can return. This feature is kindof a necessity for a busy father of a young one. I just can’t stay in the garage watching the maslow run. I can observe remotely with a webcam though.
so if you are watching through a webcam and find that the machine has stopped
moving 10 min into an hour long run, are you happy just watching it sit and
start a fire as the motor spins for the next 50 min?
watching from a webcam when you can get there in a few min is one thing, but you
really need to be able to shut it down within a couple minutes if something goes
wrong. You can setup an internet based power switch to turn it off.
the problem isn’t that the motor keep spinning when it’s done cutting or when
it’s waiting for a tool change, the problem is if it stops moving for whatever
reason with the bit in contact with wood.