Does debounce come into use only if he is using a micro switch to detect instead of completing a circuit by shorting an input?
It does not make any difference to the debounce setting in general config, what method is used to change the active state of an input.
Index has its own separate debouce setting, but all other inputs EXCEPT probe, are grouped together under the debounce setting.
In older versions of Mach, probe was included in that group, but was removed about two years ago.
Greg
One of the things I really like about this group is the knowledge that is just out there waiting to be shared. Greg's comment set me off in a new direction to find out what was really happening with my touch plate hookup.
When I did my initial hookup of the touch plate, I had an intermittent problem where sometimes it worked, and for no apparent reason sometimes it would stop short of the touch plate. I tried everything I could to figure out what was causing the problem. I knew it was not the VB routine so it had to be more on the electromechanical side of things. At that time I noticed the debounce setting, and setting it to 5000 seemed to solve my problem. Notice I said SEEMED, but I remember even after doing that occasionally it would still fail, stopping short of the touch plate, but it seemed a lot less than it was.
Next I looked at the electronics. I was using pin 10 for the probe lead. It had a 10K pull up resistor to the +5 volt line. To assure a clean signal to the pin, I installed a .1mfd and 10mfd miniature capacitors between pin 10 and ground. From that time on I have not had even one time where the zero touch did not work exactly as expected.
So today armed with the fact that debounce had nothing to do with solving my problem I tried several other things to see what was REALLY happening. First, I set the debounce to 0 in both columns. Ran the touch probe routine about 20 times, worked perfect every time! Tried homing the mill and WOW, it stopped before getting to the home switches. Tried several times with the same results, always stopping in a different place, but not home every time. Setting the debounce to 2000 solved the problem, homed perfectly every time. My conclusion, there must be something being detected by the X, Y, and Z pins that was not a home switch closure.
Next, just to find out what would happen, I unsolder-ed one end of both the .1mfd and 10 mfd capacitors on pin 10. Immediately my Z touch routine failed just about every other time. Putting them back into the circuit again restored the touch plate operation, perfect every time!
Next I took a small service Oscilloscope to the shop. Looking at the X, Y, and Z pins in my controller I was really surprised to find a constant hash riding on the pin anytime I moved any axis. The "hash" was about one half the voltage level of the DC pull up voltage on the wire. For some reason the X axis seemed to be the worse. Every now and then there was a larger spike that looked like it was the same amplitude as the DC pull up voltage on the wire. It was a very narrow pules, but never the less it was there, I surmise that by setting the debounce time it was wide enough so that the pulses were not seen. So nothing was happening until it got to the home switch which provided a nice solid ground and stopped the mill.
Next I installed a .1mfd and 10mfd capacitor in the controller box at the X, Y, and Z port pins. Now looking at the pins with the scope, nice and clean, only a solid steady 5 volt DC line showing. I set the debounce to 0 again and the mill homed perfectly every time. Had my controller been provided with those noise suppressing capacitors I would not ever seen any false triggering on any of the axis at any time.
Yes, I am using shielded wire to all the devices and stepper motors. All shields are grounded at the controller end. I also have a nice heavy ground lead that is separately run between the mill frame and the controller power cord ground terminal, which is grounded to the power supply ground terminal.
Hopefully this will help someone else solve some of their intermittent problems. I guess that my controller is very susceptible to noise being generated within the electronics that drive the stepper motors. Probably some of the more expensive commercial systems do not have this problem. My controller is a very nice one that I built up from a kit and really has worked very well for over 2 years now. Adding the noise suppression capacitors on the port pins seems to have really settled my mill controller down.
George