Been in the shop for the afternoon, but managed to put together a diagram of how I think the wiring should look. A few qualifiers first; it's been a while since I've installed an IP-M or really even looked at one closely. That said, I have worked with all three CSMIO controllers, so they are relatively familiar to me (IP-A, IP-S and IP-M, as well as the I/O modules). I don't know much about your specific Gecko drives but have dealt with a couple of their products as well, so you'll have to adjust based on your model. I also don't know much about the spindle controller you are using, so you'll need to figure out what voltage the spindle enable signal needs to be. The only thing I have not shown is the Analog connections, but those are really quite straight forward once you have this part done.
On the Gecko drives, they have two different configurations (I believe). One is that you short the disable pin to one of the resistor pins (the last pin on the drive IIRC). The other is that you simply supply 5 volts to the disable pin, but in that case I believe that the common for the 5 volt signal is shared with the step/dir common back to the controller. The former is much easier to deal with than the latter. If you have the latter kind, I'd be very careful about how you supply 5 volts since you will need to share the common pin between what are essentially two different power supplies. I think this can be done, but I would not call it ideal. I think it was meant more for connecting to controllers that work on a 5v power supply, not a 24 volt power supply, which would make it easier to use an output to disable/enable the drive directly. I'm not sure if Outputs 4 and 5 share the same basic common internally as the Step/Dir system, so it's hard to say if you can simply use a resistor to drop the voltage and connect an output directly to the Geckos, but if this is possible, it may be the better method than using a relay. I would contact CS Labs regarding this specific situation if that's what you face. If you have the other version where you just short the disable pin to the resistor pin, you don't even need a power supply. In that case, you just eliminate the 5 volt power supply from my diagram and when the switch closes, the pins short at the drive. In other words, the resistor terminal on the gecko can be though of as the common, and it would connect to the relay where the power supply 5 volt is depicted connecting currently. The 5 volt line from the relay to the drive would not have 5 volts, and would simply connect the relay to the disable pin. Hope that makes sense as it's difficult to cover all scenarios in a single diagram and you'll have to visualize the differences.
For the sake of making the diagram clear (due to how it laid out), I made Output 4 operate the stepper enable relay and Output 5 operate the spindle relay. You could simply switch the connections at the CSMIO terminal block to change this, or configure the outputs differently in Mach 3 "ports and pins" settings. I additionally am not implying anything specific about the drives or the spindle controller, so you'll have to fill in the blanks. You could do the same as below using the outputs 0, 1, 2, or 3 as well, but for those outputs you would have to jump 24 volts from the controller power supply to pin 9 on the terminal block and the same power supply 0 volts (common) to pin 22. Once you have power to those outputs, I don't see any reason why they could not also be used for relays in this same manner.
CSMIO IP-M Relay Diagram by
mmoe5150, on Flickr