Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: ppickard on February 16, 2013, 10:27:32 AM

Title: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 16, 2013, 10:27:32 AM
Hi,

I have a Dyna 2400 that I converted using this:

http://www.soigeneris.com/stdr_4c-details.aspx

So I have Smoothstepper and a G540.

I also used this spindle speed control:
http://www.kb-controls.com/KBWS-15-9491-DC-Drives-Chassis-KBWS-15-9491.htm

I have a switch to go from program to manual. THe motor runs fine in the manual mode but I can not get Mach to turn it on.

I hear a relay click when Mach tries to turn it on but nothing happens.

I get "PWM bumped to minimum setting" in the status line.

Jeff at Soigeneris has been helping me for literally nearly 2 years and has been very patient. I have tried multiple xml files from him but nothing works.

Can anyone tell me EXACTLY how to set up all the various config/ports/pins?

Any help would be GREATLY appreciated!

Paul
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 16, 2013, 12:27:14 PM
Further info...the drive is getting power all the time regardless of calling for spindle to run in Mach.
Is that right?
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Machinehead57 on February 17, 2013, 01:52:05 AM
Your saying the drive gets power all the time do you mean the motor or driver board. I couldn't find any documentation on this board but it is a PWM out put.
It should have 120vac connected a 0 to 10v or 0 to 5v input from Mach which will have to be configured in Mach to the pins you have it connected to. You will have to enable spindle control in ports and pins and set it up for PWM control which ever the board requires.
I know I can tell you whats wrong but I need a bit more info.
A copy of your xml file a diagram of the connections of the drive board and what is presently connected to the board.
Be careful motors run on smoke! if you let this smoke out they won't run anymore.

Steve
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: DICKEYBIRD on February 17, 2013, 09:38:44 AM
I'm using a KBIC-120 speed control on my lathe which receives mains power all the time when the machine is on.  The spindle "on" command from Mach opens a NC relay on my B.O.B. wired in series with the I1/I2 inhibit terminals on the KB.  Open circuit = spindle motor on, closed circuit = motor off.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Machinehead57 on February 17, 2013, 10:19:33 AM
OK from what I found on this board it doesn't accept the 0 10v input for speed control it has its own pot input. This means Mach won't be able to control speed but with a relay for inhibit it will turn it on and off. The spindle control will have to be set up as relay control not PWM.

Steve
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 17, 2013, 10:34:26 AM
My current xml is attached.

Steve...that is interesting about his board. I need to look at this closer.
If it is not obvious, my "skills" at electronics are sorely lacking!

Paul
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: DICKEYBIRD on February 17, 2013, 12:14:01 PM
Mach should be able to control this board with your stuff I think.  The KB manual says:

"Voltage Following Connection – A 0 - 5 Volt DC analog signal voltage can also be used to control motor speed. See Figure 6, on page 14. Connect the analog signal voltage to P2 (signal) and P1 (-) terminals.  Adjustment of the MIN trimpot may be necessary to achieve a 0 Volt DC output with a 0 Volt DC input.

Note: The input signal can be non-isolated or earth grounded since the KBWS has built-in signal isolation."

Link: http://www.kbelectronics.com/manuals/kbws_manual.pdf

Is the 540 0-10v analog out adjustable?  I'm definitely no electrical wizard but I'm thinking you can get it to work with what you have.  If it's not adjustable, surely there's a simple circuit to do the trick.  If not, the KBSI-240D Signal Isolator would allow a greater range of adjustments.  I've picked up 2 on ebay for $30.00 each plus shipping.  http://www.kbelectronics.com/manuals/kbsi_240d_manual.pdf

Maybe someone else with more knowledge can comment.  I got mine working great...some how. :o
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 17, 2013, 01:56:28 PM
Is there a way to test if the terminals for the VFD on the G540 are working?

If so how would I do it?

On my STDR4 (from Soigeneris) those are brought up to a 9 pin connector.

I have never seen any measurable V on these pins and am thinking that maybe the G540 VFD outputs are fried.

