Some drives have a zero speed output that would probably be easiest. You could use the index pulse and a brain I think though but that would make things a good bit more complicated. Internally mach's dwell will be tied to the delay set in spindle config. So, I guess you could set the delay to 0 and then anything you want to wait for spindle stop confirmation you would have to be sure and set it up to watch the output from your brain instead of the dwell. Also, your brain would need to be able to sense signal change, not just on or off state of the index signal because you don't know if the spindle is going to stop in a position that makes the switch active or inactive. Then, you will only be able to guarantee the spindle is below a certain speed, not necessarily stopped unless you have a brake stopping the spindle rotation.
Brett