Not seeing what your problem is here.? It's perfectly clear to me that Both the Inputs and Outputs need there own voltage supply to keep them isolated which can be between 6 -36v.
Those blue lines are using the positive side of the 36v supply powering the device but not actually providing a path back to 0V so they won't work.

Like wise Outputs 0 & 1 are separate to rest of outputs and use the DCM from the VFD to provide path back to For/Rev on VFD. Outputs 2-7 require there own supply.
To Stop M3 or M4 then just use M5.
M6 isn't flood it's tool change command. M8 is flood M7 is mist but in reality they can be anything you want. M8 could turn kettle on and M7 Micro wave they are just commands to turn on/off the output you assign to each M code. M9 turns them both off.

Spindle is probably PWM so Motor tuning may not be required. You will probably need to play with pulley speeds to get exact voltage.