I’m trying to find the uncompiled code for SpindleWarmup that comes with the Mach 4 Avid profile. I want to modify it for my specific spindle to turn on the air before hand, and turn it off when done.
Is that located anywhere? Otherwise I have to write my own in Lua.
You can ask AVID for it, but I would expect they won’t give it to you. They don’t provide any of the source code for thier modules as far as I know.
However, for what you want to do, you should be able to edit the code in the screen for the button to enable the warmup so that it turns on the air before calling the warmup routine, and then turns it off after. I see its a coroutine, so you might have to put a timer on the last part to turn off the air since I’m not sure if it will wait for the routine to be done before returning to the button code…I’m not a SW guy so I don’t know much about how the coroutines work in Lua.
AvidCNC is only licensed to use the compiled version and they actually do not have the source for a lot of that stuff.
AvidCNC’s Mach4 install is the bare minimum to get up and running. It is NOT a negative statement against AvidCNC, they never intended it to be everything to everyone. It’s more a starting place to set you off on the right track.
Ah, of course! I actually would be interested in a programmer job with Avid…I just need to learn a little more about Mach 4. So far, I added some code to turn on some signals. One is for the ATC, and the other is for turning on air pressure and the spindle fan when M3 starts. Lua has been pretty easy to program with.
I have broken a lot of very expensive equipment so yes, very scary. Mach4 is not on the same level as LinuxCNC or other commercial motion planners.
I am hoping April will be the big month. To be fair to AvidCNC and to respect their forum, my progress is covered under build logs. It is looking like the dust manifold will be first and will be independent of the tool carousel. So if you want static posts it will be a minor install. I think I might even make it a state machine for those who don’t mind losing the top 12 inches off the work envelop. The last foot will trigger the dust manifold to open so you can do a tool change.