Hey Jose Alberto,
if the ModBus communication breaks down during spindle run, but is established back again when spindle is stopped, this sounds not like a ModBus configuration problem but rather like an EMI issue.
A VFD and especially its output cable, the cable to the three-phase spindle, are heavy sources of EMI. Therefore it is required to use shielded cables, also a VFD is intended to be installed into an earthed electrical cabinet. Both should be indicated in your VFD manual, including which wires to use, on a page that should look like shown here. As you can see there,
-
for the signal cables like used for ModBus communication, you should use shielded, twisted pair cable.
-
On the output of the VFD, i.e. the spindle cable, you should use shielded 3+PE for the three-phase spindle, like shown here:
Image 1: A typical spindle cable for use in a power chain (LAPP ÖLFLEX® CLASSIC FD 810 CY )
See this thread for more information.
Cables especially made for drag chains are e. g. LAPP ÖLFLEX® CLASSIC FD 810 CY or IGUS chainflex® .