Thanks,

Paul
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Machinehead57 on February 17, 2013, 06:10:53 PM
OK the manual shows a 0 to 5v input for pwm speed control on your spindle board. The Gecko has a o to 10v output which is to high. You should be able to pull the speed control signal from your b.o.b once configured in Mach and you identify the pins to be used but maybe not. The b.o.b should be opti coupled and the speed control board is. If this is the case you will need to pull the signal from before the breakout board to the coupled input of the speed controller.
Connecting a opti coupled output to an opti coupled input won't work. The connection between the 2 won't have any power to run on.
You might be able to get it from the smooth stepper but I will have to look at it to be sure.
A 0tu 5v or 0 to 10v signal should be just that as long as its not downstream of an opti coupler.

Steve
PS now I know the parts involved I will put together a diagram and post it as soon as I can.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Jeff_Birt on February 18, 2013, 08:49:41 AM
The G540 VFD output does not really 'output' anything on its own. It takes a voltage source you provide and gives you back a signal that is proportional to the current speed being asked for. For if you apply 10V to the VFD 'input' terminals and ask for a spindle speed that is 1/2 of the maximum range (i.e. the PWM will be at 50% duty cycle), you will get 5V out on the VFD 'output' pin (50% of the voltage you input.) If your input voltage is 5V then you will get back 50% of that.

There are two separate issues here. One is that the STDR-4C has an internal relay that controls the 'Spindle' outlet. When Mach3 says to turn the spindle on this relay is triggered and you have 120V AC on the spindle outlet. In the profile Paul posted there were a few things amiss, the spindle relay active low state was backwards and the pulley range(s) may not have been correct for his machine. I corrected this and sent him a copy.

Paul, let's divide this problem in half. First thing to check is to copy the XML I sent into your Mach3 directory and start up Mach with it. When you hit F5 (or type M3 in the MDI line) you should hear a click, that will be the spindle relay turning on. Pres F5 again and the relay will turn off. If that happens we know the spindle relay is fine. Now get a voltmeter set to measure 120VAC, press F5 to turn on the spindle relay and measure the output of the 'Spindle' connector on the back panel of the STDR-4C. Do you have 120VAC present? Press F5 to turn the relay off, did the 120VAC go away?

One we know that part of things are working we'll leave those settings alone and move on to the VFD output.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Machinehead57 on February 18, 2013, 10:47:06 AM
He said he heard the relay click when he switched to spindle control. The PWM speed control needs a 0 to 5v analog input to run, it should have this 5v between P1 and P2 . A jumper across these should run spindle at full speed. The manual for the G540 states its a 0 to 10v analog output so there should be an output there. At this point though check it step by step to make sure everything is working. I would try the speed control pot on it to get everything working up to that point.
You will still have to make sure Mach is configured properly to send these signals.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Jeff_Birt on February 18, 2013, 11:14:04 AM
The G540 VFD 'output' is not a voltage source, it does not output any voltage on its own. It works just as I described.

I am the guy who builds the STDR-4C control Paul has. The profile he posted here had a few things set wrong so I fixed it and emailed it to him yesterday. I'm still waiting to hear back to see if the spindle relay is now working properly.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 18, 2013, 11:35:50 AM
I'm working on it...I have to put all the stuff back together, I took it apart yesterday, so need to hook all the cables back up.
Thanks for your continued support Jeff.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Jeff_Birt on February 18, 2013, 02:13:37 PM
Paul, I just responded here as the information about the G540 putting out 10V was in error. A lot of folks make that mistake when reading the G540 manual and I did not want it confusing the matter. Just let me know how it works out. We'll get it working for you :)
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Machinehead57 on February 20, 2013, 11:31:35 PM
OK now we are getting somewhere. If the data sheets supplied with these devices are incorrect it makes it hard to put one together.
The spindle board has its own 5v source to feed through the G540 or breakout board through an opti coupler. You won't read anything far as an output on the G540 it will adjust the 5v according to the speed setting. This varied 5v back into the spindle board will tell the board what to run the spindle at.
The maximum voltage you can regulate with the G540 at the VFD pins is 12 v according to the manual which would be about right.
As I said before try hooking everything up as described, if you get no speed control try putting the manual pot adjuster on it. If it works then everything is good except the communication between Mach and the spindle board. The problem will be in the G540 vfd control circut or the Mach configuration. The setup for PWM of spindle in Mach is a little tricky to do.

