LinuxCNC – Tool Change (part 2)
Yowza! More to the tool change than I realized in LinuxCNC. The tool change routine exists in the latest available stock version of LinuxCNC but it is poorly implemented for a manual tool change on a hobbyist machine and unworkable as is, for an automatic tool changer.
The good part is that the bones are there. It is up to the user to hang some flesh on those bones.
LinuxCNC will respond to the tool change code installed in the Post Processor I mentioned in a previous post, by stopping for a tool change. But that is all it does. Stop at the safe move height.
None of the axes will manually move. They remain disabled. Any fooling with the pause or start buttons which will get manual control back, will also set the G code file back to the beginning. Bummer.
With the age of EMC, EMC2, and LinuxCNC (all the same) I would think a MACH3 type of manual tool change would be fully implemented AND FUNCTIONAL in the stock release. Such is not the case.
My normal MACH3 operating method on my Taig micro mills and HB2 is to wait for the auto stop for the tool change. (Stock LinuxCNC only does this.) Then I manually run the spindle up to provide room for the manual tool change. (ER16 collets) Then move X/Y to find a place to touch off Z height. Do the touch and set Z to zero for the new tool. Then move back to a safe Z height.
When I resume the run, the program picks up where it left off and moves to the new cutting location and continues.
I found the solution in the LinuxCNC Wiki. The issue has been recognized for a very long time. That itself, is a problem. If you don’t understand what is in this link then LinuxCNC is probably not for you. The link to the file here will not run the latest LinuxCNC. It is the old EMC version. That’s part of the pitfalls in user Wiki support… old data. I have the corrected Python code file if needed.
A Python file named “hal_manualtoolchange” (no quotes) must be edited or changed in the user/bin directory of the Linux operating system. Some Linux systems may put it elsewhere.
Many of the pundits on the Wiki say to just run separate G code file for each tool. That is extremely lame, but it is an effective no-programming solution. Not a fix but a work around.
Links to a real fix are in the User Forum but in one posting, the first two examples in a series of postings maintain links to obsolete editions of the software. Like the one in the Wiki link above. Only the finial version after reading and studying many long pages of user posts is relevant to the current LinuxCNC version.
I am not posting all the details as you have to be somewhat of a Linux Head to understand all of them. The details could change tomorrow and I would be posting bad skinny, The tool change fix is commented as, “a bit buggy” for all that it might mean. What it does mean is that it works well enough but it is not idiot proof. If you load a new program or push run instead of tool change “continue” button, things will go wrong. Its a human operator error, but one that is not locked out.
After some personal consideration, I realize what is happening here. Because the tool change is not bullet proof, there is a liability in having it fully implemented as is. If I as a user, have to hack the software to make it work, then I am the responsible person. That liability concern is unspoken, but I think it is real.
So I have to revise any implied recommendation about LinuxCNC as the ultimate solution for CNC control for the average home shop hobbyist user.
LinuxCNC is not a solution for the casual machinist who has no skills with software hacking and no desire to dig into the naked code of LinuxCNC. Those things are part of my bag, so no real problem for me to figure things out.
LinuxCNC is by it’s very nature, experimental and a continuous work in progress. It is NOT plug and play, more like plug and PRAY. Ha!
It is still a solution for me, but I realize it is not for everyone or anyone who just wants to run their machine tool. It’s not a fault. It is what it is, and I am making that fact perfectly clear. Uh… Read my lips. Ha! Again…
Folks like Tormach can take this software and create PathPilot, a fully functional Linux package and support it for their own use. PathPilot was the main reason I took another look at LinuxCNC. I believe Linux OS IS the solution, but raw LinuxCNC is not for everyone.
PathPilot is not available open market because of the support issue and the thousands of variables in hardware beyond Tormach control. So I understand.
I like to hack in Linux so (again) it does work for me. I understand my hardware because I built it. There are a lot of users like me that can make good use of the software, so I am not special.
My recommendation is to stay in your own comfort zone. If you are happy as an operator and machinist, go purchase commercially supported products. Hacking software will only drive you nuts and make you feel insecure.
If you are also a programmer and comfortable with Linux OS, then LinuxCNC is the lowest cost functional CNC program upon which to build you own system.
Now that I have tool changes working, I am feeling secure again…