Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: BarryB on January 09, 2010, 08:46:39 PM

Title: Spindle no longer crashes Mach3, but doens't stay on...
Post by: BarryB on January 09, 2010, 08:46:39 PM
Hey folks, last week, I was going though heck trying to solve an issue where turning on the spindle would crash Mach3.  The solution ended up being to ground the spindle to the VFD itself.  It no longer crashes Mach3 which is cool.

There is a new issue that is more settings related, which I'm sure you Mach3 experts can help me out with.  When I do trigger it on, it starts to spin, but then immediately signals an E-stop.  You can reset, and it'll do the same thing.

I'm using a C23 card, SmoothStepper, Hitachi VFD, and HSD spindle.  The relay is connected to port 1, in a normally closed position on the C23 card.  The settings in Mach are set to that pin, and active low.  Once I tell Mach3 to turn on the spindle, it starts to spin, but immediately signals an estop.

If I set it to active high, the spindle will be on, and telling Mach3 to turn the spindle on, will turn it off.  It won't signal an estop in this position though.  The function though is reverse.  I have tried a normally open position, on the C23 card, but don't see a difference in behavior.

Any suggestions?

Barry
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: ostie01 on January 09, 2010, 09:35:52 PM
Are you using shielded cable, VFD generate a lot of noise that can be pick up by low voltage wire.

Jeff
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: BarryB on January 09, 2010, 10:14:40 PM
Yes, the cable is shielded.
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: HimyKabibble on January 09, 2010, 10:30:33 PM
There is nothing in the spindle logic that is capable of causing an E-Stop, which suggests you're still having electrical noise problems.   You should use shielded cable where possible, and make sure you have stiff pullups on any E-Stop or limit switch inputs, to increase noise immunity.

Regards,
Ray L.
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: ftec on January 10, 2010, 11:28:16 AM
.... The relay is connected to port 1, in a normally closed position on the C23 card.  The settings in Mach are set to that pin, and active low.  ...

....If I set it to active high, the spindle will be on, and telling Mach3 to turn the spindle on, will turn it off. ....

- Have you tried to change the wiring to NO position instead of NC? This should reverse the operation, but it  depends on your VFD wiring and operation.
- Did you notice that Mach ver 033 had a bug in the spindle start?
- What do you have there connected as an input to cause a Mach E-stop?
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: BarryB on January 10, 2010, 11:32:08 AM
I've tried NO and NC, active low and hi, plus sinking and sourcing inputs.  It's either some kind of major noise issue, or a bug.  I didn't know about that bug.  I'll check to see if I'm using that version...

Barry
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: BarryB on January 10, 2010, 01:23:42 PM
I was using version 32.  I've upgraded to 35, and it's got the same issue.  I'm going to try and run this without a smoothstepper and see if that gives me any difference.  That'll be a few days as I have to borrow PC get everything loaded, etc.

If anybody has ideas in the meantime, I'd love to hear them.

Barry
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: Hood on January 10, 2010, 01:32:23 PM
Have you increased the filtering in the SS plugin?
Hood
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: BarryB on January 10, 2010, 01:36:33 PM
Hmm, you maybe on to something.  I was trying values like 3 and 4.  After your reply, I put in 100 in all cells, and it works.  Any idea what is 'too' high of a number for safety?

Barry
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: Hood on January 10, 2010, 01:39:16 PM
Afraid not, suppose a test of an e-stop button or a limit to see how long the delay is would be the only way but as low as possible.
Hood
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: BarryB on January 10, 2010, 01:42:22 PM
I didn't expect the 'Limit' switches to be the cause of this, but if I put the noise filtering to '5' on that, it all work.  I'm going to put 'limits', 'estop' and 'misc' at 5.  Thanks for the prodding.  I can't tell you how happy this makes me;)

Barry
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: Tweakie.CNC on January 11, 2010, 12:29:19 PM
Hi Barry,