Good luck and keep us posted
Steve
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Jeff_Birt on February 21, 2013, 08:29:22 PM
The G540 is not wrong concerning the VFD output. It is just easy to misunderstand what it means.

Quote
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.

A VFD will generally provide a 10V supply for the purpose a 'remote' control such as the G540 provides. If your not familiar with VFDs though it can be a bit confusing as to what the G540 VFD output does.

After talking with Paul on the phone the other night we discovered a few things.

1) The Mach profile he was using was corrupt. This happens every once in a while and it is hard to diagnose. In this case Mach would not turn output 2, there may have been other issues but this one stuck out. I sent him another copy of the Dyna 2400/G540 profile and output 2 was now working.

2) Output 1 (spindle relay) was showing it was on in Mach 3 but the relay was not physically turning on. This turned out to be a loose connection to the relay coil.

3) There was no output from the VFD output of the G540. This problem is still open, it looks like it might be a wiring error between the spindle controller and the STDR-4C, a friend is going to help him double check the wiring. It could also be in the G540 or wiring between the rear panel of the controller and the G540.

Problems like this can be tough to troubleshoot as there are multiple little things adding up to make for a big confusing mess. The trick is to break the big problem into small bits. For example the first thing we checked was that the Ports&Pins and spindle setting looked right. Then we checked to see of the outputs actually triggered the relays. This is how the problem with the corrupt profile was found. With a fresh new profile the relay on Output 2 worked but Output 1, the spindle relay did not. It showed in Mach as though it was being triggered so this indicated a possible wiring issue.

As someone one told me, the best way to eat an elephant is one bite at a time. The same goes for troubleshooting a complex problem, break it down into bite sized pieces and take care of them one at a time.



Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Machinehead57 on February 21, 2013, 09:08:28 PM
Yeah thats true it doesn't actually output but is a control output. The opti-isolator is also polar. It won't work wired with wrong polarity.
I have built many manufacturing machine with elephant controls in them but when looked at one circut at a time you can find your way around and fix them.
The opti isolator can be checked with a diode tester I'm sure, it is actually a transistor switch that controls a source voltage back to the PWM board.

Steve
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 22, 2013, 09:37:59 AM
Update:

With LOTS of help from Jeff I have made some progress, but it is still not working.

I THINK all of Mach settings are correct, but I am open to ideas!

What happens now is when I call for a spindle speed in Mach the spindle will turn on for maybe 1 or 2 seconds, then turns off.
We can measure voltage on the VFD of 5V when it turns on, then it rapidly drops off to zero.
It still works fine in manual mode, but only if you call for a spindle speed in mach and turn the relay on.

Any thoughts?

Jeff:I misspoke in my private email to you, one wire to the manual/program switch was wired wrong, we fixed that.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Jeff_Birt on February 22, 2013, 10:26:45 AM
The next thing to do is check the VFD output right at the G540, pull the back panel of the control box down again, and disconnect the three wires going to the VFD terminals.

Get a hold of a 9V battery with the connector/leads. The 9V+ (red wire) goes to Pin 9 on the G540 and the 9V- (black wire) to pin 7, measure voltage output on between terminals 7 and 8. When you issue a S5000, then M3. The spindle relay should click and you should have about 2.5V measured on the meter.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 22, 2013, 02:15:06 PM
OK, made the test. I used an old 9 pin connector and plugged it in to the VFD out with alligators to my meter rather than opening up the case again.

Spindle relay clicks but 0 volts are shown between 7 and 8.  9V is read between 8 and 9.

So is it the G540?

