you could find the G540's VFD does not work correctly using the 5V from the motor control board
from the G540 manual :-
" ANALOG OUTPUT: This is a 0V to +10V opto-isolated analog output intended for use with VFD drives. VFD OUT goes
to 0VDC while the G540 is disabled. Connect VFD GND, VFD OUT and VFD +10V to the VFD drive inputs. Make sure the
VFD drive positive voltage does not exceed +12VDC. Do not short VFD OUT to any other terminal. Do not reverse
polarity to VFD GND and VFD +10V or the G540 may be damaged. "
I would use an isolated 10V DC power supply just for for the G540 VFD
then use two resistors to drop the G540 VFD 0 to 10V output down to 0 to 5V for the motor control
only the motor control's potentiometer control voltage output needs to be disconnected
John