The Geckodrive G540 has a optically isolated VFD output that can be configure to run spindle speed controllers on some popular import mills and lathes. The VFD utilizes a PWM control via pin 14 of the DB25 connection. You provide it the 0V reference and plus 10VDC of the speed control circuit, and the VFD out give you a 0 to 10VDC based on the duty cycle percentage of the pin 14 signal. The X2 mini mill for example does speed control with a 5K potentiometer. One side of the pot is reverence to 0V of the mini mill speed control 12V supply. The G540 uses a 16V op amp to drive the vfd, so you can use the 12V supply as the VFD supply input on the G540. Essentially the only modification needed is to remove the wiper connection of the Mini Mill potentiometer to the Mini Mill control pcb. This is done at the connection to the Mini Mill controller pcb. A word of caution, the G540 while very rugged in design you can fault the VFD output if you don't know what you are doing. There is no protection scheme on the VFD output, if you short that output to either GND or a supply voltage the VFD output op amp will fail !!!!
Later models have a switch on the potentiometer that must be closed before the speed control setting can be made. For simple remote control, it isn't necessary to emulate that switch as the switch contacts simply latch the motor relay. Once latched, the switch has no circuit effect, so you can just leave the switch closed, it HAS to be closed for this mod to work. Below is the high level schematic of the mini mill wiring with the 3 wires that will be involved in the connection to the G540 VFD. I would suggest you confirm that your 12V and 0V wiring is as shown below before modifying:
Below is how the G540 is connected to the speed controller. On the mini mill you only need to remove the one wire from the potentiometer to P2 (blue wire as shown above), the other wires of the potentiometer can stay. Then add the three connections shown below...Mini Mill P1 to G540 Pin 9,Mini Mill P2 to G540 Pin 8, Mini Mill P3 to G540 Pin 7.
The above configuration is the simplest, but it eliminates using the potentiometer on the mini mill manually. You should start with the above configuration even if, you want to have the configuration shwon next.
If you want to maintain that capability to use the mini mill potentiometer then you can insert a spdt relay between the potentiometer wiper wire, the VFD output and control it via the G540 and an M3 command setup in MACH3:
G540 MACH3 XML File
Here is the MACH3 mill xml file with the G540 settings including the VFD setup which at this writing isn't in the file on the Geckodrive website. In you browser do a "save as" http://pminmo.com/misc/540BVFD.xml
The particulars of how MACH3 setup interfaces with the PWM circuit below, the Minimum PWM value can be adjusted based on your particular machine:
Make sure your pulley setup matches pulley selected, max and min speeds which correspond to your S___ spindle speed control values. For example if your spindle maximum speed is 3000 rpm, then S3000 will give you maximum pwm output only if the pulley setup values correspond.