Mch controls spindle speed by two methods, one is step and direction - just like an axis.
The other is by Pulse Wave Modulation. In PWM, no direction information is given. The sole output is on the "Step" pin. This is in the form of a frequency output (which can be selected) of a 5 volt signal. This is then modulated (i.e. turned on and off) in proportion to the speed required. The result is a square wave signal which varies its ons and offs according to the speed. E.g. quarter speed - 25% on 75% off, half speed 50% on 50 % off. etc.
This resulting voltage can be read by a volt meter, but not very efficiently, and can be seen to vary as you increase the speed of the spindle. To convert this into a voltage signal that can be read by an inverter, or control equipment, you need something like Digispeed, which converts the PWM signal into a varying voltage signal (0 - 10 volts) which controls your inverter.
Direction (on my machine) which has an Omron inverter is still controlled by M3 or M4 output. The outputs to these signals are on two seperate wires on the output set 1,14,16 or 17 (or actually I use pins 8,9 because I don't have fourth axis) with the PWM coming out on pin 17.