I am working on a PLC based system that uses High Speed counter cards to pick up a signal from a 24 VDC proximity switch. I am having a problem with short duration 10 to 15 volt spikes being seen on the counter card as a false proximity switch hit. I can see these spikes on an oscilloscope.
I rewired as many of these signals in shielded cable as possible but these errant spikes persist.
The proximity switches I am using are PNP and rated to pass 200 ma. I am considering using a bleed resistor from the proximity switch signal to common to minimize these false spikes.
Any recommendations on how many milliamps/ resistor value I should be using? I have tried a 20K resistor to bleed about 1 ma to ground when the signal is in the low state but I don't know if I should be trying to bleed more current to common?