If you just want to check that it works you can enter a line after the loadusr of the hy_vfd component
if you named it "vfd" in the loadusr line
A better way is finally to connect it to perhaps motion.enabled
There is a signal motion.spindle-on that starts the spindle, but I think it is better to have the communication already going. It doesn't hurt to have the ocmmunication going all the time as far as I can see.
If the vfd is not communicating properly, you will get tons of errors, like crc warnings or timeouts. You can't miss it.
A first test to check the comms is easily done outside linuxcnc (don't start it) with these lines
Code:
halcmd loadusr -Wn spindle-vfd hy_vfd -n spindle-vfd -t 1 -d /dev/ttyUSB0 -p none -r 38400 -s 1
halcmd setp spindle-vfd.enable 1
halcmd show pin
You should see a TRUE on the hycomm_ok pin, then all is good. Use the actual parameters for your setup in the loadusr line