Paul
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Jeff_Birt on February 22, 2013, 02:35:45 PM
Please try it right at the G540, this eliminates any problems with the wiring between the G540 and rear panel. Granted there are only three wires but it is good to eliminate everything that can be eliminated.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 22, 2013, 03:33:49 PM
How do you remove the wires from the G540 connectors?
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Jeff_Birt on February 22, 2013, 04:13:00 PM
You just need a small flat blade screw driver.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 22, 2013, 04:16:50 PM
OK, redid the test. I didn't know you had to pop the connector off the board ;)

Same result, relay clicks, entered speed, clicked DRO button(also did with s5000, m3 in MDI) 0 volts shown.
Hard to capture it as it happened but you can see the setup

Thanks,

Paul





Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 22, 2013, 04:20:55 PM
Note: you will no doubt notice the meter says "O AC"
This meter does not have a dedicated DC setting, it auto detects when it is set to a a AC/DC setting, the default display is AC unless DC is detected, then it changes to DC.

I tested it on the battery just to be sure. Also it has been reading the 5V DC on the VFD

Just want to avoid confusion.
:)
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Jeff_Birt on February 22, 2013, 04:36:01 PM
What is the other probe on your meter hooked to? I can only see one probe from your meter which is hooked to an orange wire.
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 22, 2013, 04:41:40 PM
I could not get the whole setup in the picture, I needed another hand

One meter probe hooked to a wire on terminal position 8 on the G540
Other probe to a wire from terminal position 7 on the G540

Correct?
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on February 22, 2013, 04:56:29 PM
Hooked up like this.

Paul
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Jeff_Birt on February 22, 2013, 05:09:30 PM
The only two things I can think of are that the PWM signal is not getting to the G540 (problem with ribbon cable from SmoothStepper) or the PWM circuit on the G540 is not working. If you want to send me the G540 I'll test it out here to see what the problem is.

Thanks for clarifying the meter connections. I hesitated to ask as I figured it was done correctly but someone reading this later on trying to troubleshoot a similar problem might not realize both meter probes need to be connected.
Title: UPDATE Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on April 08, 2013, 09:24:35 AM
OK, it seems like I am close but not there yet!

Working with Jeff I sent him my G540 and he tested it and found that there were some settings in spindle motor tuning that were wrong with the combination of the G540 and Smoothstepper.

THe correct settings are:

set the steps/unit = 1000

set the velocity = 60

set the acceleration = 1000

With this my spindle does now run, but not correctly.
First I have lost the ability to run it in local, manual mode. Not sure why nothing has changed from my older setup, where it would ONLY run that way.
Mach now does turn on the spindle but it will only run very slowly, maybe 100 rpm or less.
I have spindle pulleys set up with min being zero and max 10,000(the max speed for the Dyna)

Here is one odd behavior I don't understand, and I have seen this from the get go:

I enter a spindle speed, say 1000, and click the LED, or hit F5 and the field where the speed is entered will count down from that speed to zero, rapidly, like in 1/10th of a second.
Is this how its supposed to perform?

Any other ideas would be appreciated.

I have also contacted Jeff in a private email about this as well.

THanks all,

Paul
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: Marty_Escarcega on August 26, 2014, 07:41:28 AM
I would like to know where this problem ended up. Did it get resolved and if so how?
Jeff, you were doing a marvelous job of walking him through it. But for the benefit of the rest of the community, it would be good to see how these problems were resolved so the rest of us can learn from it.

I am having a similar problem. I did learn enough from this thread to test my G540 with a battery and check the resulting output in order to see if Mach3/G540 is functioning as designed.

Marty
Title: Re: Can't get spindle to turn on, for 2 years!
Post by: ppickard on August 26, 2014, 04:25:21 PM
So, this is where I am with it....the spindle will not turn on when the program starts, but if I start the program, then switch my speed control to manual and start the spindle, then switch it back to program mode the spindle will then turn on with the program for that particular program. Kind of a pain but I gave up working on this...I just deal with it now. Note it does shut off at the end...

Paul