PDA

View Full Version : Mach3 spindle spin-up delay



Neale
22-11-2017, 11:42 AM
I've been trying to track down a problem for someone. It seems that on their machine, the spindle delay setting in mach3/config/etc was being ignored and the machine would start into the first cut before the spindle was up to speed. Researching this, I came across a feature that I hadn't seen before, and which seems to be working well on my own machine. Wouldn't it be nice if the spin-up delay could be spindle-speed sensitive, i.e. don't use a fixed delay but use a variable delay based on requested spindle speed? Of course, the ideal would be to use the "spindle up to speed" output from the VFD to pause Mach3, but that needs a bit more work...

Instead, try this replacement for the out-of-the-box M3 macro (m3.m1s).

---
DoSpinCW()
code "g4 P"&nFmt((2+5*(getrpm()/10000)),2)
---

This one uses parameters that work for me, but you can tune them to suit your own machine. The "nFmt" command generates a number in string format that is passed to the G4 "pause" command. The number is built from two parts. The first "2" is a fixed minimum delay. The "5" is the number of tenth-seconds per 1000RPM additional delay. With the numbers here, that means a delay of 7sec for 10000RPM, and a delay of 14sec for my spindle's max of 24KRPM. Not a big saving, but if you can do it, why not?

The original idea came from a post on a forum that said that they had found it in some Tormach code. Just trying to acknowledge my sources!

Ger21
22-11-2017, 02:41 PM
Thanks for this. I'm going to try this with UCCNC.