Part of the problem is tha linuxcnc expects the speed command in revs per sec and VFDMOD outputs RPM so you need to scale it.
Something like this.
Code:
# Spindle output speed
loadrt scale names=scale_to_rps
addf scale_to_rps servo-thread
setp scale_to_rps.gain 0.01666667
net spindle-rpm-out vfdmod.spindle.rpm-out => scale_to_rps.in
net spindle_rps_out scale_to_rps.out
net spindle_rps_out => spindle.0.speed-in
You also need to set the vfdmod SpindleRpmOut to spindle.0.speed-in
You might need another scale component or alter your vfdmod.ini