If you look at the G540 typical hook up you will see a relay coil wired from P5 (output) and the external 12v both are referenced to p12 (GND).
Connecting the G540 GND to the VFD (DCM) GND allows the 2n7002 fet in the G540 to sink the VFD input to common (GND).
Basically the VFD input supply has been substituted for the external supply shown in the G540 instructions.
The +24v positive from the VFD to G540 is not required for this to work, just FOR and DCM (COM) as per DWG..
The analogue connection from the G540 to VFD has its own separate supply from 10v (VR), V1 (in) and ACM (com)
The method I show has no reference to the analogue, which is not changed, it refers to the start command input only by substituting the relay..
Al.