Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: budman68 on May 16, 2010, 09:11:54 AM

Title: PWM Mach Settings
Post by: budman68 on May 16, 2010, 09:11:54 AM
Hi all,

Ok, I have my little Taig CNC Lathe torn apart, and I'm ready to fire up my MC60 treadmill controller with the Gecko G540. Now Peter Homann already helped me with the wiring (thank you Peter!) but I need to know exactly what changes to make for setting up Mach.

Just a bit of background info for you. I've already tried settings from a user on the "Zone" that worked when I benchtested this setup (although I don't think the speed is correct), HOWEVER, that was with a completely different G540 and treadmill controller, although they're the same exact units as what I have installed on my Lathe. It works perfectly on my benchtest setup, but for some reason, it's not working on my actual Lathe setup. Basically as you can see by the diagram below, the vfd connection from the G540 acts like the potentiometer. Peter gave me a great idea to install the switch to be able to manually control the speed, as a nice alternative.

Keep in mind, the PC is fine as this is what I use to run my Taig Mill and my Taig Lathe, every day, with no issues.

I'm thinking I should ask you guys before I go screwing something up as I've tried to understand what each setting means but I'm at a loss as to what is actually controlloing what. I'm actually wondering if the G540 VFD control may not be working on my Lathe controller but unfortunately I'm not that bright to know for sure,  ;)  I may just take the G540 from the bench test and try that one to completely rule that out, but then everything would have to be completely ripped apart for that.

Here's a diagram of what I have at this point for wiring (it's a bitmap so it will take a bit to download):

