So I am finally coming up for air after being buried by work and converting my machine to run with LinuxCNC instead of Mach 4.
I was not originally planning on switching to LinuxCNC for quite a while but I kept running into Windows 10 network communication issues. This caused havoc with the scripting around my ATC and finally came to a head when I was just starting a 4th axis job that would take 4 weeks of 18 hour days on the machine. I kept having problems right in the middle of a tool change which would cause the ATC script to error and e-stop the machine. This was a big problem because the machine would need to be re-homed and the homing sensors are not perfectly repeatable (no sensor is). I have found that they are good for about 0.015" of repeatability. If you are familiar with positional 4th axis work you will know that getting the work offset aligned perfectly with the center of rotation on the machine really matters. Whatever distance you are off gets doubled when you flip a part. As much as 0.03" of misalignment on a double sided part was not going to fly for this job. Having to re-find the offset and start the job from the right point every time there was a problem sounded like a recipe for disaster since I was not always going to be the person running the machine.
In a fit of rage, I decided it was time to drop Mach 4 and move to something more robust and easier to customize. I am sure that with enough time I could have improved my ATC scripting in Mach 4 to be better but I was tired of dealing with what I consider to be design flaws in that software. It just makes scripting in it so much more work than it needs to be.
I spent the next 3 weeks at work learning how to configure LinuxCNC and swapping out the ESS and Avid CRP850 BOB for a Mesa 7I96S and 7I84. I was in a pretty big rush because of the deadline for all that 4th axis work. Here is a picture of the electronics cabinet (please ignore the wiring mess,I was working 18-20 hour days and was in a hurry):
We have now been running flawlessly for about 6 months on LinuxCNC with the QtDragon_HD interface. It only took me a couple days to get all our custom scripting ported over. It was so much easier to write and debug than it ever was in Mach 4. We have not had a single communication or software problem since the system was finalized at the beginning of April. It is running on a small fanless PC with an Intel J6426 quad core.
I am particularly happy with greater gcode macro flexibility of LinuxCNC. You can do just about anything directly in gcode. If you do need to get more advanced, you can also use python. I have yet to find something that needed anything more that what I can do in a gcode subroutine.
The learning curve was pretty steep, especially when it comes to the first time setup of the PC to minimize latency and building the initial configuration. Thankfully there is a pretty active community forum that was quite helpful. The amount of existing add-on components and guidance is incredible. It feels so much more flexible and customizable than Mach 4. It took me about an hour to switch to using RS485 for full control of the spindle rather than analog 0-10v. It also means that I have access to individual error codes from the VFD inside LinuxCNC and can make automation based on them. I have added a front control panel with analog rapid, feed and spindle override controls. Our existing wireless and wired pendants both work great using pre-built configurations that I found.
There are a few controller options that are compatible with LinuxCNC. I picked a Mesa card for my machine. Because of the chip shortage, the only available option at the time was the 7I96S. It is a perfectly good card but required me to pull out the CRP850 break out board. This does not help with that wiring mess in the picture. Since then, more options have become available such as the 7I92TH which is a dual port IDC 26 pin header card. When I saw this I had the idea to try and see if I could make it work as a direct swap for the ESS.
It turned out to not be as simple as just plugging it in and configuring the pins in LinuxCNC but I did get it to work. It required a custom firmware (Mesa cards run on HostMot2 firmware which is thankfully open source) and a couple custom ribbon cables. It really cleans up that wiring mess. Here is a picture of it on top of the CRP850 with a 3D printed bracket:
I did decide to build a pretty close to plug and play kit from what I learned. It was a lot of work to start from scratch and I would have loved a kit that was mostly figured out already. From what I can see, Avid doesn’t want commercial sales happening on this forum. The stuff I put in my Tindie store is really just a hobby for me and not intended to be a full business but I wont link to it directly here. You will have to find it yourself if you are interested. You don’t need the kit to do what I did, it just helps you skip a bunch of work.
If anyone is considering building a new machine with LinuxCNC or upgrading one that is running on Mach 4, I highly recommend it.
Some beauty shots of the 4th axis work we did:
There was a bunch of hand work done after the parts came off the machine (mostly sanding) but 95% or so was all on the machine. This included all the mortise and tenon joints.