The following is how I was able to get spindle speed control working on the G540 with a X3 mill. I put this together for other lost souls who like myself have found that a step by step how to for this does not exist!
Before you attempt please note: This involves making connections to high voltage and great care should be taken. You can blow up your controller or worse yourself... Under no circumstance should any of the following be attempted while the controller or the X3 is plugged in!!! If you have any reservations get someone who has experience to make these connections for you.
A few things first.
This mod is for "spindle speed" and "motor off and on" only, I do not have the spindle direction wired. Direction is still only manual control with the switch on the column.
Make sure you have the latest version of Mach3, there have been previous versions of Mach3 that had a bug with the PWM output for spindle speed. ( Yeah, that cost me a day )
After making these connections I developed an intermittent Emergency Stop problem. Mach3 said there was an E stop and shut everything down even though I didn't push the button. I am pretty sure this was noise being generated by all the extra wires hanging off of the G540. IE MachBlue Probe & spindle connections. I turned the noise de-bouncer setting on and set to "1" this seems to have fixed the problem, I have made 5-10 minute air cuts and 3-15 minute run projects and have not had the E Stop problem since.
This will use Output #1 of the G540(pin 13 of printer port)for motor off/on, and the VFD output(pin 17 of the printer port) of the G540. The VFD (output, +,-) on the G540 are optically isolated. This keeps the high voltage of the X3 motor control board from frying the G540.
I was not getting full range of speed after making this modification. I talked with Marius at Gecko Drive and he informed me that the G540 works best with the (+) and (-) of the motor controller board being at least 10vdc. My X3 was about 7.8vdc. At the top left of the Motor Control board of the X3 there is a small potentiometer. This adjusts the voltage gain of of the speed control. I connected my meter to P1 & P3 and slowly adjusted the pot until the meter read 10.5vdc. This gave me almost full speed control of my spindle again. This adjustment must be made with power on. BE VERY CAREFUL AND DO NOT TOUCH ANYTHING BUT THE INSULATED METER LEADS.
The safety lockout is still in effect with this modification. You must first turn on the ON switch then turn the spindle direction switch just like you did in manual mode before attempting to control the spindle from Mach3.
Link to the drawing PDF. http://tomanyhobbies.com/coppermine/...le_Control.pdf
In a couple days I will post screen dumps of Mach3 as I have it set up and know works. The Mill is at the office and I forgot to get the screens before I left for the weekend.
Jeff Davis