Sorry to be bit of a killjoy on this but although your limit switches are the manifestation of the problem they are not the root cause or source of the problem which, in my opinion, is definitely noise related and your limit switch wiring is just the antenna. Increasing the debounce setting may well mask the noise but, as Hood has said, you must consider that this is the time interval taken by Mach to recognize any limit switch being triggered and if the limit switch is mounted too close to the machine’s mechanical stop it will not perform it’s intended function.
I have recently fitted a VFD and can vouch for their noise potential but if it is correctly fitted there should be no problem. Although it is a vast subject here are a couple of easy things you could try before getting in too deep.
1. Check you have a proper and good ground connection coming into your machine.
2. Check that the VFD is grounded in accordance with the makers installation instructions.
3. Check that you have no ground loops on the machine (screened cables grounded at both ends etc.). A single point ground (with all shields and ground connections terminated at this one point) would be an ideal situation.
4. VFD driven motors can build up a charge on their rotor shafts (caused by stray flux) which will discharge to ground through the bearings and in so doing cause electrical noise. This can be tested for by temporally connecting the spindle shaft to ground with a carbon brush or similar. (large motors often have more than one brush in contact with the shaft to achieve this and prevent the bearings from pitting).
5. Your computer ground and your machine ground should not form a loop. (again only connected at one end, which is usually at the incoming mains supply). This may be particularly difficult to test for due to the many signal connections and their ground returns.

Waffled on a bit but I hope this helps.

Tweakie.
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: BarryB on January 11, 2010, 12:48:30 PM
Thanks Tweakie, I'm going to live with what I have right now till I build a new control box.  You saw my wiring did get out of control once I added all the connections, and I have no doubt that stowing them properly and having a bit of space between components will help.  I'll upgrade the cabling too.  They aren't shielded like you'd want them to be.  I plan on doing that in the next couple of months.

I posted a pict of my wiring diagram on the show off your machines category.  It's a bit messy even in that;).  I can link my 5v and 65v ground contact boards too.  That will share that ground and hopefully help as well.

Barry
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: Kryten on February 21, 2010, 09:47:13 AM

5. Your computer ground and your machine ground should not form a loop. (again only connected at one end, which is usually at the incoming mains supply). This may be particularly difficult to test for due to the many signal connections and their ground returns.

Waffled on a bit but I hope this helps.

Tweakie.

My VFD is 3 phase 415 volt and the earth to the motor comes from this power point.
The PC and servo drives are earthed through the 240 volt power point.
The lathe will always be earthed even if the 240 volt side is not plugged in,
but will probably create a ground loop.

Is this acceptable or should I disconnect the earth from the 415 volt supply ?

I have noise issues since installing the VFD. - ( S-true displays fluctuating from 100 to 43000 rpm
when actual speed is 300 RPM, X axis moving by itself )
I'm getting about 1.2 volt spikes on the 0 volt terminal of the spindle index pulse receiver.

 Glen.
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: Tweakie.CNC on February 21, 2010, 11:06:31 AM
Hi Glen,

Difficult to tell without looking at your installation.

The casing of my VFD (the heatsink) is bolted directly to my machine frame and is therefore grounded by this fixing so the incoming supply to it does not contain a ground connection. The output from the VFD is made with shielded cable, grounded at the VFD end but not at the motor end but the motor is itself grounded by being bolted to the machine frame. My machine frame and the computer casing are the only parts which are directly connected to earth protective ground and the screen of the LPT cable does not connect the two parts. So everything is ultimately connected to ground without loops and all works well.

Hope this helps,

Tweakie.
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: Kryten on February 22, 2010, 05:11:24 AM
Update - There is now only 1 earth to the machine ( the VFD one ). The computer earth and the VFD earth were connected because the power supply case was bolted to the lathe ( painted surface which may have created an intermittent connection). The noise was an intermittent problem.

 There is another issue which I suspect is a glitch in Mach 3. The X axis moves every few seconds by itself in a positive direction when there is an index pulse. If the motor is running and I disconnect the index pulse the random movements stop.

These are commanded moves from Mach 3 - ie the DRO on the screen moves. It seems to hold position during a cut from G Code but starts moving again during feed hold or with no G Code loaded.  I have disabled the MPGs in "Ports & Pins".

I'm using version R2.3 according to the "About Mach 3" under "Help". I haven't updated because I mainly do threading on this lathe and it does that well.  

This is a separate problem and needs to be under another topic in the forum.

Glen.
Title: Re: Spindle no longer crashes Mach3, but doens't stay on...
Post by: Tweakie.CNC on February 22, 2010, 09:04:59 AM
Sorry Glen, can't help with this one - Its outside the realms of my personal experience.  :'(
Somebody will know the answer to this.

Tweakie.