The two relays in the standard AvidCNC control box are also standard mist and flood in the Mach4 setup. The first test cut after installation I got the machine mixed up in Fusion 360 and system brought the spindle up to speed, moved over the first cut and turned on the flood which was the drawbar.
To make a short story longer, the tool dropped out, drilled straight through the plywood and MDF spoilboard. When it hit the ISO30 holder it sat spinning. As it slowed down it started wobbling and carved a cone shape out of the bottom of the spoilboard.
I undid everything CNCDepot told me about wiring it up and wrote my own controller. Which eventually became the basis of my tool carousel.
The thing about Lua is it’s detached from the Mach4 core and thus is unreliable. You will find it’s a total mess when doing anything that needs to be synchronous with the rest of the machine.
I eventually resorted to implementing ModBus and setting the I/O as Mach4 inputs and output so I could force Mach4 to sync in that fashion.
That change to ModBus and then adding the two axis carousel was the key to making tool changes a lot less stressful
Also, two pressure sensors are really required. One check if the system has the pressure to make the tool change and the second to check if the drawbar has been released. Without both of those you will be ripping tool holder clamps off their posts whenever you forget the compressor power switch.
If you can only get one sensor, do the system level pressure because if it drops below 100PSI at any time you are breaking things. The drawbar sensor is a “nice to have” to add security but the system level is a must.
Thanks for the tips. I did add a single pressure sensor for the system. Never thought about two…
I have discovered that I can leave my air on “half way” and thus when the drawbar relay is engaged it can take a second longer to pressurize and the second drawbar pressure sensor can check that and not allow the machine to move until it has released.
I have also seen this on warm days with a lot of tool changes while using a muffler on that port. The outside condensation can freeze around the ports and cause even slower exhaust and that too can cause timing issues.
Down here in the Southeastern USA the humidity is terrible so I just took off the mufflers because of that. But it’s just one of many reasons I found I needed the second pressure sensor. You can command it but reality can be much different than you would expect.
It’s like the new sensor for the tool pocket I recently installed. It checks if there is a tool in that pocket before trying to make a second tool fit. Or grab a tool from an empty pocket. Sounds like a nice to have but I have had some close calls.
There is just so much that can go wrong in a ATC
Ya, like the bit that broke yesterday because after a job, Z did rise back to zero and the bit collided with a tool on the way home. So, my latest project is trying to figure out how to force Z to go to zero, then move to a specific safe location, or better yet return the tool to the pocket then go home. Just when I thought I was done getting it all to work so I can actually start making things. I’m looking in the Fusion 360 post processor.
At the end of the job, the last 3 lines:
G0 Z10 – So that apparently does a rapid Z to 12… Why would it pick 12 and not zero? I’m using metric and it was much further down than 12mm.
G53 G0 X0. Y0. – Machine coordinates move to that spot.
M30
Ya, I just want it to return the last tool used then go to X0 Y0.
Insert a tool change at the end or make a M-code that takes you there.
M-code sounds better since you can use some Lua to figure out the specifics.