The connections you've made between the G540 and your VFD controls the speed of your spindle.
You will also need to have the connections between the G540 and your VFD to start and stop the spindle. You'll have to connect your VFD's FWD (Run Forward) and CMN (Common) to a relay that is in turned connected to OUTPUT1 or OUTPUT2 of the G540.
Once you've got the above setup, you then setup the Relay Control in Mach3, Config->Ports and Pins-> Spindle Setup to select OUTPUT1 or OUTPUT2 for your M3.