Make sure the CY cable shielding is all earthed at just the driver end. Connect the earth wire from the VFD via the spindle wire to the spindle body/Z-axis. Also earth the machine frame.