Simon, your Spindle Forward and Reverse have to be used on the lower Outputs of 1-6 (yes you have to select this under the ports and pins, you will have to assign your M3 and M4 to an output# unique to each. When your G Code Runs, and lets say puts out an M3, and that turns on OUTPUT3 for instance.
Output3 will be on the input side of Brians, Then you can terminate to you modbus. If using the output3 as an output, the your input can be a secondary, something else.
scott