Ive just got my CNC milling machine all working finally. Im just stuck on being able to control the speed of my spindle.

I have a UC400ETH motion controller from CNCdrive with the UCSB breakout board. Which does not output an analog signal which I require to send to my HY VFD. My VFD can accept 0-5V analog which from what I was reading I could put in an RC (Resistor & Capacitor) circuit to smooth the PWM output of my motion controller into a readable analog voltage for my VFD.
I have tested this with a 10k resistor and 5uF capacitor but with no luck.

If anyone has done this before with any success I would love some help if possible. Or any alternatives like PWM to Analog control boards.

Cheers,
Rohan