Hi all
Sorry to but in to this conversation, but I think I may have have the same problems. I my case, it was a ground voltage difference issue. I was getting a 2.3-3.2v difference in ground voltage between PC and drive board IO. It caused all sorts of these issues with random home switch triggers. I could not get an accurate home position for love nor money. It turns out that the optoisolator trigger voltage on my board was 2.4-2.5v, so as the ground voltage wavered, I was getting intermittent trigger signals for the home switches. The real problem turned out to be that I was running a switch mode power supply to the drive, which does not ref the main ground zero voltage. This allows it to run up to +/- 3.7v from supply ground, depending on supply frequency variations.
The simple answer to all of this is to run an optoisolated IO board. The optoisolation should generate the required 0-5v switching required for general logic transfer on both sides of the voltage difference.
I hope this helps.
Cheers
Matt