I just wired up the index pin on Mach3 (using port 2 on a USB SmoothStepper), and it is not working correctly. I am on the right pin, as when disconnected the signal is just 0. When connected I get messy readings. I have scoped the pin, and it is giving a good square wave. I have looked on the diagnostics screen, and the index light does come on but very erratically. The reported spindle speed is all over the map. The signal is coming from the Z bit on an encoder, and I am extending it by 100 microseconds.

What could be wrong with the setup?

Do I need to extend the Z bit signal longer?
Do I need to tie the ground of the SmoothStepper to the ground of the encoder?
Other ideas?