(http://p46oyg.bay.livefilestore.com/y1p26BBPHq7jJJcsic35VyHInWMcbkDcUiq0iRz_l3RqcNuFFbxqOjUzq83aKGm4nWkAccDWxUhutsL5EBjBpTaC8ruW-x20apg/GeckotoMC60Dia%20(Medium).bmp)

Now while I'm sure changes would need to be made to get my motor running at the correct speed, here are the screen shots that I followed:

(http://p46oyg.bay.livefilestore.com/y1paEwXcprFLabdSMOkMXpNPAS031Ot3kijisJPg7euZU7RP2DktT7BsnVHTD5mv2FA-qg41sLX1FKOeY0CUO7gAueH29M-e4Nq/Uotput20signals.JPG)

(http://p46oyg.bay.livefilestore.com/y1pUbkMcwDPoNku92rM79HCcF1q66yzXdqFyzXl8MbU_tvch3a4XogFO26u61IsX3k6AZ8Z62ecWrJjP2WXp9fiKcYREvz1tUJM/motor20outputs.JPG)

(http://p46oyg.bay.livefilestore.com/y1pRzkzWvlwyCVLeiHRqH5kzdCopbIKt3hocWKqMSsepq0jleB1dL-7xdf-Ye6qF2O3Wmx0wSYwMdhd61JvThiWRTgSUnOFju3B/pulley20set20up.JPG)

(http://p46oyg.bay.livefilestore.com/y1pu4_AMdwGblPNvIqXGEzj6NLF2jj_9kfuRoC_rxTbmqNnavabX5V0DE2lQaUlMYKalzg2LHab3LInVyFmv721xPeOgK9JQEAZ/spindle20motor20tuning.JPG)

(http://p46oyg.bay.livefilestore.com/y1pXwk7UrSpB8AoLPKirPSPyVdWSlkrHiOCWwc7HgpTNQ521yj8pCe47QndnX3SceZDRzDF14xzdnwoSfUsPOQTMascktzYPr-r/spindle%20setup.JPG)

Thanks as always,
Dave
Title: Re: PWM Mach Settings
Post by: Jeff_Birt on May 16, 2010, 09:25:41 AM
Are you using your SS on the lathe? If so you'll need to set it to PWM spindle mode in the SS config screen.
Title: Re: PWM Mach Settings
Post by: budman68 on May 16, 2010, 09:27:35 AM
Hi Jeff,

No sir, no SS, just the typical Parallel port-

Thanks,
Dave
Title: Re: PWM Mach Settings
Post by: Tweakie.CNC on May 16, 2010, 11:20:18 AM
Hi Dave,

If you have the benefit of an oscilloscope you could hook it up to your LPT pin 14 and observe the changing square wave PWM signal as you adjust the spindle speed slider within Mach (don't forget - you need to have a GCode loaded which issues the M3 command !!).
Then observe the 0 - 10 Volt signal at the Gecko pin 8.
If both the above are present then its your wiring (assuming nothing is broke).

Tweakie.
Title: Re: PWM Mach Settings
Post by: Jeff_Birt on May 16, 2010, 11:46:06 AM
Good point Tweakie, you have to tell Mach to do something before you can test for it. You can also just issue a commanded spindle speed, say S1500, and them an MS by the MDI line...
Title: Re: PWM Mach Settings
Post by: budman68 on May 16, 2010, 11:48:28 AM
Hi Tweakie, thanks for the info, but no scope here.
As for the spindle, when benchtesting it, I turned the spindle on (Mach screen Spindle Button) and it worked perfectly, once I inserted a speed into the Speed DRO ;)

So the screenshots of Mach look correct to everyone?

Thanks guys-
Dave
Title: Re: PWM Mach Settings
Post by: Tweakie.CNC on May 16, 2010, 12:03:27 PM
Mach screenshots look OK to me, at least that is exactly what I would do. (have you tried minor tweaking like changing the PWM base to 100 etc.?)

Tweakie.
Title: Re: PWM Mach Settings
Post by: budman68 on May 16, 2010, 12:26:53 PM
I have not as of yet as that was part of my original question. I have no idea what half the settings mean. I've looked at the manual but not much help to me. I didn't want to go randomly switching things around as not to screw something up on my main machine PC. I thought maybe there would be an obvious setting to change but I can't see it.

Thanks,
Dave
Title: Re: PWM Mach Settings
Post by: Tweakie.CNC on May 16, 2010, 12:55:12 PM
Hi Dave,

I didn't get reliable results here (just a bench test) with a base frequency of 50 but at 100 I was able to change the mark/space ratio of the PWM signal from around 1% to 99% with the spindle speed slider.

Tweakie.
Title: Re: PWM Mach Settings
Post by: budman68 on May 16, 2010, 12:57:35 PM
Interesting, that's a start, but just as a note, it did work with that setting on the bench so I'd be curious to know what/why that is.

I certainly do appreciate your time and will have a look when I get into the shop tomorrow-  :)

Dave
Title: Re: PWM Mach Settings
Post by: Jeff_Birt on May 16, 2010, 02:09:35 PM
As I understand it the PWM input on the G540 is optimized for 50 Hz. After reading through this thread again I guess I'm not sure what is not working right. Can you descibe the problems) you are seeing Dave?
Title: Re: PWM Mach Settings
Post by: budman68 on May 16, 2010, 02:18:01 PM
Absolutely Jeff,

What I'm not seeing is any movement at all on the Machine PC. On my bench test, I have 3000 typed into the "speed" DRO in Mach 3 so when I hit the "spindle" button, it's starts up and increases until it hits the 3000 RPM as shown in the Speed DRO. I can increase it or decrease it with the Speed overide arrows perfectly.

When I connect this the same exact way on my main machine PC, I get no movement at all. Now keep in mind as I mentioned in my first post, the benchtest G540 is working perfectly, the Taig Lathe G540 which connected to my main machine PC is the one that shows no movement.

Thanks,
Dave

Title: Re: PWM Mach Settings
Post by: Jeff_Birt on May 16, 2010, 03:05:17 PM
Have you tried entering S3000 into the MDI line first? I'm not sure if doing that and entering it in the speed DRO do the same thing (they 'should') but it woudl be worth trying. Can you use a volt meter and measure the voltage at the VFD output pin on the G540?
Title: Re: PWM Mach Settings
Post by: budman68 on May 16, 2010, 04:08:49 PM
Ok, tried the S3000 and nothing either so I decided to try a bit of troubleshooting some more here. I have a feeling my G540 may have some issues after checking the VFD outputs but I'll see what you all think.

When the spindle was off, the pins checked as:

7+8 =35 mV
8+9 =38 mV
7+9 =0 mV

Spindle on at 3000 RPM:

NO Change at all.  :-\

So I think I'll switch out the G540 with the one that I bench tested (that worked) and see what the result is from that.

I hate troubleshooting.....  :(  ;D

Thanks again-
Dave
Title: Re: PWM Mach Settings
Post by: budman68 on May 16, 2010, 04:33:50 PM
Of course, I was getting ready to pull the benchtest G540 apart, and decided to test the pins on that but that reads basically the same way with no change whether the spindle is on or off, so I don't have a clue.

What pins and voltages should I be checking and looking for?

Thanks,
Dave
Title: Re: PWM Mach Settings
Post by: budman68 on May 16, 2010, 05:07:17 PM
Just to update with more info I thought of, the voltage measurements taken on the G540 were with the wires disconnected from the MC60 controller.

The MC60 controller does indeed have 11.9 Volts coming out of it (at the potentiometer connections) as it should, which according to Mariss and Peter, should be fine to use with the G540.

Dave
Title: Re: PWM Mach Settings
Post by: Jeff_Birt on May 16, 2010, 05:16:55 PM
You do need to have the speed controller hooked up before you will get any voltage output from the G540.
Title: Re: PWM Mach Settings
Post by: budman68 on May 16, 2010, 05:21:52 PM
Ok, then isn't that going to just show what the controller is putting out?

Which pins should I check for you? And which will be the positive probe? I just want to be sure to do this right to get the correct info for you.

Thanks, Jeff-
Dave
Title: Re: PWM Mach Settings
Post by: Jeff_Birt on May 16, 2010, 08:45:48 PM
The G540 'output' does not actually output its own signal! It only gives you back a percentage of what you put in on Pin 7 (-) and Pin 9 (+), the percentage is based on the PWM of course. The easiest place to measure is probably between the black and white wires on the speed control which correspond to pins 7&8 on the G540. You should see the voltage change in proportion of the spindle speed. It might also be a good idea to check across pins 7&9 to see what input voltage you have.
Title: Re: PWM Mach Settings
Post by: budman68 on May 16, 2010, 09:06:42 PM
Hi Jeff,

I completey realize that, and as mentioned above, the MC60 is putting out 11.9V into the G540. I will have a look at that again tomorrow for you and let you know what I find.

Thanks,
Dave
Title: Re: PWM Mach Settings
Post by: budman68 on May 17, 2010, 11:27:49 AM
Ok, did a benchtest on the Lathe G540 and it does indeed NOT work. I called Gecko and will be sending that back to have a look at.

Just for the curious:

Working G540 VFD with 3000 in the Speed DRO measures:

7+9 Pin = 11.7 V
7+8 Pin = Pulses 6 V -8 V
8+9 Pin = Pulses 4 v -6 V

NON Working G540 VFD with 3000 in the Speed DRO measures:

7+9 Pin = 11.8 V
7+8 Pin = 8 mV
8+9 Pin = 11.8 V

Hope this saves someone elses hair someday.....
Thanks,
Dave
Title: Re: PWM Mach Settings
Post by: Jeff_Birt on May 17, 2010, 12:20:29 PM
Don't you hate it when that happens? Glad you got it figured out...
Title: Re: PWM Mach Settings
Post by: budman68 on May 17, 2010, 12:30:55 PM
Indeed, the last thing in the world I would have thought of was the Gecko drive itself. These things are really nice but they have gone through quite a few changes since they first came out so I guess you'll have issues like this. I thought for sure it was me putting in some wrong setting somewhere... ::)

Should be interesting to hear what Mariss has to say about it when they have a look at it.

Dave
Title: Re: PWM Mach Settings
Post by: budman68 on May 19, 2010, 05:20:08 PM
Just wanted to update you all to let you know GeckoDrive has just emailed me to let me know my G540 motherboard needed an upgrade, which was replaced today and will be going out to me via Priority Mail.

I know some of you may say, "well it shouldn't have happened in the first place", but things happen, it's the service after the sale that makes a great company. Not to mention FAST  service!  8)

Dave
Title: Re: PWM Mach Settings
Post by: Jeff_Birt on May 19, 2010, 05:25:43 PM
Gald to hear you're all fixed up Dave. I agree about service (before and) after the sale being vitally important and Gecko is one company that does a great job of taking care of their customers.
Title: Re: PWM Mach Settings
Post by: budman68 on May 23, 2010, 05:11:34 PM
Another update, the 540 arrived yesterday, and I finished wiring everything back up, and she runs like a little champ.

Thanks to all once again-
Dave