By this I mean when you get a "limit switch triggered" message and everything stops, but no limit switches have been physically triggered.
I've been playing with this for some months now, applying the scientific method.
I tried all the usual scenarios, from really cheap and crap single core conductor with crimped spade terminals wiring all the limit switches in series, right up to grounded high quality shielded cable soldered on to the limit switches.
In between I have played with all the debounce settings too, even setting them as high as 20,000.
I have even played with all the possible earthing methods between machine tool, computer, parallel port breakout card, you name it.
To be sure, ALL these variables had some effect, as indeed did other devices on the same mains circuit switching in and out, and indeed the various routings and separations of various cables.
However, attach an oscilloscope to the limit switch circuit and suddenly things become clearer, especially when you set things back to the bad scenarios rather than the "that seems to be working fine now" scenarios.
Sit there with your eyes glued to the scope screen and every single phantom limit switch event is mirrored by a spike in the noise shown on the oscilloscope waveform.
N.B. I have not been able to determine from mere observation where this noise is coming from, for all I know it could be the neighbours mobile phone or the workshop computer wireless network card, there was no obvious trigger such as "there goes the compressor" or "I just started the lathe motor inverter."
I think that all this investigative work is important, other wise you have "cures" that work for me, but not for you, e.g. raising debounce to 3,000, because all these cures are in effect lucky guesses that mask the problem, rather than curing it. I wasn't content with fixing it for me, I wanted to fix it for everyone, including me on my next machine, or after I move this one, or after I add another tool to the workshop, etc etc.
The definitive cure is to purchase a single 0.1 uF (micro-farad) polyester capacitor (electrolytics are no good as they have +ve and -ve preferences) and attach it across the two limit switch wires close to where they join the parallel port breakout board.
Here in the UK you can buy them individually from Maplins for 13p each.
I would not go any smaller than 0.1 uF initially, nor would I go bigger, too big will dump too much current when the limit switches actually close, but you could buy three or four 0.1 uF and parallel them up one by one to test if required.
Instantly I had to increase the gain on the oscilloscope by 10x to see the same noise spikes, and even then they were significantly reduced and much more rounded with shallower slopes.
As far as curing the phantom limit switch problem goes I was able to set everything back to "worst" case scenarios with minimal debounce and the phantom limit switch problem appears to have been totally eliminated.
Given that this is a potential cure that costs the price of a cigarette, is easy to test (just clip the cap across the wires with two croc clip test leads) and doesn't require altering anything else, I would suggest you try it out as a FIRST resort rather than last, if you have phantom limit switch issues.
HTH etc