Hello,
attached is my config for the Sinamics V20 VFD. With this config and hal file, you should be able to control the speed of the spindle, and get some feedback of actual speed, current and power.
One thing to note for mb2hal is that the ini file has 32 character lines. If you use the /dev/serial/by-id/* path for your serial converter, the path will most likely be truncated and you will fail to communicate. This took me quite some time to figure out.
Note also that when you close linuxcnc, the drive's watchdog, not seeing any more modbus messages, will put the VFD in error state. Currently you have to clear the error state manually on the VFD pannel before restarting linuxcnc. I am looking into a solution using modbus "Fault acknowledge" (40007), but I cannot work with the machine currently.
Please ask questions and PM me if I do not answer
Cheers!